- Home /
 
               Question by 
               RelayRay · Nov 12, 2020 at 09:17 AM · 
                collisioncollidermousepositionclosest  
              
 
              How to find out what is the closest point on a object?
I want to know the closest point on a brick (from the mouse), like this (image below), where the red dot is the closest point. When I use Collider.ClosestPoint it will only work when I got my mouse on the brick, which I don't want. 
The final goal is to know which half of the brick the mouse is closest to, so you can place a brick next to the existing brick.
I'm using Unity 3d Version 2019.3.0f6
 
                 
                naamloos.png 
                (3.3 kB) 
               
 
              
               Comment
              
 
               
              Your answer
 
 
             Follow this Question
Related Questions
Mouse Movement with physics 1 Answer
Change script to make the object only movable in one direction and add collision 0 Answers
Rigidbody2D with box colliders passing through each other 0 Answers
How to check if two objects collide without a collider 1 Answer
Instantiate 1 object after 2 objects collide. ( C# ) 1 Answer
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                