Jump to content

Problem : Mesh is self transformation when use parent child and physics

atallah salah

Recommended Posts

Hello every one,
I'm working on a project and I'm using physics and collision and everything was fine until I start using parent child for object and meshes
i create an example here show some issue  :

you can see in the example :
box position still increasing in y Axis and the same happen for the highest skull

Thank you for help :)

Link to comment
Share on other sites

@trevordev Thank you for this answer it's was really helpful it's solve other topic for me
in the example you have send it's still the same problem if you can focus on the third skull and box they still incensing position on y Axis , it's take i while to check it
if you check it after 1 minute when the parents functions done sure you will see the difference

Thank you

Link to comment
Share on other sites


My cases is about drawing object and this object have to detect all other objects collision in the scene

I have to use imported meshes cuz it's not possible to draw it in BabylonJS
Parenting used for some controls like animation and change parent position or rotation and children have to do the same

In my case I must use parenting  , I try to use method like RegisterBeforeRender to set position but it's was very heavy cuz the number of objects and movements at the same time

The all idea depending on parenting  and collision

I was thinking about if I could stop use parenting  at the point I use collision  and use it again  when done with collision if that possible what do you think ?
I try to use Oimo.js in Babylon but still same
Thank you for your answer

Link to comment
Share on other sites

This is a great example not use parenting at all

In my case user will able to add object to another object  to be transforming together like what parenting do at the same time have chain(sphere connected together using Joint ) and this chain have to use physics all the time scene running
I have at least 40 object user have to put it on each other and maximum 100 object 
when using physics collision and parting with BabylonJS object (Box,Sphere,..) everything work fine but not for the imported mesh

do I can link object with each other like parenting with with using physics link
I will try the example

Thank you

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.

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.


  • Recently Browsing   0 members

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