- Home /
Question by
unity_zF2phGzgTkZpSQ · May 02, 2021 at 04:54 AM ·
raycastingoffset
Raycast offset on character causes issues.
I need to raycast to a wall for my character and the issue is that whenever i cast it instead of rotating around the object origin it rotates around its own origin, how would i fix this?
heres a drawray to show what im trying to do
private Vector3 rayOffset = new Vector3(0.1f, 0 , 0); Debug.DrawRay(transform.position + rayOffset, facing.TransformDirection(Vector3.right) wallCastOffset 2, Color.green);
Comment