Jump to content

Bounding box collisions


skmr
 Share

Recommended Posts

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:

crop.png

 

 

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 :)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...