Definition
double GetDistanceBetweenPhysicsCameraAndCharacterController()
Description
This function returns the distance between physics character controller and third person physics camera attached to the physics character controller.
Return Value
Distance between physics character controller and third person physics camera attached to the physics character controller.
Example
distance = 0.0 function Init() distance = GetDistanceBetweenPhysicsCameraAndCharacterController() message = string.format("\nDistance between physics camera and main character is : %.2f" ,distance) PrintConsole(message) end function Update() end
In this example, the GetDistanceBetweenPhysicsCameraAndCharacterController function returns the distance between physics character controller and third person physics camera attached to the physics character controller. Then distance value is displayed on the console by the PrintConsole function.
GetDistanceBetweenPhysicsCameraAndCharacterController