- Home /
 
               Question by 
               CMDR_Garbage · May 24, 2019 at 12:41 AM · 
                unity 5rotation3dposition  
              
 
              [Unity 3D] How to detect if the game object is left right from the player?
So i have this code which does about 50% of the job:
if (enemy.transform.position.x > player.transform.position.x) { if (waitTime == 0) { Debug.Log("LEFT"); FireGunsLeft(); } } else { if (waitTime == 0) { Debug.Log("RIGHT"); FireGunsRight(); } }
The only problem is, is that the Debug.Log("LEFT ") will always return while i need it to go silent when it's actually right. Any ideas?
               Comment
              
 
               
              Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                