Get rotation in self coordinate system

Hello
I have problem with getting rotation pos. in my pinball game
Actually my
obj.transform.rotation.(x,y,z);
return me different value that i have in my inspector of object
I thin’k that the problem in this case that i see there self coordinate but my script get world coordinate
how change this system in script(especially for getting position)
Thank you

1 Answer

1

To get local values of rotation and position you can use: localRotation and localPosition.

obj.transform.localRotation
obj.transform.localPosition