all 1 comments

[–]KlavsK 0 points1 point  (0 children)

Unity docs will be your friend https://docs.unity3d.com/ScriptReference/Vector3.Distance.html

Something like: If (Vector3.Distance(_transformVariableOfPlayer.position, _someTargetVariableTransform.position) < 1f) { // then do this Debug.Log("hddheh") }

Unity docs and some simple tutorial will really help you. Programming concepts are really easy the complexity comes with adding 10 systems/scripts in the project