By Mazdamundi
on Fri, 03/06/2020 - 11:11
Hi, 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 :
[quote]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;
}[/quote]
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 !