moving back forth and upward?
ragg
Member Posts: 65
hi,how to make an actor to move right and left while moving upward?i only can make it move up or back and forth...but not both at the same time..help pls..
Comments
Here is a trick to get it to feel like move.
RULE (ALL)
When right key is pressed
self.linear.X < 250 (or whatever you have been setting the move rate to)
accelerate 0 degrees 2000 (you want this big so it gets to your desired speed instantly)
OTHERWISE
Change velocity to 0 relative to actor
---------------------------------
RULE (ALL)
when left is pressed
when self.linear.X is > -250
accelerate 1800 degrees 2000 (you want this big so it gets to your desired speed instantly)
OTHERWISE
Change velocity to 0 relative to actor
These rules will feel like move, but will work while jumping or falling.
RULE
When self.position.X < 20
-change attribute game.MovingRight to true (1)
RULE
When self.position.X>460
-change attribute game.movingRight to false (0)
RULE
moving right is true
self.linear.X < 250 (or whatever you have been setting the move rate to)
accelerate 0 degrees 2000
RULE
when moving right is false
when self.linear.X is > -250
accelerate 180 degrees 2000
You can change 20 and 460 to constrain the how far left and right it moves.
To make it move up:
when self.linear.Y < 300 (change this to whatever speed you want)
accelerate 90 degrees 2000