- Home /
Why can't compiler find Physics.ClosestPoint or Collider.ClosestPoint?
So according to the documentation these functions exist:
https://docs.unity3d.com/ScriptReference/Physics.ClosestPoint.html https://docs.unity3d.com/ScriptReference/Collider.ClosestPoint.html
However my Unity isn't able to find either of them.
error CS0117: `UnityEngine.Physics' does not contain a definition for `ClosestPoint'
error CS1061: Type `UnityEngine.Collider' does not contain a definition for `ClosestPoint' and no extension method `ClosestPoint' of type `UnityEngine.Collider' could be found. Are you missing an assembly reference?
I tried various usings such as:
using Collider;
using UnityEngine.Collider;
But those aren't namespaces, ect. Idk why that would be necessary since I can use Collider & Physics functions otherwise.
I just updated to 5.5.4f1 and still have the problem.
What is going on?
Answer by revolute · Jun 14, 2017 at 09:05 AM
They don't exist in 5.5.
They exist from 5.6 and above.
Your answer
Follow this Question
Related Questions
Overlap Circle - am I not using it correctly? 0 Answers
2D Collision not working! (child sprites colliders) 1 Answer
Returning list of Triangles, Vertices or Points by raycasting through a mesh (iPhone) 1 Answer
How can i create a character like dragon hill game, Digging underground, what collider should i use? 0 Answers