When I Try To Use Raycast 2D I Get An Error Saying That Whats In The Title Heres A Part Of Code: RaycastHit2D hit; Ray2D groundRay = new Ray2D(transform.position, Vector3.down); if(Physics2D.Raycast(groundRay, out hit, 0.1f, groundMask)
The issue you are having is exactly what the error message is saying - you are trying to pass a Ray2D, your variable named “groundRay”, to the Physics2D.Raycast method that is expecting a Vector2.
Instead of passing a Ray2D as you are here:
if(Physics2D.Raycast(groundRay, out hit, 0.1f, groundMask)
Pass a Vector2 instead like so:
if(Physics2D.Raycast(transform.position, out hit, 0.1f, groundMask)
It looks to me that based off what you are passing to the method, you are confusing Raycast2D with Raycast. I would suggest making sure you take time to read up on the two and make sure you are using the correct one.