Stoping angular velocity
Quote from Goldenknighttim on October 24, 2014, 2:21 pmHey guys,
I changed an edgeless safety cube's model to a wheatly model, but it wasn't looking at me when I picked it up, so I wrote a script using SetForwardVector() that makes it face the player on constant repeat. This works, but it makes the core/ball fall really slow. To fix this, I have it set to only look at the player on playerpickup, and to stop looking at the player on physgundrop. This allows the core/ball to drop realistically, but the angular momentum apearantly kept from the game's attempts to keep the ball facing the same direction while the player is holding it. I tried to stop the angular momentum by using self.SetAngularVelocity(0, 0, 0), but it had no effect. Letting go of the core/ball also stops all linear momentum, but I'm thinking that stoping the angular momentup would fix that problem. Does anyone know how to stop the angular momentum of a prop_weighted_cube?
Hey guys,
I changed an edgeless safety cube's model to a wheatly model, but it wasn't looking at me when I picked it up, so I wrote a script using SetForwardVector() that makes it face the player on constant repeat. This works, but it makes the core/ball fall really slow. To fix this, I have it set to only look at the player on playerpickup, and to stop looking at the player on physgundrop. This allows the core/ball to drop realistically, but the angular momentum apearantly kept from the game's attempts to keep the ball facing the same direction while the player is holding it. I tried to stop the angular momentum by using self.SetAngularVelocity(0, 0, 0), but it had no effect. Letting go of the core/ball also stops all linear momentum, but I'm thinking that stoping the angular momentup would fix that problem. Does anyone know how to stop the angular momentum of a prop_weighted_cube?
Quote from Doomaflatchi on October 28, 2014, 3:57 pmJust a thought, but have you tried doing:
On Physgundrop > Disable Motion > 0.00
On Physgundrop > whatever you have to make it stop looking at the player > 0.00
On Physgundrop > Enable Motion > 0.01In my experience, a quick Disable Motion clears all of its movement data, including momentum, causing it to act from a free-fall state when re-enabled.
Just a thought, but have you tried doing:
On Physgundrop > Disable Motion > 0.00
On Physgundrop > whatever you have to make it stop looking at the player > 0.00
On Physgundrop > Enable Motion > 0.01
In my experience, a quick Disable Motion clears all of its movement data, including momentum, causing it to act from a free-fall state when re-enabled.
Quote from Goldenknighttim on October 29, 2014, 11:04 amTo be honest, the spinning by its self is kind of cool, but I want to stop it to preserve non-angular momentum. That solution would probably stop the angular momentum, but it would also stop the momentum I'd like to fix. Also, I don't believe that output works on prop_weighted_cubes.
To be honest, the spinning by its self is kind of cool, but I want to stop it to preserve non-angular momentum. That solution would probably stop the angular momentum, but it would also stop the momentum I'd like to fix. Also, I don't believe that output works on prop_weighted_cubes.
Quote from CamBen on October 29, 2014, 4:56 pmIt does work on cubes, it is enabled on any physics object. If it shows up red it still works.
It does work on cubes, it is enabled on any physics object. If it shows up red it still works.
Aperture Science: We do our science asbestos we can!