cx20 Posted June 5, 2018 Share Posted June 5, 2018 I tried to create a sample using OimoJSPlugin. http://jsdo.it/cx20/IVHj However, the following error occurred. Uncaught TypeError: impostor.physicsBody.linearVelocity.init is not a function at OimoJSPlugin.setLinearVelocity (babylon.max.js:85118) at PhysicsImpostor.setLinearVelocity (babylon.max.js:83249) at IVHj:264 at Array.forEach (<anonymous>) at Observer.callback (IVHj:260) at Observable.notifyObservers (babylon.max.js:8294) at Scene.render (babylon.max.js:27859) at IVHj:78 at Engine._renderLoop (babylon.max.js:12784) Perhaps linearVelocity and angularVelocity should use the set function, not the init function. public setLinearVelocity(impostor: PhysicsImpostor, velocity: Vector3) { //impostor.physicsBody.linearVelocity.init(velocity.x, velocity.y, velocity.z); // init() is undefined impostor.physicsBody.linearVelocity.set(velocity.x, velocity.y, velocity.z); } public setAngularVelocity(impostor: PhysicsImpostor, velocity: Vector3) { //impostor.physicsBody.angularVelocity.init(velocity.x, velocity.y, velocity.z); // init() is undefined impostor.physicsBody.angularVelocity.set(velocity.x, velocity.y, velocity.z); } Quote Link to comment Share on other sites More sharing options...
Guest Posted June 5, 2018 Share Posted June 5, 2018 pinging @RaananW Quote Link to comment Share on other sites More sharing options...
RaananW Posted June 6, 2018 Share Posted June 6, 2018 yep, it should be set. I will take care of that right now cx20 1 Quote Link to comment Share on other sites More sharing options...
cx20 Posted June 6, 2018 Author Share Posted June 6, 2018 @RaananW Thanks! I confirmed that it works correctly with the latest version of the library. http://jsdo.it/cx20/IVHj RaananW 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted June 6, 2018 Share Posted June 6, 2018 YEAH! Thanks @RaananW Quote Link to comment Share on other sites More sharing options...
RaananW Posted June 8, 2018 Share Posted June 8, 2018 When can I play this? I need to find some productive use to my vr set 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.