小编14t*_*nch的帖子

Arrow rotating to face cursor needs to only do so while inside an angle made by two given directions

I have a 2d arrow rotating to always face the a target (the target in this case is the cursor), the pivot is my player character. I need to restrict this arrow to only follow the target if it is inside an angle of the player, an example would be 90 degrees, so it would only follow if the cursor is in the top right part of the screen.

I have worked with vector directions and methods such as Vector2D.angle, …

c# angle unity-game-engine

6
推荐指数
1
解决办法
74
查看次数

标签 统计

angle ×1

c# ×1

unity-game-engine ×1