Sumukh jadhav
Sumukh jadhav

Reputation: 95

Unity: 'Physics' does not contain a definition for 'CheckSphere

This is a part of my code to Ground Check in Unity

bool isGrounded;
void Update()
    {
        isGrounded = Physics.CheckSphere(groundCheck.position, groundDistance, groundMask);
    }

It's showing error "'Physics' does not contain a definition for 'CheckSphere" I checked and Physics does contain CheckSphere

Upvotes: 1

Views: 506

Answers (1)

BrainyXS
BrainyXS

Reputation: 116

Make Sure no other class in your Project ist calles "Physics" and that "Physics" referes to UnityEngine.Physics

Upvotes: 3

Related Questions