ramsestom Posted June 14, 2016 Share Posted June 14, 2016 Hi. I need to be able to track when some objects of my scene are in movement (or stopped) and when they collide with a certain type of other objects. How can I achieve that? Is there any movement and collision event listeners already implemented that I can use? Quote Link to comment Share on other sites More sharing options...
Boz Posted June 14, 2016 Share Posted June 14, 2016 Hi, Indeed there is a collision system in BabylonJS, here is the tutorial : http://doc.babylonjs.com/tutorials/Intersect_Collisions_-_mesh You even have a predefined playground you can play with ! http://playground.babylonjs.com/?10 Do not hesitate to go back here if you have any questions about collisions. have fun GameMonetize and dbawel 2 Quote Link to comment Share on other sites More sharing options...
dbawel Posted June 14, 2016 Share Posted June 14, 2016 @ramsestom - I like the answer that @Pouet provided, however if you are asking if there is a way to detect movement within a space devoid of collision objects, then this is a great question and I would like to know this as well. As collisions are an obvious solution, I thought I might clarify what you are asking - otherwise, this is a question in which I would love to know the answer. There are functions to compare changes between frames on a 2D level such as http://www.sw-engineering-candies.com/blog-1/extremely-fast-and-simple-webgl-motion-detector-to-rotate-3d-graphic But perhaps there is a way to use a camera and it's FOV matrix to dectect movement in a single frame? Now this would be interesting and valuable if it exists. DB 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.