I have a plan with a raycast. How can I move the raycast in the plane so that it is not at the center of the object?
One way to do it would be to place the rCast on an empty Object and then pos the empty gObject.
You can raycast from any coordinates you want to. For example, you can use transform.transformPoint to use relative position to your transform.
Vector3 someVector = new Vector3(0, 1, 1);
someVector = transform.transformPoint(someVector); //up and forward from centre of transform
RaycastHit hit;
Physics.Raycast(someVector, Vector3.up, out hit);
Thanks ![]()