Archive 17/01/2023.

Line tracers for raycasts?

burt

I’m trying to reproduce the following technique:

Based on the Urho docs, the only thing I found was the DebugRenderer AddLine function. But I’m pretty sure I’m not supposed to use that for an in-game feature. Does anyone have any suggestion on how to properly render lines on top of a raycast?

Modanung

You could use a BillboardSet for the bullets with the FaceCameraMode set to FC_DIRECTION. There’s a sample demonstrating its use.
A single raycast is instant, so you’d have to add an artificial delay in that case.

johnnycable

Or paint them lines with particles

Modanung

I think that technically comes down to the same with part of the desired control for this situation replaced by unneeded features.

Eugene

I had some prototypes, check this:


It looks quite close to what you’ve shown in video