Class TPCamera


  • public class TPCamera
    extends GameObject
    Tird person camera game object
    Author:
    Darius Dinger
    • Constructor Detail

      • TPCamera

        public TPCamera()
    • Method Detail

      • onUpdate

        public void onUpdate()
        Description copied from class: GameObject
        This method gets called every frame before the render method. Here is place for the GameObject logic updates, e.g. input handling, physics, actions, ...
        Overrides:
        onUpdate in class GameObject
      • getCamera

        public Camera getCamera()
        Returns:
        Renderable camera of the tp camera
      • setDistance

        public void setDistance​(float distance)
        Setting distance of the third person camera to the target
        Parameters:
        distance - New distance to target
      • setPitch

        public void setPitch​(float pitch)
        Setting pitch of the third person camera over the target
        Parameters:
        pitch - New pitch
      • setRotation

        public void setRotation​(float rotation)
        Setting rotation of the third person camera around the target
        Parameters:
        rotation - New rotation around target
      • onRender

        public void onRender()
        Description copied from class: GameObject
        In this method the GameObject gets rendered onto the screen (if it has an graphical representation). Its primary used for MasterRenderer calls.
        Overrides:
        onRender in class GameObject
      • getTarget

        public javax.vecmath.Vector3f getTarget()
        Returns:
        Read/writeable vector of the target to look at