- Home /
 
               Question by 
               ROM · Feb 10, 2011 at 10:51 PM · 
                rotationjointlimitconfigurable  
              
 
              Limiting physics between two objects
Is it possible to set it so two objects that are both affected by physics are a fixed distance (On a 2D plane) between each other programmatically? I basically want it so they are always 10 units away from each other. They are currently connected by a configurable joint which I can't seem to make work with what I require, I suppose I could do it like this but i'm not sure what to put in the //DoSomething bit:
if(Vector2.Distance(PointA, PointB)<10 || Vector2.Distance(PointA, PointB)>10){
// DoSomething
}
Many thanks in advance!!!
               Comment
              
 
               
              Your answer
 
 
             Follow this Question
Related Questions
Manually computing rotation constrain limits 0 Answers
Keyboard controlled knee. (QWOP mechanic) 1 Answer
Minimum distance on configurable joint? 2 Answers
Configurable joint with asymmetric yMotion limit 0 Answers
Configurable Joint in Script! 1 Answer
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                