pull/12/head
commit
7af779ff49
|
@ -22,6 +22,7 @@
|
|||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
|
||||
.classpath
|
||||
.metadata
|
||||
bin/
|
||||
tmp/
|
||||
|
|
|
@ -122,8 +122,8 @@ public class Ginger
|
|||
|
||||
public void update(GameData data)
|
||||
{
|
||||
data.camera.move();
|
||||
Window.update();
|
||||
data.camera.move();
|
||||
GingerUtils.update();
|
||||
picker.update();
|
||||
ParticleMaster.update(data.camera);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.github.hydos.ginger.engine.cameras;
|
||||
|
||||
import com.github.hydos.ginger.engine.elements.objects.Player;
|
||||
import com.github.hydos.ginger.engine.io.Window;
|
||||
import com.github.hydos.ginger.engine.math.vectors.Vector3f;
|
||||
|
||||
public class FirstPersonCamera extends Camera
|
||||
|
@ -29,12 +30,13 @@ public class FirstPersonCamera extends Camera
|
|||
|
||||
public void move()
|
||||
{
|
||||
|
||||
position.x = player.getPosition().x;
|
||||
position.z = player.getPosition().z;
|
||||
position.y = player.getPosition().y;
|
||||
|
||||
roll = player.getRotX();
|
||||
yaw = -player.getRotY() + 180;
|
||||
pitch = player.getRotZ();
|
||||
yaw = -player.getRotY() + 180 + Window.getNormalizedMouseCoordinates().getX() * 70;
|
||||
pitch = player.getRotZ() + -Window.getNormalizedMouseCoordinates().getY() * 70;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue