|
Alright, back again trying to get layermasks on my raycast to work. My code: //var accuracy : float = .1f; function Update () { This is attached to my camera (Sorry for the extra bits, I was programming for more functionality. There is One companion cube in my world with the layer mask test on layer 9. I have 2 MAJOR problems. 1st: the ray-cast is using 0,0,1 as its target point. Not following the direction. Note: I've tried using transform.TransformDirection (Vector3.forward) and it came up with the same result. It appears to not be taking a direction as using it as a solid point in space. The debug line draws heading in that direction like a compass. 2nd: the debug is spitting back that the ray-cast is in fact touching my companion cube. Which I know is crap, because I've deleted it from the world, and still retained my positive message. Anyone understand this voodoo?
(comments are locked)
|
