The MCG 3 DOF Rotation Spring Controller is a rigid, physical constraint that allows an object to rotate around a "parent" object in all three axes within limited ranges. The object can still be outside these limits but if it is, a rotational spring force is applied to push the object back within the limits.
There are several reasons why the object can exceed the rotational limits. For example:
- The object's initial rotation might be outside the limits.
- The acceleration due to gravity might be very strong.
- If the parent is animated, it might accelerate or decelerate rapidly.
This controller uses a simulation that updates each frame based on a cache of the previous frame. If you jump to a later frame, the intervening frames get calculated automatically. If you jump back to an earlier frame, the simulation is recalculated from the first frame. For best results, make sure that
Real Time is off in the
Time Configuration dialog.
- Create a "parent" object and move it to the position that you want the constrained object to rotate around. The parent can be animated if you want to apply inertial forces to the constrained object.
- Create a "hull" object, and move and rotate it into the initial pose that you want for the constrained object, relative to the parent. Only its world transform on the first frame is taken into account.
- Select the object to constrain.
- Choose
.
- Click the parent.
- Click the hull.
- Set the desired limits, and any other settings that you want.
- Play back, or jump to a later frame.
If you change values, or move the parent or hull, then you might need to click
Reset Simulation. This clears the cache, and also resimulates up to the current frame if necessary.
Note that when there are extreme forces, the simulation can be inaccurate. In these cases you can use MAXScript to set the hidden StepsPerFrame attribute to a value larger than 1 for more precision, at the cost of longer computations.
Interface
-
Object References
-
-
Parent
- Click to select an object to rotate around.
-
Hull
- Click to select an object that defines the transform of the constrained object on the first frame.
-
Deactivate Spring
- Toggles the controller on and off.
-
Physical Properties
-
-
Mass
- The object's mass.
-
Gravity
- Constant acceleration in the world's Z axis.
-
Damping
- A factor that progressively decreases velocity.
-
Bounce
- The coefficient of restitution, that is, the proportion of kinetic energy that remains after interaction. Typically, values should be between 0.0 and 1.0. Values above 1.0 cause energy to increase, which is not physically correct but may produce interesting effects.
-
Stiffness
- The spring constant of the rotational spring that is applied when the object is outside the limits.
-
Axis Limits
- The upper and lower limits of rotation in degrees for each of the object's local axes, outside of which the spring force is applied. Activate
Use Axis Limits to set the ranges to 0 for all axes.