Search the Community
Showing results for tags 'oimojs'.
Found 2 results
Stephen Andrews posted a topic in Questions & AnswersI am attempting to create a game in which the player realistically collides with objects (or at least doesn't clip through them), but have run into a bit of a problem. The player must be able to rotate on all axis, as well as translate on all axis. (Local space) See here: http://triblade9.wc.lt/steelprivateer/ However, the player should also collide with the "asteroids" (debug spheres). It was a simple matter getting the engine set up, and the imposters attached to the meshes. (congratulations on making a simple, robust physics engine binding ) The real issue comes when attempting to move/rotate the player. Here's what I've tested: Using the mesh.rotate and translate methods in local space like normal, and updating the body position - Result: Rotations don't work and the body position updating causes lots of jittering.Directly modifying the rotation vector, continue to use translating and updating body position. - Result: Weirdest, most confusing rotation system ever, "forward" seems to be a combination of random axis or something. Example (Yes, I know the rotation coordinates are not global, but the "forward" direction seems off)Using mesh.applyImpulse. - Result: Incredibly finicky to get a solid directional push, very quickly goes berserk when rolling or pitching.Using mesh.moveWithCollision - Result: Similar to #2, but the 'forward' direction seems even weirder.I will upload an example of #2 soon, the Babylon playground isn't working for me with Oimo.js at the moment. EDIT: Example linked.