Raycast constant v shape in front of player on any rotation

169891-capture.jpg

Hey guys so I need to make a raycast with constant v shape in front of player and so that it raycast horizontally and doesn’t intersect with player(just like in pic 1 but on any rotation, I need to place hands according to those rays).
Problem is that whenever I turn the player rays do not turn with it(I make rays out of the child empty object).
169892-2.jpg

Code:

Physics.Raycast(IKRayOrigin.transform.position + originOffset, -IKRayOrigin.transform.up + leftVector, out L_hit, ledgeScript.grabHeight)

Physics.Raycast(IKRayOrigin.transform.position + originOffset, -IKRayOrigin.transform.up + rightVector, out R_hit, ledgeScript.grabHeight)

Ray Offset values:

left vector: x: -0.47ff y:0f z:0.23

right vector 0.35f,0,0.23

Empty game object(origin local position):
-0.108,2.03,0.366

I’m assuming the blue diamond / cube is attached as a child to the character.

If so a really quick way of getting the right direction out of the blue diamond / cube is to add two empty game objects in turn to it. Orientate those objects transforms so the z-axis (blue) is point the way you want each ray to go. Then use (of those two gameobjects) transform.forward for the ray direction.

I think the should work.