IDEA!: A fast solution for deaccelerating :)

Hi people!

Im just working with my ideas and i arrive to the typical point where you need a deacceleration (first time for me jjjj) so i found a fast solution for this and i want to share it with yours :)


My case: Tipical 2D platform where you run left/right but you need to accelerate.

What i do?

Rule:
When all conditions are valid -> (keys left,right and Z are UP and the attribute FacingRight? its true)-->(for left its FacingRight?False)

Rule:
When self.motion.linear velocity.X > 0 --> (for left its < 0)

Accelerate: 180º 300acceleration relative to actor

Otherwise:
Constrain self.motion.linear velocity.X and .Y to 0

FacingRight? its an Attribute triggered to certify in wich side is looking the actor, sure you have one like this :)


So, it works! just calibrating your preferences on the acceleration rule and it will work perfect, at least for me and i hope for you too :))))



I hope it will be useful!! :D


Sign In or Register to comment.