Search the Community
Showing results for tags 'onintersectionentertrigger'.
-
Hi everyone, I am pretty new with babylon.js and have a question about the ActionManager.OnIntersectionEnterTrigger. Is it possible to use this trigger with Rectangle2D in a ScreenSpaceCanvas2D? So what I want to do is to move 2D objects in a ScreenSpaceCanvas2D and trigger a event if two of them overlap on each other. I have already tried several thing but it doesn't seems to work.. Thanks for any feedback
-
In a scene add an ActionManager to a mesh. Register an action triggered by BABYLON.ActionManager.OnIntersectionEnterTrigger serialize the scene try to convert the serialized object to string you will get the following error "Line 46:28 - Converting circular structure to JSON" see playground example http://www.babylonjs-playground.com/#1UTZEV#10 if you comment out line 42 "sphere.actionManager.registerAction(action);" then it works fine. Please check
-
Hello, is it possible to use mesh.actionManager.registerAction(new BABYLON.SetValueAction({ trigger: BABYLON.ActionManager.OnIntersectionEnterTrigger, parameter: otherMesh }, mesh, "scaling", new BABYLON.Vector3(1.2, 1.2, 1.2))); http://http://doc.babylonjs.com/tutorials/How_to_use_Actions without defining the 'otherMesh' at the beginning.So that i get the 'otherMesh' as an object when the trigger fires/ on Intersection? Thanks!
- 1 reply
-
- actionManager
- OnIntersectionEnterTrigger
-
(and 1 more)
Tagged with:
-
I am using the Actions Manager and am trying to use the OnIntersectionEnterTrigger on a (child) mesh that has a parent, but seems to be firing on the parent mesh? Is this the right behavior? The mesh I would like for it to fire on is smaller than the overall parent mesh. Thanks.
-
Hello first post here. I just started coding with babylon 3 days ago and not being a pro with javascript I'm having trouble trying to wrap my head around the action manager. Specifically what I want to do is trigger a predefined function once a mesh is detected inside another mesh. I have a block that progresses across the screen and once it intersects with another block, I want it to simply throw an alert but I have no clue how to construct the action manager for the intersection and launching the function, tho i got the moving part down. [edit] I figured it out. For anyone else who might stumble across this thread and need it var trigger = {trigger:BABYLON.ActionManager.OnIntersectionEnterTrigger, parameter: OBJECT-BEING-ENTERED};var crash = new BABYLON.ExecuteCodeAction(trigger, function() { alert('CRASH!!!!!! BURRRRRRRR EXPLODIE NOISES'); }); OBJECT-DOING-THE-CRASHING.actionManager.registerAction(crash);