boundaries/walls question
POM
Member Posts: 2,599
i have an actor, and i control its movment by touch, so it follows your finger.
in my game i have a wall and i want this wall to be a boundary, so that if my actor collides with it, it just stay next to it, but beacuse the actor constraining its position to the touch, the wall dosent stop it and it overlaps it.
any ideas how can i fix it?
in my game i have a wall and i want this wall to be a boundary, so that if my actor collides with it, it just stay next to it, but beacuse the actor constraining its position to the touch, the wall dosent stop it and it overlaps it.
any ideas how can i fix it?
Comments
if actor position = < (the x or y position of the wall)
then actor position = touch position.
Then if it reaches the wall position, touch will no longer work. As the rule above is not longer active.
but the wall in the scene is with an angle like so " \ "
so the x and y of it is the middle of it (I think)
yet.. Any help?!
then if the actor collides with wall, make 'game.hitwall true'
then make you move to touch rule, only work when the game.hitwall attribute is false.
something like that....
any use?
obviously tricky, not quite knowing what your scenes layout is like, you can always post a link to a still of your scene if it will help.