ian Posted June 30, 2017 Share Posted June 30, 2017 if we set box1.physicsImpostor do we still have to set box1.checkCollisions = true; or can we remove box1.checkCollisions = true; from code? why we need .checkCollisions = true? Is not box1.physicsImpostor enought to do in code? Why/When we must do .checkCollisions = true for colliders? How .checkCollisions = true actualy works in babylonjs engine ? greetings Ian Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 30, 2017 Share Posted June 30, 2017 physics and collisions are not the same: - Physics is for physic simulation between meshes - Collisions is for collision between FreeCamera and the meshes So no, you don't need checkCollisions ian 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted June 30, 2017 Share Posted June 30, 2017 Hi Ian. For physics engines, .checkCollisions NOT needed. It is for built-into-BJS .ellipsoid-based colliders (on cameras) and also for mesh (for .moveWithCollisions() ) . SOME confusion happened... because of FIRST BJS physics demo. http://www.babylonjs.com/demos/physics/ In there, walls and floor are set .checkCollisions = true. BUT... it is used on floor because camera.applyGravity = true; (keeps camera on the floor). It is used on walls... to keep camera from escaping the play area. Somehow, years later, some people are using .checkCollisions = true ...unnecessarily ...in their physics engine scenes. It is one of the MANY FUN things that happened in the history of BabylonJS. I have remarked-out HUNDREDS of .checkCollisions = true; in forum users' physics playgrounds. It makes me smile each time. People always think "Oh, mesh.checkCollisions = true sounds like a good thing for physicsEngine." But no, it is for simple BJS built-in collider system and .moveWithCollisions. Hope this helps. Could you please add checkCollisions, applyGravity, and moveWithCollisions ...to the tags of your first post, Ian? That would be great. Thanks! Add 'solved', too, if you are satisfied with answer. Oh, DK won race-to-answer! Darnit! ian and GameMonetize 2 Quote Link to comment Share on other sites More sharing options...
ian Posted June 30, 2017 Author Share Posted June 30, 2017 How can I do solved? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted June 30, 2017 Share Posted June 30, 2017 Is there an 8-tag limit? If so, you can change title of your first post... to... [solved] Misunderstand box1.checkCollisions http://www.html5gamedevs.com/forum/28-questions-answers/ First post... Deltakosh has marked 'solved' as a tag. I think he prefers that method. No problems. Quote Link to comment Share on other sites More sharing options...
ian Posted July 1, 2017 Author Share Posted July 1, 2017 [solved] @Deltakosh Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 3, 2017 Share Posted July 3, 2017 http://www.html5gamedevs.com/topic/28008-marking-questions-as-solved/?do=findComment&comment=180468 GameMonetize 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.