Having Physics.Raycast rotate with the gameObject

I am having issues with trying to get the Raycasts to rotate with the gameObject they are casting from. They basically just need to cast at an 180 and 90 degree angle and rotate with the gameobject.

Any advice would be highly appreciated, thanks.

Raycasts use a point and a direction (or else a Ray, which is built using a point and a direction.) I assume you can find the point – all you need is the direction.

transform.forward, transform.right and so on, give you the local directions from yourself. So Physics.Raycast(transform.position + Vector3.up, transform,forward); does a raycast starting 1 unit above you, the way you are looking.

The get angles, can use tricks like transform.forward - transform.right*0.2f (aims at a point a little left of you.)

Why cant i see the rest of the answer from Owen Reynolds when i press the more button?