Book Image

jMonkeyEngine 3.0 : Beginner's Guide

Book Image

jMonkeyEngine 3.0 : Beginner's Guide

Overview of this book

jMonkeyEngine 3.0 is a powerful set of free Java libraries that allows you to unlock your imagination, create 3D games and stunning graphics. Using jMonkeyEngine's library of time-tested methods, this book will allow you to unlock its potential and make the creation of beautiful interactive 3D environments a breeze."jMonkeyEngine 3.0 Beginner's Guide" teaches aspiring game developers how to build modern 3D games with Java. This primer on 3D programming is packed with best practices, tips and tricks and loads of example code. Progressing from elementary concepts to advanced effects, budding game developers will have their first game up and running by the end of this book.From basic concepts and project creation to building a complex 3D Game, you will learn to layout 3D scenes, make them interactive and add various multi-media effects.You will find answers to common questions including best practices and approaches, how game characters can act and interact, how to simulate solid walls and physical forces, how to take it online to play over a network and much more.From Zero to Hero, start your journey to make your game idea a reality.
Table of Contents (20 chapters)
jMonkeyEngine 3.0 Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Key input triggers


The following key input triggers are available:

Mouse

The following mouse triggers are available:

Trigger

Code

Mouse button: Left click

MouseButtonTrigger(MouseInput.BUTTON_LEFT)

Mouse button: Right click

MouseButtonTrigger(MouseInput.BUTTON_RIGHT)

Mouse button: Middle click

MouseButtonTrigger(MouseInput.BUTTON_MIDDLE)

Mouse movement: Right

MouseAxisTrigger(MouseInput.AXIS_X, true)

Mouse movement: Left

MouseAxisTrigger(MouseInput.AXIS_X, false)

Mouse movement: Up

MouseAxisTrigger(MouseInput.AXIS_Y, true)

Mouse movement: Down

MouseAxisTrigger(MouseInput.AXIS_Y, false)

Mouse wheel: Up

MouseAxisTrigger(MouseInput.AXIS_WHEEL,

false)

Mouse wheel: Down

MouseAxisTrigger(MouseInput.AXIS_WHEEL,true)

Keyboard

The following key triggers are available:

Trigger

Code

NumPad: 1, 2, 3, …

KeyTrigger(KeyInput.KEY_NUMPAD1) …

Keyboard: 1, 2 , 3, …

KeyTrigger(KeyInput.KEY_1) …

Keyboard: A, B, C, …

KeyTrigger(KeyInput.KEY_A) …

Keyboard: Space bar

KeyTrigger(KeyInput.KEY_SPACE)

Keyboard: Shift

KeyTrigger(KeyInput.KEY_RSHIFT),

KeyTrigger(KeyInput.KEY_LSHIFT)

Keyboard: F1, F2, …

KeyTrigger(KeyInput.KEY_F1) …

Keyboard: Return/Enter

KeyTrigger(KeyInput.KEY_RETURN),

KeyTrigger(KeyInput.KEY_NUMPADENTER)

Keyboard: PageUp and PageDown

KeyTrigger(KeyInput.KEY_PGUP),

KeyTrigger(KeyInput.KEY_PGDN)

Keyboard: Delete and Backspace

KeyTrigger(KeyInput.KEY_BACK),

KeyTrigger(KeyInput.KEY_DELETE)

Keyboard: Esc

KeyTrigger(KeyInput.KEY_ESCAPE)

Keyboard: Arrows

KeyTrigger(KeyInput.KEY_DOWN),

KeyTrigger(KeyInput.KEY_UP)

KeyTrigger(KeyInput.KEY_LEFT),

KeyTrigger(KeyInput.KEY_RIGHT)

Joystick

The following joystick triggers are available:

Trigger

Code

Joystick buttons

JoyButtonTrigger(0, JoyInput.AXIS_POV_X),

JoyButtonTrigger(0, JoyInput.AXIS_POV_Y)

Joystick movement: Right

JoyAxisTrigger(0, JoyInput.AXIS_POV_X, true)

Joystick movement: Left

JoyAxisTrigger(0, JoyInput.AXIS_POV_X, false)

Joystick movement: Forward

JoyAxisTrigger(0, JoyInput.AXIS_POV_Z, true)

Joystick movement: Backward

JoyAxisTrigger(0, JoyInput.AXIS_POV_Z, false)

You can find the most current trigger list at http://jmonkeyengine.org/wiki/doku.php/jme3:advanced:input_handling.