i want an object to move with its parent but not rotate. how would i do this?
I solved this a while ago by using LateUpdate() … not sure if it is exactly a legitimate solution but it seems to work fine:
function LateUpdate () {
if (transform.rotation != Quaternion.Euler(0, 0, 0)) {
transform.rotation = Quaternion.Euler(0, 0, 0);
}
}
Attach this to your child object. Again, there may be a way better way to do this, so don’t hold this to me.
Hope that helps,
Klep
Could you “pseudo parent” it? Have the child object call the parent object’s movement commands, however you’re doing that, be it AddForce or changing the velocity or what have you. Then the child object would mimic the movement of the parent without mimicking rotating. Unless you need it parented for other reasons.