Raycast don't rotate with object SOLUTION
Hi, i was stuck in me devgame with the probleme of the raycast that doesnt rotate with the origin object and i find a realy simple solution, just befor your vector direction for me it's "vector_1" just multiply it by "transform.localRotation" it don't work if you put it after the direction vector
Vector3 vector_1 = new Vector3(-0.866f, 0f, 0.5f).normalized;
Debug.DrawRay(transform.position + transform.up * 0.65f, transform.localRotation * vector_1 * 4f,
Color.red);
Comment