You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by feiniao5643 July 20, 2022
First of all, please forgive me for my bad English.
I'll skip the usual preliminaries and come straight to the point.
I use this API in initGame,It's normal. @Override protected void initGame() { camera3D = FXGL.getGameScene().getCamera3D(); FXGL.getGameWorld().addEntityFactory(new GameEntityFactory()); camera3D.setMoveSpeed(500); camera3D.getTransform().setZ(-200); camera3D.getTransform().setAngle(30); **FXGL.getGameScene().setFPSCamera(true);** FXGL.spawn("铁骑兵",0,0,0); }
But I can't use it in mouse events.
`FXGL.getInput().addAction(new UserAction("Mouse Turn") { @OverRide
protected void onActionBegin() {
FXGL.getGameScene().setFPSCamera(true);
}
Finally, the function I want to achieve is that when the right mouse button is pressed, the camera moves with the mouse, and the camera is fixed after release.
The text was updated successfully, but these errors were encountered:
Discussed in #1185
Originally posted by feiniao5643 July 20, 2022
First of all, please forgive me for my bad English.
I'll skip the usual preliminaries and come straight to the point.
I use this API in initGame,It's normal.
@Override protected void initGame() { camera3D = FXGL.getGameScene().getCamera3D(); FXGL.getGameWorld().addEntityFactory(new GameEntityFactory()); camera3D.setMoveSpeed(500); camera3D.getTransform().setZ(-200); camera3D.getTransform().setAngle(30); **FXGL.getGameScene().setFPSCamera(true);** FXGL.spawn("铁骑兵",0,0,0); }
But I can't use it in mouse events.
`FXGL.getInput().addAction(new UserAction("Mouse Turn") {
@OverRide
protected void onActionBegin() {
FXGL.getGameScene().setFPSCamera(true);
}
Finally, the function I want to achieve is that when the right mouse button is pressed, the camera moves with the mouse, and the camera is fixed after release.
The text was updated successfully, but these errors were encountered: