(05-30-2014, 02:36 AM)bearbin Wrote: I think that the non ray-sphere method is probably better, as ray tracing is slow and we're not expecting 10000 endermen per player area.Ray tracing is NOT slow. Ray tracing 1920x1080 pixels at 60 frames per second is only difficult because of the sheer amount of traces necessary. Gazillions of sphere intersection calculations can be done per second.
(05-30-2014, 02:58 AM)STR_Warrior Wrote: But isn't that almost the exact thing as what I'm currently doing? I'm checking the difference between two vectors. If the difference is too big then the player is ignored.Yes I think it's pretty much the same, but you're doing the dot product without explicitly doing a dot product Also you need to scale it somehow by the distance, otherwise it won't be perspectively correct.