THREE.js: Calculate world space position of a poin

2019-01-18 05:07发布

I have a 3D object. "Attached" to it is a point. When the object is moved or rotated, the point moves and rotates with it.

Given the object's position and rotation, how can the position of the point in world space be calculated? (Using THREE.js's API if possible)

Thanks

1条回答
姐就是有狂的资本
2楼-- · 2019-01-18 05:24

For a point in an object's local coordinate system,

object.localToWorld( point );

will return the world coordinates of the point, assuming the same transform is applied to the point as is applied to the object.

three.js r.55

查看更多
登录 后发表回答