Jump to content

[SOLVED] Problem with WorldTrigger


Recommended Posts

Hi,

I have a particle system representing fire, and a child worldtrigger object. I want to extinguish fire using another particle system (representing water). I have defined a callback function using WorldTrigger::setEnterCallbackName() as follows:


void fireWaterContactCallback(Node argNode, WorldTrigger argTrigger)
{
Node parentFire = argTrigger.getParent();
engine.editor.removeNode(parentFire);
engine.editor.removeNode(argTrigger);
}

I have two problems with this approach. One is I can not detect whether a water particle has penetrated the trigger (and don't know why, I tried using physical masks and all). The other problem is when a shape enters the zone, the fire does get extinguished, but the player view instantly jumps to a random orientation (that is, when I attack the fire with my car, I end up looking at the sky). Do you have any idea why this might happen?

Here is a video:



Edit: The camera jumps started to happen randomly, even when there is no collision. 
Link to comment

I'll try that for collision yingaz, thanks. 

 

This is my project data folder (for camera jump problem): https://www.dropbox.com/s/8k2o6ranjmeozpl/data_folder__camera_jump_problem.rar

 

Edit: Do you have any other suggestions for fire extinguishing, by the way? The particles appear to have "intersecting" property, so I'm guessing they do participate in collision detection. A billboard particle system with intersecting property could do the job, all I want is a dummy collider shape associated with the fire, and a callback function to be called when a water particle enters the collider. At a first glance, I had the impression that ObjectMeshCluster might be unnecessarily expensive for the job, as it takes a mesh and shape just to detect intersection. But still, I'm guessing it will do the job fine in case there are no alternatives.

Link to comment

Hi,
 

This is my project data folder (for camera jump problem): https://www.dropbox....ump_problem.ra


Thank you for test scene, but there is no fire and no plane mesh in this scene, so we can't get it work correctly. Could you please provide full version, which is shown on your video?

Thank you!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

Camera jump problem stopped when I created a C++ API project from scratch and copied the scripts into it. Still don't understand why it randomly jumps upon contact in the previous project. I use the same objects and same scripts in the new one. 

Link to comment

Your call  :) But still, cause of this problem better be found for -if nothing else- future reference I think. Could you reproduce the problem by the way?

Link to comment
×
×
  • Create New...