playMaker

Author Topic: How to Reset an objects momentum to 0?  (Read 2024 times)

jasperPT

  • Full Member
  • ***
  • Posts: 115
  • I am a VFX Animator teaching myself to make games
How to Reset an objects momentum to 0?
« on: July 11, 2014, 08:41:57 AM »
Hi,

I am having an issue with an object where it seems to keep its momentum when I spawn it from where it was before and cant figure out how to reset it.

Basically I have an object rolling down a hill, and I want to be able to reset it back to its position at the top of the hill when i click a button. The problem is that it still keeps all its momentum from the hill rolling so as soon as it goes to the top it just flies off.

I have tried using a despawn/spawn with poolmanager, however the same issue still happens.

What is the best way to reset an objects momentum and general physics attributes back to its original state?

1982

  • Junior Playmaker
  • **
  • Posts: 71
Re: How to Reset an objects momentum to 0?
« Reply #1 on: July 12, 2014, 05:23:19 AM »
I've usually gotten away with switching Kinematic on and then off

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: How to Reset an objects momentum to 0?
« Reply #2 on: July 12, 2014, 02:58:46 PM »
Setting the rigidbody velocity and angularVelocity to zero should also do it...