- Home /
Other
Change the direction of ScreenPointToRay() Ray
I have been using Camera.ScreenPointToRay() for so long and I wonder..how do I change the direction of the casted ray?
example:
I know that I can use Ray (origin, direction) but, using this method the raycaster sometimes can clip through other objects.
Answer by AshwinTheGammer · Sep 23, 2017 at 05:27 AM
You couldnot change the direction of casted ray, ray always cast from Z axis so change the position of Z axis and write a code for it and yes i don`t understand your question clearly clarify your question more.
Follow this Question
Related Questions
Vector3.Movetoward. Why does this work? 0 Answers
AI Shooting for Aircraft 1 Answer
Multiple Cars not working 1 Answer
How to raycast from mouse position in scene view? 1 Answer
using A* pathfinding to go to player after raycast has seen it - c# 0 Answers