Package de.coreengine.system.gameObjects
Class TPCamera
- java.lang.Object
-
- de.coreengine.system.GameObject
-
- de.coreengine.system.gameObjects.TPCamera
-
public class TPCamera extends GameObject
Tird person camera game object- Author:
- Darius Dinger
-
-
Field Summary
-
Fields inherited from class de.coreengine.system.GameObject
parent
-
-
Constructor Summary
Constructors Constructor Description TPCamera()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Camera
getCamera()
javax.vecmath.Vector3f
getTarget()
void
onRender()
In this method the GameObject gets rendered onto the screen (if it has an graphical representation).void
onUpdate()
This method gets called every frame before the render method.void
setDistance(float distance)
Setting distance of the third person camera to the targetvoid
setPitch(float pitch)
Setting pitch of the third person camera over the targetvoid
setRotation(float rotation)
Setting rotation of the third person camera around the target-
Methods inherited from class de.coreengine.system.GameObject
addActionToPhysicWorld, addChild, addRigidBodyToWorld, getScene, onAdd, onInit, onLoad, onPauseUpdate, onRemove, onSave, onSyncronize, removeChild, setShouldRender, setShouldSyncronize, setShouldUpdate
-
-
-
-
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 classGameObject
-
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 classGameObject
-
getTarget
public javax.vecmath.Vector3f getTarget()
- Returns:
- Read/writeable vector of the target to look at
-
-