Greetings, fine fellows!(And ladies)
My character is currently using a rigidbody, which works out very nicely, aside from collision issues where you can force your way through walls and whatnot.
The solution I’m considering for this is to have a ray fired in front of the character and one fired behind the character, which will check for walls on either side. The issue I’m experiencing with this is that, when doing the ray firing behind the player using a negative direction like so:
if(Physics.Raycast(transform.position, -transform.right, 1))
or
if(Physics.Raycast(transform.position, -Vector3.right, 1))
etc.
It will always return that it’s hitting something whenever the distance is greater than .02 (Which is far too short to be useful in my case)
Any insight on the issue?