0
votes

Hi im trying to implement ray casting into my 3d game for many uses

I have read lots of things about ray casting, i know that you need an origin,direction and length, i have these. What im having trouble is with finding which angle to shoot the ray at, and is ray casting the best solution for checking if something is in front of you? I have read somewhere that ray casting is an old and bad technique, if its a bad technique then which other methods would be good for shooting etc..

Thank you

1

1 Answers

1
votes

Depends on your needs. Ray casting is still frequently used for many game related stuff especially physics and collision detection. For the second one you can use continues collision detection which is based on Verlet integration.. But it really depends on what exactly you want to solve..