gryff Posted August 14, 2014 Share Posted August 14, 2014 As I continue to experiment with the Action Manager (thanks to inspiration I got from a Temechon tutorial) I have been looking at mesh intersection. There are two triggers available with the Action Manager BABYLON.ActionManager.OnIntersectionEnterTrigger: Raised when the mesh is in intersection with another mesh. Raised just once and BABYLON.ActionManager.OnIntersectionExitTrigger: Raised when the mesh is no more in intersection with another mesh. Raised just once Looking at the older way of doing intersecting meshes (in the playground tutorial) there is a parameter that can be changed "precise", that can be set to true or false, that defines the mesh bounding box to be used. So the questions that popped into my mind were: 1. What level of precision do the Action Manager triggers use?2. Can the level of precision be set in someway for these triggers? cheers, gryff Quote Link to comment Share on other sites More sharing options...
Temechon Posted August 14, 2014 Share Posted August 14, 2014 Hey gryff, I just looked in the source code of babylon v1.14 (but i assume it's the same for the v1.13). It's in the method Scene.prototype._checkIntersections : if (action.trigger == BABYLON.ActionManager.OnIntersectionEnterTrigger || action.trigger == BABYLON.ActionManager.OnIntersectionExitTrigger) { var otherMesh = action.getTriggerParameter(); var areIntersecting = otherMesh.intersectsMesh(sourceMesh, false); // other things....}You can see the parameter precise is set to false, and there is no way (right now) to set it in the trigger. Cheers gryff 1 Quote Link to comment Share on other sites More sharing options...
gryff Posted August 15, 2014 Author Share Posted August 15, 2014 You can see the parameter precise is set to false, and there is no way (right now) to set it in the trigger. TY Temechon. Somehow I had a feeling that those would be the probable answers cheers, gryff Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 15, 2014 Share Posted August 15, 2014 I'm ok if you want to submit a Pull Request to change this (the precision paramater) to a global variable defined on the scene 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.