Water surface explosions
by Ronald J Nelson · in Torque Game Engine · 11/24/2007 (11:28 pm) · 4 replies
I have seen this with some of the standard water emitters I have found around but have yet figured out how they did it. I am talking about having ripple emitters on the surface of the water. I wanted to find out how it is done so my bullets that hit the water actually have the splash at the surface of the water as they should be.
Can someone tell me what setting this is?
Can someone tell me what setting this is?
#2
32ms is far too long to catch a realistic bullet-speed projectile hitting the water's surface. Hitting an object works fine because it accurately catches the point of impact using raycasts, but projectiles don't actually collide with the water.
12/07/2007 (10:20 pm)
If you absolutely must have accurate bullet splashes, I recommend bypassing the standard projectile setup and simply casting rays in the bullet's vector. If you hit water, do the splash at that location and continue the raycast from that point. Note that most real bullets don't survive the impact with water, and will only be harmful for a few feet beyond the point of impact.32ms is far too long to catch a realistic bullet-speed projectile hitting the water's surface. Hitting an object works fine because it accurately catches the point of impact using raycasts, but projectiles don't actually collide with the water.
#3
12/08/2007 (4:24 pm)
Thanks Henry, I knew I could do it that way and now have, I was just hoping there was already something in script that would have done it properly.
#4
Anyway, just put in a blank particle emitter/water emitter, ie ones that never make any particles, and the splashes should work fine.
There may have been an unrelated bug in older versions of TGE which did cause velocity-related splash misses, but I don't have a copy of 1.3 anymore to compare. Severe network overflow will still cause splashes and other projectile effects to not appear as projectiles won't be ghosting correctly at all.
12/10/2007 (3:35 am)
Actually looks like the code works perfectly. I spent a few minutes exploring the idea that it was a resolution issue caused by the high projectile speed, but projectile::emitParticles does all the correct raycasting stuff. When I was putting some debug console output I noticed that splashes only get set off if your projectile has both a "particleEmitter" and "particleWaterEmitter." Since you generally blank out the projectile's emitter for bullets, the splashes never happen.Anyway, just put in a blank particle emitter/water emitter, ie ones that never make any particles, and the splashes should work fine.
There may have been an unrelated bug in older versions of TGE which did cause velocity-related splash misses, but I don't have a copy of 1.3 anymore to compare. Severe network overflow will still cause splashes and other projectile effects to not appear as projectiles won't be ghosting correctly at all.
Torque Owner Edward Smith
Silencersoft
and in the projectile datablock:
splash = CrossbowSplash;
However I remember noticing that if you have a projectile that travels very quickly is that it won't always show the splash.
But a slower moving one such as the crossbow will reproduce it each time, also the depth of water is important for this effect.