Notifications
Clear all

[Closed] Get the absolute position of an object

Hi Everybody

Is there a way to get the absolute position and rotation of an object constrained to other, via contraints, like position constraints?
When use myObject.pos , there’s a sort of offset if it’s constrained.
Thanks.

7 Replies

Have you tried myObject.transform.pos ?

yes but it as an offset…

myObject.transform.pos

nope,
look in my scene i ve a point in path contraint on a spline, when i do anotherPoint.transform.pos = mypoint.transform.pos the antoherPoint don’t place on the place of mypoint…

2 Replies
(@denist)
Joined: 11 months ago

Posts: 0

no doubt
node.transform is a transformation matrix in the world space (absolute).

(@mambo4)
Joined: 10 months ago

Posts: 0

i think node.transform.pos is read only

try

anotherPoint.pos = mypoint.transform.pos

Or if for some weird reason it’s the setting anotherNode.pos part that’s causing the problem, you could try, getting-changingPos-setting the entire transform:

local tm = anotherPoint.transform
tm.pos = myPoint.transform.pos
anotherPoint.transform = tm

If that doesn’t work, you should consider working somewhere else than in the middle of the Bermuda triangle.