ScriptReference/Collider.ClosestPoint #292
Replies: 4 comments 1 reply
-
|
The position parameter is returned if it is inside of the collider. |
Beta Was this translation helpful? Give feedback.
-
|
This will return the original Vector3 position when using a Terrain Collider :/ |
Beta Was this translation helpful? Give feedback.
-
|
This function always returns the passed in Vector3 if the collider is disabled or the gameObject not activeInHierarchy! |
Beta Was this translation helpful? Give feedback.
-
|
This is what you get when you try to use it on MeshCollider: Physics.ClosestPoint can only be used with a BoxCollider, SphereCollider, CapsuleCollider and a convex MeshCollider. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
ScriptReference/Collider.ClosestPoint
https://docs.unity3d.com/ScriptReference/Collider.ClosestPoint.html
Beta Was this translation helpful? Give feedback.
All reactions