Hi everyone,
I've been trying to work this out for myself for a couple of hours now so decided it was time to seek specific help! Before I begin, let me just say that I am a totaaaaalllll 3DS noob. Part of the problem of me seeking a solution for my problem (which seems like it might have an easy fix, if only I could find and/or understand it...) is that I don't understand half (or, you know, most) of what I'm reading online about quaternions, etc.
My problem is this: I am creating a solar system animation (just for funsies / to teach myself 3DS). I have some planets that have cameras, moons and satellites, which have their own orbits around the planet, which are linked as children to the planet, so that they travel with the planet around the sun. I am now trying to make each planet rotate on its z axis as it travels around the sun (i.e. so it has a day and night).
I have worked out how to do this by using Rotation keyframes and it's all good for the planets which don't have moons / satellites. They rotate happily away as intended. However, for my planets with moons, the moon orbits now rotate on their z axis along with their parent planet. Some of my orbits are tilted to the plane of rotation which immediately makes them look wrong once they start spinning with the planet, not to mention mucks up the length of the "moon's year" as it goes around the planet. It also ruins the effect I was going for with my cameras because now they're spinning all crazytown around the planet as it rotates. See the picture I have attached; hopefully that makes it clear what I'm trying to do.
What I think I want to do is to lock the child rotation in the z axis, so that it doesn't follow the parent object's z rotation (but the position of the child object still follows the parent).
I tried adding a Rotation Script controller to the child and then typing this script into the window that comes up: transform.rotation.z=0
which I found online for someone who was trying to do something vaguely similar. However it then tells me "Unknown property: "rotation" in transform()". I have no idea if I am missing pieces of the script that should be in there... or if I'm not using the right programming language... or if I'm not typing it right (tried Rotation with a capital to no avail)... or if this will even do what I was hoping... I'm essentially totally in the dark.
I then just put this script back into the box as it was when I first opened it: quat 0 0 0 1
Tried researching quaternians to see if I could do something to those four numbers that would do what I wanted... had no idea what they were on about...
If anyone can help me change the z-rotation part of the relationship between my parent and child objects, I would greatly appreciate it!
My version is 3DS Max 9.
Thanks in advance, hopefully 🙂
Solved! Go to Solution.
Solved by Steve_Curley. Go to Solution.