Does anyone know what the edgeAngle is with the createConstraint method under the ConstraintBinding class? I believe it was used in the old 4x4 hinge wheel demo. However, I am not clear on what it does as it relates to the hinge constraint.

Regards

Does anyone know what the edgeAngle is with the createConstraint method under the ConstraintBinding class? I believe it was used in the old 4x4 hinge wheel demo. However, I am not clear on what it does as it relates to the hinge constraint.

Regards

Hi Rizzo,

The ‘edge angle’ is the cosine of angle of the edge from the game object x-axis, cosine of the angle from the game object y-axis and cosine of the angle from the game object z-axis.

In other words. You have a box. z-axis is the box height. y-axis is the box length. x-axis is box width. The box has a hinged lid. The hinge is attached to the length of the box (the box y-axis).

To find the edge angle for the hinge: The angle of the hinge from the box x-axis (box width) is 90 degrees and the cosine of 90 degrees is 0.00. The angle of the hinge from the box y-axis is 0 degrees and the cosine of 0 degrees is 1.00. The angle of the hinge from the box z-axis is 90 degrees and the cosine of 90 degrees is 0.00

So edge angle for the box hinge is (0.00, 1.00, 0.00)

If the hinge was rotated 45 degrees in the x/y plane, the edge angle would be cosine of 45 degrees, cosine of 45 degrees, cosine of 90 degrees. Or (0.707, 0.707, 0.0)

Clark

The illustration helps. Thanks cthames! By the way, your reference site is a great resource.