Touch and walls
efish
Member Posts: 40
I hace an actor i control with touch back and forth along the x-axis. When I used the keyboard I had walls the actor could collide with so it didn't go off screen. When I use touch the walls doesn't work any more. How can I say that the actor is no allowed to go outside the screen? Thanks a lot
Comments
It only works when I change movable to true, but when the actor collides with the wall, the wall runs away.
:‘( sniff
I actually managed to solve the problem an other way. No need for walls.
I have a rule on the actor I want move when touch is pressed. Then I have a constrain attribute which states that self.Position.X To: max(min( game.Touches.Touch 1.X ,300),20)
This makes the actor movable along the X-axis (horizontal) and it is limited to move only in between 20-300 of the screen.
Hope this helps!
Kisses :*