Jump to content

How to get the local matrix?


Kesshi
 Share

Recommended Posts

How to get the local matrix of a mesh?

The TypeScript definition offers only getPivotMatrix() and getWorldMatrix().

 

I use parenting and i need to access the local transformations (as a matrix) of each child mesh.

In the code it looks like there is an internal matrix called _localWorld but i don't like to access internal variables in my code.

Link to comment
Share on other sites

What exactly do you want to do?

 

I might have a similar problem that I am not sure how to solve it the best way. I have a mesh that moves and rotates, that's the player. Then I have two other meshes that have the player as their parent. They each have individual positioning relative to the player (since the are the parents child objects). Now I can access the position of those meshes in world space by getting their absolutePosition. But I didn't figure a good way out yet how I can always get the absolute position of one and of the mesh without adding another child mesh. I want the absolute coordinates of a position relative to a mesh... I guess. Not sure if I explained it well. Is that waht you want, too?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...