Hello, I have an annoying problem and I seached everywhre but couldn’t find the solution.
I need t ochange the origin point of a raycast, I defined localOffset for it and I did exactly like all solutions that are supposed to work, but it is just not working:
All it does is change the direction of the ray, the origin however still stays at the origin of the game object (player character in this case, which is far too low).
So now the ray goes forward and up a bit.
I want to cast from about middle height (0.5).
var localOffset = transform.position + transform.up * 0.5;
var hitCollision : RaycastHit;
var CollisionCheckRange : int = 1.1;
if (Physics.Raycast (localOffset, transform.forward, hitCollision, CollisionCheckRange))