Is it possible to lock an axis for a dynamics simulation? For example, I have some object I want to simulate as a soft body, but I don't want it to move on Z axis, only in the XY plane. I can't figure it out and I haven't found anything on the internet.
Also, if I can solve this problem, I would also like to make my camera a child of the simulated object to follow it, but i would like to lock the rotation of the camera so it stays frontal while following the object. I would thank you so much if someone could help me with these.
on May 20, 2019 at 5:41:14 pm Last Edited By Jim Scott on May 20, 2019 at 5:48:42 pm
I don't know of any way to lock an axis for dynamics simulation, but you can cache the simulation and then use cappucino to convert the cache to keyframes, and then delete the Z position keyframes in order to limit movement to X and Y.
1) With the object's Dynamics tag selected, go to Cache and click on "Bake Object."
2) With the object selected, go to C4D's main menu: Character > Manager > Cappucino to bring up the dialogue box below and confirm that Position and Rotation are selected (add Scale if you need it).
3) Click on "Start Realtime" and then with your cursor in the Viewport click and hold your mouse button until the animation runs through and all the keyframes are created. You will see the keyframes being created in the Viewport, and once you release the mouse button you will find all of the created keyframe parameters in the Timeline.
4) Open the Timeline menu, twirl open "Position," and select and delete the Position . Z data.
5) Delete the Dynamics tag so that the position keyframes will be used.
For the camera, if you want it to match the X and Y position of your animated object while staying parallel to it in Z you could use the Set Driver/Set Driven expressions. Otherwise, a Target tag on it might be all that's needed. Please elaborate more on what you want the final result to be and I will try to provide the best solution.
Ok, I lied. I do know a way to lock a position axis... I just forgot about it. Add a Protection tag to your dynamic object, and for your desired outcome uncheck everything except the Z position property. It's much simpler than my previous solution, but just not as much fun. 😉