Jump to content

Importors with parents without compounds


RaananW
 Share

Recommended Posts

Hi guys!

Jus wanted to update regarding a new feature that was pushed today.

Until today any mesh with a parent couldn't have its own physics impostor and was considered to be a part of a compound along with the parent. This behavior can now be controlled using a new flag in the impostor options (part of the constructor.

The behavior can be best seen in this simple playground: https://playground.babylonjs.com/#PRHF00 . The right sphere is a simple mesh and has no impostor. the left sphere has its parent set to the right sphere, and the impostor is set with the ignoreParent flag. The right sphere's position is still updated when the parent mesh is moving, but it is also being controlled by the physics engine. Fun times!!

Another flag that I added has the amazing long name disableBidirectionalTransformation (a boolean).

This flag will disable the bidirection transofmration between the physics engine and babylon, meaning - changing the mesh's position in babylon will practically do nothing. The object will be controlled solely by the impostor. This is done to add a performance boost, as the transformation step is being skipped. 

I am here for any questions! The playground is not fully updated, so this feature will be there pretty soon. Until then you can think what you can do with it :)

 

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