Advertisement
Deozaan

Unity3D Cone Collision Detection

May 18th, 2012
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.23 KB | None | 0 0
  1. /*
  2. * What is the best way to project a cone forward?
  3. * And check if something is inside that cone ahead of the player?
  4. */
  5.  
  6. if (Vector3.Angle(transform.forward, target.transform.position - transform.position) < coneHalfAngle) {
  7.  
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement