Pryme8 Posted March 16, 2016 Share Posted March 16, 2016 This is prolly a dumb question that has been asked a million times and im pretty sure Ive seen the answer somewhere before but I cant seem to find it now...http://www.babylonjs-playground.com/#57UUW#2 In my scene I move my meshes prior to adding the physics but it seems that the physics imposter is being created at the original inception point of the mesh? or maybe Im just tripping... so some way I figured I need to run an updateMeshPosition method or an update physics body or something... Any help here? ***UPDATE*** weird, i did not change anything and it started working... so odd... GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
RaananW Posted March 17, 2016 Share Posted March 17, 2016 I love the update About the position tracking - the new physics architecture tracks the position you are setting to the mesh. So any change th the mesh's position/rotation (quaternion) will be represented in the physics body. If it doesn't. please let me know. As this would be a bug. Quote Link to comment Share on other sites More sharing options...
RaananW Posted March 17, 2016 Share Posted March 17, 2016 Since I am all over this car demo, here is a position update demo - http://www.babylonjs-playground.com/#1MSQGK#5 This is, btw, not the best way of updating your mesh's position, but it works. The best way would be to use forces and move your mesh in the right direction. But if you have to set position, set the position. And another btw - if you once move the car (in this example) the position update won't work anymore. This is the magic of the motor settings and constraints. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.