Menu Close

MCG: Trajectory Constraint Rotation Controller

Download MCG: Trajectory Constraint Rotation Controller

TrajectoryConstraintUITrajectory Constraint causes an object’s orientation to follow the trajectory(velocity vector) of a target object. For example. when you animate a car, the rotation of car would be defined my the direction of car movement.

Many of you probably know how to rig this with Script Controller and Look At Constraint. I just took the idea and implemented as MCG.

How to use this constraint is simple. Just assign as an rotation controller and pick Motion Target object.

When you assign Motion Target, this MCG will ask you if you want also constraint position to the Motion Target. You will probably need to say yes unless somehow you only need to have orientation.

This MCG also shows a good example of a benefit/advantage of MCG. This MCG is actually just a modified version of the new MCG_LookAt Constraint. I just replaced multi target list with a pick button and added a simple velocity calculation from Motion Target nodes. I did not need to reinvent all the parameter for upload. MCG allows you to easily modify/enhance someone’s MCG for your need. This is a big benefit.

One thing you need to know is that when you assign Motion Target node MCG will do the following things.
1) Assign Motion Target node as upnode
2) Turn off World from Upnode Settings
3) Set Upload Control as Axis Alignment.
4) Source Axis and Axis Aligned to Upnode as Z

What is does is letting you define up axis with the Z axis of Motion Target node.
Usually users uses just World Z as up axis. But, this can cause problem(flipping) when your object is moving vertically very close to World Z axis. To prevent flipping, you need to manage up ax, and I think this option is the best for that.

But, if you need to use other setting, then you can always change later.