Problem with walls collision
gregoirephilippe
Member Posts: 5
Hi there,
first of all I just want to say that I've searched an answer to my problem a lot on this forum and the internet and the solutions I've found don't work, so here I am :P
Here's my problem. I'm doing a top-down maze level. So I have my avatar actor and my wall actor. I've put my wall several times on the screen to make a maze. I've found a lot of threads telling me how to make the walls «solid», but nothing works. I've turn the wall to non-movable, put its bounciness to 0, added a collision behavior on it, but when I preview my game, my avatar just move OVER every wall. If I put my wall actor to movable, then now the collision works but like you can guess, my walls just move all over the place.
Can someone help me ?
first of all I just want to say that I've searched an answer to my problem a lot on this forum and the internet and the solutions I've found don't work, so here I am :P
Here's my problem. I'm doing a top-down maze level. So I have my avatar actor and my wall actor. I've put my wall several times on the screen to make a maze. I've found a lot of threads telling me how to make the walls «solid», but nothing works. I've turn the wall to non-movable, put its bounciness to 0, added a collision behavior on it, but when I preview my game, my avatar just move OVER every wall. If I put my wall actor to movable, then now the collision works but like you can guess, my walls just move all over the place.
Can someone help me ?
Comments
One video in particular that might help you out, is this one...
Darren.
I took his line of constrain attribute out of his original rule (now it doesn't have a rule attached to it) and added the trick to cancel the camera offset () at the end of the line so it gives this :
self.Motion.Linear Velocity.X to 20*( game.Mouse.Position.X - self.Position.X + game.camX)
self.Motion.Linear Velocity.Y to 20*( game.Mouse.Position.Y - self.Position.Y + game.camY)
Now it works !
Thanks for your help everyone !