1

Add RigidBody.GetLayoutValues()

Once the object's Init() is fired it's too late to call GetPosition(), GetOrientation() GetLinearVelocity(), GetAngularVelocity() as the physics have already started to affect these values.

Inside Init() the first thing I called was this.
origpos = RigidBody.GetPosition();
origrot = RigidBody.GetOrientation();
origmass = RigidBody.GetMass();
origangvel = RigidBody.GetAngularVelocity();
origlinvel = RigidBody.GetLinearVelocity();


The object's original origpos.Z was 0.2338 not 0.0123179
And you can see that it now has velocities, so clearly physics occured before it got to my grabbing of the values.

4685 17:<19:16:56.922> [Chat] Sent [:0] /reset
4687 17:<19:16:57.031> [Chat] System Message: [Script] ID(B) Resetting pos to <-10,1.5,0.0123179>
4688 17:<19:16:57.047> [Chat] System Message: [Script] Resetting rot to <0.004404281,-0.003348162,-2.756448E-06>
4689 17:<19:16:57.047> [Chat] System Message: [Script] Resetting mass to 3.970239
4690 17:<19:16:57.047> [Chat] System Message: [Script] Resetting ang vel to <0.2109469,-0.1752472,0.0005388469>
4691 17:<19:16:57.047> [Chat] System Message: [Script] Resetting lin vel to <-0.06529292,-0.0784397,0.01456807>

 

 

 

0 comments

Please sign in to leave a comment.