skmr Posted July 18, 2015 Share Posted July 18, 2015 Hi, I have started using BabylonJS for a simple space shooter game. I want to add collision detection between objects, collision detection is enough, I don't need realistic physics. The tutorial on collisions uses ellipsoid to make the camera collide with bounding boxes of a crate and the ground. Is it possible to do boundingbox to boundingbox collisions without using a physics engine such as cannon.js/oimo? Here's example of my problem: I would like for collision detection to prevent the spaceship from flying into the cube, however now it seems it only seems to collide with a single point located at 0,0,0 of the spaceship. You can see the bounding boxes aren't colliding at all allowing the meshes to overlap. Is it possible to enable bounding box collisions for a mesh rather than a single point? Thanks. P.S. part of my project is about comparison of various WebGL engines, so far BabylonJS leaves a much better impression than Three.JS for me Wingnut 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 19, 2015 Share Posted July 19, 2015 Hello! I think that you just need mesh.intersectsMesh:) this function does not use physics engine and only uses bounding boxes detection: http://playground.babylonjs.com/?10 jerome 1 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.