control actor with touch question.
CaptFinn
Member Posts: 1,828
I am currently using
Rule:
on touch
constrain self-y and self x to mousey and mousex.
i also have a collide with wall rule.
But my actor doesnt want to stop when i drag it over to the wall. it goes right thru the wall. Its almost as if its ignoring any other rule while its touched.
I know this is a basic way to move the actor with a finger. But how do i make it react to the walls?
Comments
Constrain linear velocity X to 50 *( game.Mouse.Position.X - self.Position.X )
Constrain linear velocity Y to 50 *( game.Mouse.Position.Y - self.Position.Y )
You also might want to stick this into the Otherwise section:
Change linear velocity X to 0
Change linear velocity Y to 0
i just tried that. on touch the actor goes flying all over the screen bouncing off the walls at fast speeds.
You've missed out the brackets.