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.
↧