Riebart / diana

A proof-of-concept open-source clone of Artemis with realistic physics and decoupled multiplayer capacity.
1 stars 0 forks source link

Beam tick early rejection of objects based on if object is in front of the wavefront #39

Open Riebart opened 1 year ago

Riebart commented 1 year ago

https://github.com/Riebart/diana/blob/master/unisim/unisim/lib/physics.cpp#L860

This early rejection should occur if neither object position (start or end of tick) passes:

(obj_position - beam->front_position).dot(beam->forward) > 0

If no objects are in front of the beam, we can probably expire it? Or wait? What if we want to launch a beam out to into space, and them jump in front of it, or launch it to where a ship will be, but none currently is?