Actor overlapping walls
Hi everyone,
I've got a weird issue and I really need a solution (I'm going mad): I'm using a main actor (a block with circle shape) which collides with walls (left and right) and ground. When the actor collides it completely stops without bouncing.
Now, when the actor collides with the right wall, it works perfectly, but when it collides with ground or left wall, it overlaps the ground/wall for 1 or 2 pixels...Everything is working, except for this overlapping issue...
Does anyone have an idea of what the problem is?
Thanks
I've got a weird issue and I really need a solution (I'm going mad): I'm using a main actor (a block with circle shape) which collides with walls (left and right) and ground. When the actor collides it completely stops without bouncing.
Now, when the actor collides with the right wall, it works perfectly, but when it collides with ground or left wall, it overlaps the ground/wall for 1 or 2 pixels...Everything is working, except for this overlapping issue...
Does anyone have an idea of what the problem is?
Thanks
Best Answer
-
rebzone
Posts: 25
@tenrdrmer
Thanks for your answer, but that's not the point: I need the main actor not to bounce, but completely stop when it collides...
@everyone
after days spent trying to resolve this "bug" (with the intense help of MotherHoose), I think this is exactly how GS is meant to work with collisions...Obviously that's just my opinion, but working with manual positioning always result in some sort of bug affecting other physics aspects.
I definitely think that the 0,25 offset is used to let the collision shape work properly (as said before, +0,25 = rectangular shape, -0,25 = circular shape)...and that's all...
As I said: just my 2 cents.
Anyway, thanks everyone for your support...I hope this thread will help someone else fighting with this "bug" too
Answers
Try doing this without an image, just change the actor color and see if that works...
walls and ground are made with blocks 32x32...so, I have a single block I use to build walls and ground...So the answer is yes, friction and restitution values are absolutely the same (density=1, friction=3, restitution=0)
@Braydon_SFX
Yes, the main actor and the walls have an image...
I tried what you said: using the same main actor without images (and still using images for the walls), it works correctly, but if I place the image/animation on it, the problem persists...
The image is a 32x32 png made with photoshop (72dpi) ...any ideas?
ummm...maybe that's the problem...
The left wall is at 96 X, but when the main actor stops colliding with it, it's at 127,75 X (when it should stop at 128)...
As I said before, I'm using the circular shape for collisions... Anyway, if I try to use rectangular collision shape, it stops at 128,25 X...
The same for the ground and the right wall: there's always a 0,25 difference...
But I still can't figure it out: as to answer @Braydon_SFX, I've re-checked all my graphics, and everything seems to be ok...
I need to keep circular collision, because my game develops in a sort of checkerboard, where the main actor moves through paths of 32 width (using collisions). If I use the rectangular collision shape the corners of my obstacles stop my main actor.
Is there something I'm missing about collisions? :-/
Physics > increase density; increase friction; restitution=0; fixed rotation checked; and
moveable unchecked … Collision Shape: Rectangle
no collide behavior … nor rule's conditions overlap/collide
on the circle:
collide behavior
Physics: only change the Collision Shape: Circle
@};- MH
still not working...
I've changed density and friction to 1000 in the wall/ground actor and other parameters as you said. There's no rule inside.
The main actor is circular, has the collide behavior, and I've changed the restitution to 0 to make it stop when it collides...
I'm about to cry....
http://forums.gamesalad.com/discussion/41040/problem-with-placing-actors/p1
but, difficult to have tiled graphics lay in correctly
are the circle and the walls on the same layer?
mayhap using an invisible sensorActor … slightly larger than the tiledImage areas
and have the circle collide with those sensors … would work???
little bits/bytes for invisible actors …
your first post seems to describe another problem I was having, since my walls and ground are built with 32x32 blocks... I resolved it just unchecking the movable flag in the block actor and everything went in the desired position (I think it was a MotherHoose hint, anyway
Reading the full post, anyway, I don't understand if it's a GS creator bug, but it's resolved when building the game to iOS (I still can't try it, because I didn't subscribe as a developer yet), or if the bug still remains even on the iDevice...
If someone could try it for me, I'd be glad to email my project, since this thing is driving me crazy
@MotherHoose
the circle (which is not a circle, but a 32x32 block using the circle collision shape) is on the same layer of the walls.
I don't think I can use a sensorActor, since I need to move in a checkerboard environment... I try to upload some images to better understand the scheme...
https://dl-web.dropbox.com/get/Photos/bug1.png?w=c81d26ac
https://dl-web.dropbox.com/get/Photos/bug2.png?w=cb4b966d
https://dl-web.dropbox.com/get/Photos/bug3.png?w=d5dd7331
leave everything as you have it
make two absolutely transparent image.pngs
one 512x512 … one 1280x800
Publish with GS > select MacIntosh platform
click through (dragging in those blank images when asked for)
do Not publish to store!
and, you should get your app/game downloaded … so you can open it on your desktop!
(and share with us for some testing!)
for us to try your current-build gameApp … you would need an Ad Hoc provisioning profile from Apple
happy that you are progressing so nicely! @rebzone
@};- MH
...still, I'm about to cry
...Even building up the app doesn't resolve the bug, so, I really don't know what else I could try...
The concept is so easy that shouldn't have any problem, but the bug is still there... I tried re-creating from scratch the game, but I still have the same issue...
I'm about to give up: it's frustrating fighting with a bug I don't even know if it's something I made wrong or something related to GS itself
I'll try creating something else...maybe...
Thanks anyway all of you for your support
myname
gmail
perhaps I will cry with you!
You mean the app or the gameproj?
Anyway I'm sending it this evening (now I'm at work :P)
Thanks
Nevermind, I just sent you the project
Thanks