AWPDebugDraw DBG_DrawConstraintLimits show wrong angle

Software: Away3D 4.x

John Brookes, Moderator
Posted: 24 February 2012 01:14 PM   Total Posts: 732

The limits show the wrong angle.
This should show -45 to 90, the debug shows 0 to 135
eg
var hinge:AWPHingeConstraint = new AWPHingeConstraint(baseRb, new Vector3D(0, 500, 0), new Vector3D(0, 0, 1), armRb, new Vector3D( 0, -500, 0), new Vector3D(0, 0, 1));
physics.addConstraint(hinge);

hinge.setLimit(MathConsts.DEGREES_TO_RADIANS * -45, MathConsts.DEGREES_TO_RADIANS * 90); //-45 to 90

 

   

Mr.Angelo, Newbie
Posted: 24 May 2012 04:11 PM   Total Posts: 3   [ # 1 ]

I think, it is correct.

(90) + (45) = 135,
from 0 to 135 is angular freedom.

Maybe debug shows angular freedom of movement.

The thing what you specified from -45 to 90 might be only an offset.

Range (0,135) minus offset 45 is Range (-45,90) = 135 units of rotation movement.

Range (0,135) = [135]
Range (-45,90) = [135]

Caught my idea? rolleyes

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X