Interpolate/Acceleration Help

Hey guys,

I need some help,

I have a spaceship which accelerates but as I let go of the button I want it to slowly decrease in acceleration to eventually its not moving. I used interpolate of 2 seconds and I changed the velocity x and y but as I re press the button it won't move until the seconds is done. Does anybody know how to fix this or do without the interpolate. I want an object to accelerate when I press a button and slowly decelerate to 0 after 2 seconds or so but at the same time when I re press the acceleration button I want it to accelerate again and cancel the decelerate code.

Any help will be appreciated! Thanks guys.

Comments

  • TimeTime Member Posts: 113
    Bump!
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Increase the drag amount in the actor's physics section.
  • TimeTime Member Posts: 113
    I did that and its awesome but can you change the amount of drag- it's not exactly what I'm looking for, I want no matter what the speed to stop after 2 seconds but when I accelerate too fast it doesn't do that. Can I change the drag in real time?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I'm not sure if you can change the drag, but you can force the velocity to zero with Change Velocity. And you can use a timer to determine when 2 seconds has ended.

    However, you CANNOT stop an interpolation mid-way so if you need to do that, use Change Velocity or Accelerate instead.
  • TimeTime Member Posts: 113
    Thanks!
Sign In or Register to comment.