Notifications
Clear all
[Closed] Script Controller coordsys
Mar 24, 2014 6:29 pm
Hi,
I have a position script controller and I want to enter world coordintes so that the object moves to the world position I ask it.
However the object is linked to another and it always positions it relative to it’s parent. eg [0,0,0] positions it in the same place as it’s parent and not the centre of the world.
How do I get it to use world coordinates?
2 Replies
Mar 24, 2014 6:29 pm
Set it in the transform instead.
Could look something like this right off the top of my head.
$.transform=($.transform.rotation as matrix3) * transMatrix [0,0,0] * scaleMatrix $.transform.scale
Mar 24, 2014 6:29 pm
Thanks Paul,
I got it working OK but it broke something else in the process.
I’ll have to go for a walk and revisit the problem afresh.
Cheers
Garry