santarcade Posted September 29, 2015 Share Posted September 29, 2015 Hello,I need to be able to rotate and move my mesh, which has a physics state body set, keeping its physical simulation.It seems that when I set a physics state on the mesh, I'm unable to rotate it or move it directly. I've created an example here: http://www.babylonjs-playground.com/#UMR7M#44 Invoking setPhysicsState prevents direct modification of rotation and position. How can I achieve this? Should I keep a reference to the underlying physics body and modify it directly? On my own code I even tried: mesh.rotationQuaternion = BABYLON.Quaternion.RotationYawPitchRoll( Math.radians(gameState.mesh.gamma), Math.radians(gameState.mesh.beta), Math.radians(gameState.mesh.alpha) ); mesh.updatePhysicsBodyPosition();But yet, had no luck with it: the mesh is stucked at its initial angle. It is a week I'm playing with BabylonJS and it is outstanding what I have already achieved, keep up the great work!Thank you in advance. joez Quote Link to comment Share on other sites More sharing options...
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.