Hello,
I’m having a bit of a coding/transform/vector issue, which I can’t my head around.
I’m currently firing a raycast from the direction my object is facing:
Vector3 _dir = transform.TransformDirection(Vector3.forward);
Works fine, but I would like to add in an ‘adjustment’ so I can range between the TransformDirection, and a World Forward (Vector3.forward) - and range between those values:
Vector3 _dir = Vector3.forward;
For example, if I have my ‘adjustment range’ at 0%, the raycast will point only in Vector3.foward World Space, but if I change it to 100%, the raycast will point in the TransformDirection (direction of transform).
Thus, if I have the range at 50% the raycast will be in between the values of Vector3.forward and TransformDirection.
I have no idea how to even code this up though? I can’t get my head around it
A point in the right direction would be much appreciated (no pun intended). Thanks.