Anteworld - Outerra Game > JavaScript development

water paticle spray without light flash ?


For my rowboat I'd like to add watersplashes but I found that using the explosions interface create_solid_particle method there allways seem to be associated a light flash. How can I get rid of this light flash ?
I couldn't figure out how to do it  even adding also the float4& hcolor vector whatever values I had set for this last vector. That's quite annoying as you can see in the screenshot   :-[

--- Code: ---this.explosions.create_solid_particles(
            ecef_water_particles,   //@param pos ECEF world position
            this.norm,             //@param norm smoke ejection direction
            0.15,                    //@param emitter_radius radius
            0.05,                 //@param particle_radius max particle radius
            3,                 //@param speed ejection speed
            0.4,              //@param spread direction dissipation
            1.2,               //@param highlight 0:solid, 1+:water spray
            0,                  //@param age age in seconds at t
            { x: 1.2, y: 1.2, z: 1.2 }, 0);  //@param bcolor base particle color       
--- End code ---

If it is not possible to disable or regulate light intensity in the explosion particle command is there another way (evtl through plugin) to access these particle effects bypassing the light flash ? Of course i could create spawning an throwing myself lots of white sphere "vehicles" and destroy them after a certain age..but that seems too crazy an idea even for me  =|

It's not possible, but there may be a stupid workaround - seems the light is not created if the world is paused. So if you call pause(true, false) on the world before creating the explosion and then restore it back with pause(false, false) maybe you get what you need :D

woaah ! it works ! Thank you so much for this rapid solution !  :)

--- Code: ---world.pause(true,false);
                    ecef_tail_wake,   //@param pos ECEF world position
                     direc2,             //@param norm smoke ejection direction
                    0.1*0.05*velocity,                    //@param emitter_radius radius
                    0.03,                 //@param particle_radius max particle radius
                    0.5*Math.pow(velocity,1.2),                 //@param speed ejection speed
                    0.1,              //@param spread direction dissipation
                    1,               //@param highlight 0:solid, 1+:water spray
                    0,                  //@param age age in seconds at t
                    { x: 1, y: 1, z:1 },{ x: 0, y: 0, z: 0, w:0 });  //@param bcolor base particle color
--- End code ---


[0] Message Index

Go to full version