Djinni Wiki

function SetCameraFacing (float fDirection, float fDistance = -1.0f, float fPitch = -1.0, int nTransitionType=CAMERA_TRANSITION_TYPE_SNAP, int nSmoothTransition=0)

Change the direction in which the camera is facing

  • fDirection: is expressed as anticlockwise degrees from Due East. (0.0f=East, 90.0f=North, 180.0f=West, 270.0f=South) A value of -1.0f for any parameter will be ignored and instead it will use the current camera value. This can be used to change the way the camera is facing after the player emerges from an area transition.
  • nTransitionType: CAMERA_TRANSITION_TYPE_* SNAP will immediately move the camera to the new position, while the other types will result in the camera moving gradually into position
  • nSmoothTransition: if 0 linear interpolation will be used, if 1 - camera will accelerate and decelarate.

  • Return type: void
  • Include file: nwscriptdefn