if you have two entities moving at a given speed, and any given angle, and then they collide. What is the quickest way to determine if entity1 is in front of, or behind entity2?
I could use entitypick and see if entity2 is picked or not
or I could position a pivot at the entity1 position, match its rotation, then moveentity 0,0,1. Then see if the pivot is closer to the entity2 than entity1 is. if it is then entity2 is in front of entity1. However that seems very hacked, and the pick method seems slow. any other ideas?
I could use entitypick and see if entity2 is picked or not
or I could position a pivot at the entity1 position, match its rotation, then moveentity 0,0,1. Then see if the pivot is closer to the entity2 than entity1 is. if it is then entity2 is in front of entity1. However that seems very hacked, and the pick method seems slow. any other ideas?