Log in or register to post comments

Freeze rotation Model Target

March 6, 2020 - 3:11am #1


I use Model Target, that's work well. But I want to freeze the rotation of my asset. If I turn my object I don't want that my asset turn.

So I wrote a little script :



private void Start()


MTx = MT.transform.rotation.x;

MTy = MT.transform.rotation.y;

MTz = MT.transform.rotation.z;


void Update()


Quaternion rotation = Quaternion.Euler(MTx-MTx, MTy-MTy, MTz-MTz);

transform.rotation = rotation;


MT is the Model Target.

It's work, when I turn my object my asset doesn't turn. But now, when I turn my device my asset turn. (If i desactivate my script it's the opposite)

Someone know how to do ? My asset need to be fix when I turn my object or my device.

Thanks and have a nice day !


Log in or register to post comments