I want calculate the distance from object A to object B and assign a property(float) to the distance accordingly. Being new to python this is what I came up with:
controller = bge.logic.getCurrentController()
Ray = controller.sensors
Distance = ray.hitPosition
propertyActuator = controller.actuators
propertyActuator.value = str(Distance)
Why is it not working? Can I do it differently?
Thanks for anwsering