Jump to content

Applying physics to mesh and bones


Recommended Posts

Hi all, I have been banding my head against a wall all day with this.

Am trying to apply physics to my mesh so the feet bones need to be on the ground or the robot will tip over but I just cant work out how i can apply the collision detection to the legs and apply gravity to the whole robot.

you can find an example below 



any help would be great

Link to comment
Share on other sites

@trevordev I have read the docs, and based on this example https://playground.babylonjs.com/#PRHF00#6 my code should work but I cant figure out whats wrong with it.

If I remove the parenting then my meshes explode but if i set the parent then collision is only applied to the parent.


Link to comment
Share on other sites

@codelain In your example you also want to move the objects which doesn't seem supported by this pg: https://playground.babylonjs.com/#PRHF00#11 . There is definitely some weird behavior when trying to do more complex interactions with physics and I am not yet sure how to resolve this type of collision but I am also investigating adding AmmoJS physics to Babylon (https://github.com/BabylonJS/Babylon.js/issues/3079), through my investigation there I'll keep an eye out there to see if your scenario can be supported but for now this may be a limitation.  

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