Jump to content

Action Manager and Mesh Intersection


Recommended Posts

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




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



Link to comment
Share on other sites

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

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.

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.


  • Recently Browsing   0 members

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