Jump to content

Imported Mesh Position and Rotation


okan
 Share

Recommended Posts

 

Hello,

I'm trying to learn babylonjs and build a simple tower defense game. However, there is a problem i could not solve.

I have imported a tower model with some weapons on it (more than 20 meshes). When I print positions of these meshes, it says they are all at 0,0,0. However, when I try to rotate or change position it behaves like its pivot position is at 0,0,0 and their object position is at another point. So,  I'm having trouble when i try to move and rotate the weapon meshes around the tower model.  I have tried to set bounding box's center point as pivot point of the object, but it did not work. Still when i try to rotate weapons, it rotates around another axis. How can I solve this problem?

If it's not clear I can send a playground demo to explain it better.

 

 

Link to comment
Share on other sites

Hello Deltakosh and thank you for reply.

Is it possible to change pivot in babylon without using a tool? If it is not, I think i can reset pivot to center with Blender. So, should I create different models for each weapon and set pivot to center for each of them? Is it the common way to do that instead of trying to change pivot of meshes in babylon or any other 3d engine?

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...