Game Development Community

Projectiles Not Rendering At Close Range

by Nicolai Dutka · in Torque Game Engine Advanced · 08/19/2009 (4:35 pm) · 3 replies

Whenever I fire a weapon at point-blank range to anything (terrain, TS Static, StaticShape, etc), I see the 'light' for the projectile, but I don't see the projectile... It just looks like a light flying across the ground...

#1
08/19/2009 (8:17 pm)
It's a known thing with how the engine works, basically because the fire mouse click gets create on the client, sent to the server, the server processes and then creates the projectile which is ghosted to the client with the time taken for that to happen if you're too close to an object or your projectiles have a very high velocity you get the effect of it not appears to fire.

#2
08/20/2009 (12:24 pm)
If you do a search for high speed projectiles you can find a lot of info on this. I think the most promising solution seems to be to create the projectile and then either delay it a few ticks, or create it before it's needed - i.e. have it sitting in the barrel until you send the signal to actually fire it. (Okay, that second suggestion was mine. It works on the same principle of giving the client enough time to catch up to the server simulation.)
#3
08/21/2009 (12:23 pm)
Client-side creation of projectiles is the best solution, but it depends on how accurate you want your simulation to be. It worked for HalfLife and all the mods it spawned, so I found it alright.