本文整理汇总了Java中org.lwjgl.input.Mouse.getDY方法的典型用法代码示例。如果您正苦于以下问题:Java Mouse.getDY方法的具体用法?Java Mouse.getDY怎么用?Java Mouse.getDY使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.lwjgl.input.Mouse
的用法示例。
在下文中一共展示了Mouse.getDY方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: calculateFPMovement
import org.lwjgl.input.Mouse; //导入方法依赖的package包/类
/**
* Calculates first person movement
*/
private void calculateFPMovement() {
this.yaw = 180 - player.getRotation().y;
if (Mouse.isButtonDown(1)) {
float angleChange = Mouse.getDX() * 0.3f;
yaw += angleChange;
float pitchChange = Mouse.getDY() * 0.2f;
pitch -= pitchChange;
if (pitch > 90)
pitch = 90;
}
player.setRotation(new Vector3f(0, 180 - yaw, 0));
}
示例2: calculatePitch
import org.lwjgl.input.Mouse; //导入方法依赖的package包/类
/**
* Calculate the pitch and change the pitch if the user is moving the mouse
* up or down with the LMB pressed.
*/
private void calculatePitch() {
if (Mouse.isButtonDown(0)) {
float pitchChange = Mouse.getDY() * PITCH_SENSITIVITY;
pitch.increaseTarget(-pitchChange);
clampPitch();
}
pitch.update(1f / 60);
}
示例3: calculatePitch
import org.lwjgl.input.Mouse; //导入方法依赖的package包/类
private void calculatePitch() {
if (Mouse.isButtonDown(1)) {
float pitchChange = Mouse.getDY() * 0.1f;
pitch -= pitchChange;
if (pitch > 90)
pitch = 90;
}
}
示例4: calculatePitch
import org.lwjgl.input.Mouse; //导入方法依赖的package包/类
/**
* Calculate the pitch and change the pitch if the user is moving the mouse
* up or down with the LMB pressed.
*/
private void calculatePitch() {
if (Mouse.isButtonDown(0)) {
float pitchChange = Mouse.getDY() * PITCH_SENSITIVITY;
pitch.increaseTarget(-pitchChange);
clampPitch();
}
pitch.update(DisplayManager.getFrameTime());
}
示例5: calculatePitch
import org.lwjgl.input.Mouse; //导入方法依赖的package包/类
/**
* Calculate the pitch and change the pitch if the user is moving the mouse
* up or down with the LMB pressed.
*/
private void calculatePitch() {
if (Mouse.isButtonDown(0) && !Keyboard.isKeyDown(Keyboard.KEY_LCONTROL)) {
float pitchChange = Mouse.getDY() * PITCH_SENSITIVITY;
pitch.increaseTarget(-pitchChange);
clampPitch();
}
pitch.update(1f / 60);
}
示例6: calculatePitch
import org.lwjgl.input.Mouse; //导入方法依赖的package包/类
private void calculatePitch(){
if(Mouse.isButtonDown(1)){
float pitchChange = Mouse.getDY() * 0.2f;
pitch -= pitchChange;
if(pitch < 0f){
pitch =0f;
}else if(pitch > 90){
pitch = 90;
}
}
}
示例7: mouseXYChange
import org.lwjgl.input.Mouse; //导入方法依赖的package包/类
public void mouseXYChange()
{
this.deltaX = Mouse.getDX();
this.deltaY = Mouse.getDY();
}
示例8: calculatePan
import org.lwjgl.input.Mouse; //导入方法依赖的package包/类
private void calculatePan() {
if (Mouse.isButtonDown(0) && Keyboard.isKeyDown(Keyboard.KEY_LCONTROL)) {
cameraPosZ += Mouse.getDY() * -PAN_SENSITIVITY;
cameraPosX += Mouse.getDX() * PAN_SENSITIVITY;
}
}