Get parent's object rotation


#1

Hi everyone

I have a two wheels parented to a seat, think of a bike-like vehicle. I followed a tutorial to make my wheels rotate automatically (link below). The wheels, on their own, works perfect, however when I rotate the body of the vehicle, the wheels start spinning, something that shouldn’t happen, since the vehicle is not moving. The tutorial introduces an attribute to turn off and on the automatic rotation (rootC.AUTO), however, for the project I’m working, it’s very annoying to turn off and on this attribute when I want the whole vehicle to change direction.

The question is, is there a way to stop the auto rotation while the whole vehicle rotates? Something like:

if (rootCurve rotates){
rootC.AUTO == 0 //to stop the auto rotation
}
else if(rootCurve stops rotating)
rootC.AUTO == 1 //to turn on the auto rotation
}

Thanks!

EDIT. I found out that maybe it’s easier if the rootC.AUTO is always off and only goes on when the vehicle is translating.

PD. Youtube link https://youtu.be/EbJw-YVYpIc