Plane.Raycast does not exist

This: DOC
or This: DOC

… do not work.

Plane.Raycast does not exist,
This is a simple script, yet one I need:

 Plane my_plane
my_plane = new Plane(Vector3.up, transform.position);
 
if(my_plane.Raycast(ray, out enter)) {
        do something
}

First compile Error because Plane can’t hold 2 arguments second Compile Error because my_plane.Raycast doesn’t exist.

So I gues they got removed or changed in 2019 version? I’ve 2019.2.10f version. So if this doesn’t work anymore what’s the way around?

I’m guessing you have another Plane in your namespace, make sure you’re using UnityEngine.Plane and not something else.

1 Like

I feel so dumb now :open_mouth: I had a script called Plane instead of AirPlane… I totally forgot about namespaces somehow