Joystick Problem
GameCre8tor
Member Posts: 49
Hi guys,
With codemonkey's joystick demo, when you release the joystick, the character always rotates back to 0 degrees (facing right).
My question is how to stop this from happening and when you let go of the stick, the character stays at the rotational position when you release the stick, instead of it rotating back to 0 degrees.
Any help would be appreciated,
GameCre8tor.
With codemonkey's joystick demo, when you release the joystick, the character always rotates back to 0 degrees (facing right).
My question is how to stop this from happening and when you let go of the stick, the character stays at the rotational position when you release the stick, instead of it rotating back to 0 degrees.
Any help would be appreciated,
GameCre8tor.
Comments
In the actor controlled by the stick go to the rule constraining the actor to the Angle set by the stick and wrap it in a rule:
When Attribute
StickGrabbed = true
---Constrain attribute "self.rotation" to "game.Angle"
otherwise
---Change attribute "self.rotation" to "game.Angle"
---Change attribute "self.Motion.Angular Velocity" to "0"