cem.orsel Posted July 24, 2014 Share Posted July 24, 2014 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
silent Posted July 28, 2014 Share Posted July 28, 2014 Hi, Could you please provide simple test scene for reproduction? Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
azagniy Posted July 28, 2014 Share Posted July 28, 2014 Hi. The WorldTrigger handled objects by bound box. Object particles is a single object and has a single bound box for all particles. You can use ObjectMeshCluster from ObjectParticles in your case then you can handle each object in cluster by world or physical trigger individually. See a "samples/objects/cluster_01" as sample. Link to comment
cem.orsel Posted July 31, 2014 Author Share Posted July 31, 2014 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
silent Posted August 1, 2014 Share Posted August 1, 2014 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: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
cem.orsel Posted August 1, 2014 Author Share Posted August 1, 2014 Sorry, apperantly I've given an absloute path for the terrain file in the .world file. Could you try that again? (I'm not sure why the fire did not appear though, they are invoked in init()). https://www.dropbox.com/s/b9jpdhkjng4qyqk/data_folder__camera_jump_problem_2.rar Link to comment
cem.orsel Posted August 6, 2014 Author Share Posted August 6, 2014 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
silent Posted August 6, 2014 Share Posted August 6, 2014 Hi, So, can we consider issue as solved? How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
cem.orsel Posted August 7, 2014 Author Share Posted August 7, 2014 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
silent Posted August 7, 2014 Share Posted August 7, 2014 Yes, we were able to reproduce this behavior. However, the reason is more likely in some world or player settings, which was changed accidently. We will keep that case in mind and when we will have more spare time we surely will recheck it. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
cem.orsel Posted August 7, 2014 Author Share Posted August 7, 2014 Thanks to you, silent. Link to comment
Recommended Posts