csganja Posted March 8, 2017 Share Posted March 8, 2017 Any reason why the intersectsMesh is triggered on the red line area and not on the green line (as would be normal i guess)? Just using a simple code, nothing fancy... No physics engine... // skillMesh - fireball thing // m - monster scene.registerBeforeRender(function() { if (skillMesh.intersectsMesh(m, false)) { // do your job [call hit(), unregister this e.t.c.] console.log("hit"); } else { // set skillMesh.position } } Edit1: Played a bit more and rotated the mesh, the collision area is still in the back of monster, Could be a mesh problem? Edit.2 Replaced my monster with a sphere and collision works fine, i can't see the problem on my mesh... Edit3: Solved, i have no idea how this helped but i change the rest pose and it's fine now Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 9, 2017 Share Posted March 9, 2017 Hey, it is always interesting to display bounding boxes in this case (mesh.showBoundingBox = true). The intersection check is also done on the rest pose only (as the bones are only computed on GPU side). 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.