Here's one that I've been wracking my brain over. Anyone have any thoughts on slowly rotating an object to a certain angle using physics? I'm looking to have a space ship (gravity disabled) that'll slowly rotate on command but if it impacts with something, it will react just like a prop, bouncing and twisting and will have to regain control before it points back to the desired angle.
I know that I can use SetAngles, and AddAngVel that will instantly snap to that angle, but these won't have that bounce physics. Any thoughts?
Whatever the Lua equivalent of e2's applyAngForce is.
[QUOTE=Ott;40720308]Whatever the Lua equivalent of e2's applyAngForce is.[/QUOTE]
I was mulling over that, but then how do you slow it down and keep it accurate after you've applied that force?
Apply opposite force.
[editline]20th May 2013[/editline]
More specifically, E:applyAngForce(TargetAng - E:angles())
I should clarify, I'm looking to have it rotate without exceeding a certain speed. I did take a crack at just applying the opposite of the angle, but it snaps to and doesn't allow for the nice bouncy physics.
nevermind
Anyone?
Look into PhysicsSimulate, you can use it to specify a position and angle to travel to using physics. Beware that it is a slow function.
I don't see why you'd have any trouble just applying angular force at reverse fractions of the current velocity, though.
Sorry, you need to Log In to post a reply to this thread.