|
@@ -16,7 +16,10 @@ ifdef::env-github,env-browser[:outfilesuffix: .adoc]
|
|
|
|
|
|
Write a Java class that extends link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/app/SimpleApplication.java[com.jme3.app.SimpleApplication].
|
|
|
|
|
|
-*Learn more:* <<jme3/beginner/hello_simpleapplication#,Hello SimpleApplication>>, link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/app/TestAppStateLifeCycle.java[TestAppStateLifeCycle].
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/beginner/hello_simpleapplication#,Hello SimpleApplication>>
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/app/TestAppStateLifeCycle.java[TestAppStateLifeCycle].
|
|
|
|
|
|
|
|
|
=== How do I change the background color?
|
|
@@ -29,23 +32,30 @@ viewPort.setBackgroundColor(ColorRGBA.Blue);
|
|
|
|
|
|
=== Can I customize the SimpleApplication class?
|
|
|
|
|
|
-Yes! Actually, you MUST customize it! For your own games, you always create a custom base class that extends link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/app/SimpleApplication.java[com.jme3.app.SimpleApplication] class. From now on it's no longer a “simple application – it's now your game. Configure your <<jme3/intermediate/appsettings#,application settings>>, implement methods, and customize away!
|
|
|
+Yes! Actually, you MUST customize it! For your own games, you always create a custom base class that extends link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/app/SimpleApplication.java[com.jme3.app.SimpleApplication] class. From now on it's no longer a `simple application` – it's now your game. Configure your <<jme3/intermediate/appsettings#,application settings>>, implement methods, and customize away!
|
|
|
+
|
|
|
+*Learn more:*
|
|
|
|
|
|
-*Learn more:* <<jme3/intermediate/simpleapplication#,SimpleApplication>>, <<jme3/intermediate/appsettings#,AppSettings>>.
|
|
|
+* <<jme3/intermediate/simpleapplication#,SimpleApplication>>
|
|
|
+* <<jme3/intermediate/appsettings#,AppSettings>>.
|
|
|
|
|
|
|
|
|
=== How can I switch between screens or states?
|
|
|
|
|
|
You should break down your application logic into components by spreading it out over individual AppStates. AppStates can be attached to and detached from the game. AppStates have access to all objects (rootNode, PhysicsSpace, inputManager, etc) and methods in your main application. So each AppState can bring its own subset of input handlers, +++<abbr title="Graphical User Interface">GUI</abbr>+++ nodes, spatial nodes, and even its own subset of game mechanics in the update() loop.
|
|
|
|
|
|
-*Learn more:* <<jme3/advanced/application_states#,Application States>>.
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/advanced/application_states#,Application States>>
|
|
|
|
|
|
|
|
|
=== How do I pause/unpause a game?
|
|
|
|
|
|
You split up your application into several AppStates and implement the setEnabled() methods for each state. Then you create, for example, a GameRunningAppState and a GamePausedAppState. GamePausedAppState's job is to attach all your AppStates that contain the logic and +++<abbr title="Graphical User Interface">GUI</abbr>+++ of the pause screen, and to detach all the AppStates that contain logic and +++<abbr title="Graphical User Interface">GUI</abbr>+++ of the running game. GameRunningAppState does the opposite. By attaching one or the other to the game, you switch between the paused and unpaused states.
|
|
|
|
|
|
-*Learn more:* <<jme3/advanced/application_states#,Application States>>.
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/advanced/application_states#,Application States>>
|
|
|
|
|
|
|
|
|
=== How do I disable logger output to the console?
|
|
@@ -64,19 +74,23 @@ For the release, switch the severity level of the default logger to print only S
|
|
|
java.util.logging.Logger.getLogger("").setLevel(Level.SEVERE);
|
|
|
----
|
|
|
|
|
|
-*Learn more:* <<jme3/advanced/logging#,Logging>>.
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/advanced/logging#,Logging>>
|
|
|
|
|
|
|
|
|
=== Why does the executable crash with "Cannot locate resource"?
|
|
|
|
|
|
Make sure to only load() models converted to .j3o binary format, not the original Ogre or Wavefront formats. If you load assets from zip files, make sure to ammend the build script to copy them to the build directory.
|
|
|
|
|
|
-*Learn more:* <<jme3/advanced/asset_manager#,Asset Manager>>
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/advanced/asset_manager#,Asset Manager>>
|
|
|
|
|
|
|
|
|
=== What is java.lang.LinkageError: Version mismatch?
|
|
|
|
|
|
-This rare exception shows a message similar to the following: `Exception in thread “LWJGL Renderer Thread java.lang.LinkageError: Version mismatch: jar version is (number), native library version is (another number)`. jME3 needs native libraries (.dll, .jnilib, lib*.so files) to run LWJGL and jBullet. The correct versions of these libraries are included when you install the SDK or download the binaries. However there are circumstances where jME3 cannot determine which copy of the native library it should use:
|
|
|
+This rare exception shows a message similar to the following: `Exception in thread "LWJGL" Renderer Thread java.lang.LinkageError: Version mismatch: jar version is (number), native library version is (another number)`. jME3 needs native libraries (.dll, .jnilib, lib*.so files) to run LWJGL and jBullet. The correct versions of these libraries are included when you install the SDK or download the binaries. However there are circumstances where jME3 cannot determine which copy of the native library it should use:
|
|
|
|
|
|
.Possible Causes
|
|
|
* If you install another application that needs a different version of a native library, and this app globally installs its version over jME3's.
|
|
@@ -105,7 +119,14 @@ rootNode.attachChild(spatial); // appear in scene
|
|
|
rootNode.detachChild(spatial); // remove from scene
|
|
|
----
|
|
|
|
|
|
-*Learn more:* <<jme3/the_scene_graph#,The Scene Graph>>, <<jme3/beginner/hello_node#,Hello Node>>, <<jme3/beginner/hello_asset#,Hello Asset>>, <<jme3/advanced/spatial#,Spatial>>, link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/scene/Node.java[com.jme3.scene.Node] and link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/scene/Geometry.java[com.jme3.scene.Geometry].
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/the_scene_graph#,The Scene Graph>>
|
|
|
+* <<jme3/beginner/hello_node#,Hello Node>>
|
|
|
+* <<jme3/beginner/hello_asset#,Hello Asset>>
|
|
|
+* <<jme3/advanced/spatial#,Spatial>>
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/scene/Node.java[com.jme3.scene.Node]
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/scene/Geometry.java[com.jme3.scene.Geometry]
|
|
|
|
|
|
|
|
|
=== Why do I get AssetNotFoundException when loading X ?
|
|
@@ -137,17 +158,23 @@ Note that you should not register every single folder containing a texture as th
|
|
|
=== How do I Create 3-D models, textures, sounds?
|
|
|
|
|
|
Follow our best practices for the <<jme3/intermediate/multi-media_asset_pipeline#,multi-media asset pipeline>>. +
|
|
|
-You create 3-D models in a 3-D mesh editor, for example Blender, and export it in Ogre Mesh XML (animated objects, scenes) or Wavefront OBJ format (static objects, scenes).
|
|
|
+You create 3-D models in a 3-D mesh editor, for example Blender, and export it in one of the 3D model <<jme3/features#supported-formats,Supported External File Types>> such as GLTF (animated objects, scenes) or Wavefront OBJ format (static objects, scenes).
|
|
|
You create textures in a graphic editor, for example Gimp, and export them as PNG or JPG.
|
|
|
You create sounds in an audio editor, for example, Audacity, and export them as WAVE or OGG.
|
|
|
|
|
|
-*Learn more:* <<jme3/advanced/3d_models#,3D Models>>, <<jme3/intermediate/multi-media_asset_pipeline#,Multi-Media Asset Pipeline>>, <<sdk/blender#,JME3's blend-to-j3o importer>>; +
|
|
|
-link:http://blender.org[Download Blender], link:http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro[Blender intro tutorial], link:http://www.ogre3d.org/wiki/index.php/Blender_Exporter[Blender-to-Ogre plugin], link:http://en.wikipedia.org/wiki/Comparison_of_3D_computer_graphics_software#Features[Comparison of 3D graphic software features (Wikipedia)].
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/advanced/3d_models#,3D Models>>
|
|
|
+* <<jme3/intermediate/multi-media_asset_pipeline#,Multi-Media Asset Pipeline>>
|
|
|
+* <<jme3/external/blender#,Creating assets in Blender3D>>
|
|
|
+* link:http://blender.org[Download Blender]
|
|
|
+* link:http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro[Blender intro tutorial]
|
|
|
+* link:http://en.wikipedia.org/wiki/Comparison_of_3D_computer_graphics_software#Features[Comparison of 3D graphic software features (Wikipedia)].
|
|
|
|
|
|
|
|
|
=== How do I load a 3-D model into the scene?
|
|
|
|
|
|
-Use the jMonkeyEngine SDK to convert models from Ogre XML or Wavefront OBJ formats to .j3o binary format. Load the .j3o file using the AssetManager.
|
|
|
+Export your model using one of the <<jme3/features#supported-formats,Supported External File Types>> for 3D models. Convert to .j3o binary format. Load the .j3o file using the AssetManager.
|
|
|
|
|
|
[source,java]
|
|
|
----
|
|
@@ -155,15 +182,29 @@ Use the jMonkeyEngine SDK to convert models from Ogre XML or Wavefront OBJ forma
|
|
|
Spatial ninja = assetManager.loadModel("Models/Ninja/Ninja.j3o");
|
|
|
----
|
|
|
|
|
|
-*Learn more:* <<jme3/beginner/hello_asset#,Hello Asset>>, <<jme3/advanced/asset_manager#,Asset Manager>>, link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/asset/AssetManager.java[com.jme3.assets.AssetManager], link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/scene/Geometry.java[com.jme3.scene.Geometry], <<sdk/model_loader_and_viewer#,jMonkeyEngine SDK j3o converter>>, +
|
|
|
-*Code sample:* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/model/TestOgreLoading.java[TestOgreLoading.java], link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/export/TestOgreConvert.java[TestOgreConvert.java].
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/beginner/hello_asset#,Hello Asset>>
|
|
|
+* <<jme3/advanced/asset_manager#,Asset Manager>>
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/asset/AssetManager.java[com.jme3.assets.AssetManager]
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/scene/Geometry.java[com.jme3.scene.Geometry]
|
|
|
+* <<sdk/model_loader_and_viewer#,jMonkeyEngine SDK j3o converter>>
|
|
|
+
|
|
|
+*Code sample:*
|
|
|
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/model/TestOgreLoading.java[TestOgreLoading.java]
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/export/TestOgreConvert.java[TestOgreConvert.java].
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/2124e3e86bf898d6c7a7bc90a191cf639e39bacb/jme3-examples/src/main/java/jme3test/model/TestGltfLoading.java[TestGltfLoading.java]
|
|
|
|
|
|
-=== How do initialize the scene?
|
|
|
+
|
|
|
+=== How to initialize the scene?
|
|
|
|
|
|
Use the simpleInitApp() method in SimpleApplication (or initApp() in Application).
|
|
|
|
|
|
-*Learn more:* <<jme3/beginner/hello_simpleapplication#,Hello SimpleApplication>>, link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/app/SimpleApplication.java[SimpleApplication.java].
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/beginner/hello_simpleapplication#,Hello SimpleApplication>>
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/app/SimpleApplication.java[SimpleApplication.java]
|
|
|
|
|
|
|
|
|
== I want to transform objects in the scene
|
|
@@ -178,15 +219,28 @@ To move or turn or resize a spatial you use transformations. You can concatenate
|
|
|
spatial.setLocalTranslation(1,-3,2.5f); spatial.rotate(0,3.14f,0); spatial.scale(2,2,2);
|
|
|
----
|
|
|
|
|
|
-*Learn more:* <<jme3/beginner/hello_node#,Hello Node>>, <<jme3/advanced/spatial#,Spatial>>, <<jme3/math_for_dummies#,math_for_dummies>>.
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/beginner/hello_node#,Hello Node>>
|
|
|
+* <<jme3/advanced/spatial#,Spatial>>
|
|
|
+* <<jme3/math_for_dummies#,math_for_dummies>>
|
|
|
|
|
|
|
|
|
=== How do I make a spatial move by itself?
|
|
|
|
|
|
Change the geometry's translation (position) live in the update loop using setLocalTranslation() for non-physical and applyForce() or setWalkDirection() for physical objects. You can also define and remote-control a spatial's motion using <<jme3/advanced/cinematics#,Cinematics>>, e.g. to record cutscenes, or to implement mobile platforms, elevators, airships, etc.
|
|
|
|
|
|
-*Learn more:* <<jme3/beginner/hello_main_event_loop#,Hello Loop>>, <<jme3/advanced/update_loop#,Update Loop>>, <<jme3/advanced/custom_controls#,Custom Controls>>, <<jme3/advanced/cinematics#,Cinematics>> +
|
|
|
-*Code sample:* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/material/TestBumpModel.java[TestBumpModel.java], link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/model/TestOgreLoading.java[TestOgreLoading.java]
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/beginner/hello_main_event_loop#,Hello Loop>>
|
|
|
+* <<jme3/advanced/update_loop#,Update Loop>>
|
|
|
+* <<jme3/advanced/custom_controls#,Custom Controls>>
|
|
|
+* <<jme3/advanced/cinematics#,Cinematics>>
|
|
|
+
|
|
|
+*Code sample:*
|
|
|
+
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/material/TestBumpModel.java[TestBumpModel.java]
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/model/TestOgreLoading.java[TestOgreLoading.java]
|
|
|
|
|
|
|
|
|
=== How do I access a named sub-mesh in Model?
|
|
@@ -196,14 +250,18 @@ Change the geometry's translation (position) live in the update loop using setLo
|
|
|
Geometry submesh = (Geometry) model.getChild("door 12");
|
|
|
----
|
|
|
|
|
|
-*Learn more:* <<jme3/advanced/spatial#,Spatial>>
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/advanced/spatial#,Spatial>>
|
|
|
|
|
|
|
|
|
=== How do I make procedural or custom shapes?
|
|
|
|
|
|
You can programmatically create com.jme3.scene.Mesh'es.
|
|
|
|
|
|
-*Learn more:* <<jme3/advanced/custom_meshes#,Custom Meshes>>
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/advanced/custom_meshes#,Custom Meshes>>
|
|
|
|
|
|
|
|
|
== I want to change the surface of objects in the scene
|
|
@@ -247,16 +305,34 @@ material.getTextureParam("DiffuseMap").getTextureValue().setWrap(WrapMode.Repeat
|
|
|
|
|
|
Use the AssetManager to load Materials, and change material settings.
|
|
|
|
|
|
-*Learn more:* <<jme3/beginner/hello_material#,Hello Material>>, <<jme3/intermediate/how_to_use_materials#,How To Use Materials>>, <<jme3/advanced/materials_overview#,Materials Overview>>, <<jme3/advanced/asset_manager#,Asset Manager>>. +
|
|
|
-*Code sample:* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/material/TestNormalMapping.java[TestNormalMapping.java], link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/model/shape/TestSphere.java[TestSphere.java].
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/beginner/hello_material#,Hello Material>>
|
|
|
+* <<jme3/intermediate/how_to_use_materials#,How To Use Materials>>
|
|
|
+* <<jme3/advanced/materials_overview#,Materials Overview>>, <<jme3/advanced/asset_manager#,Asset Manager>>.
|
|
|
+
|
|
|
+*Code sample:*
|
|
|
+
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/material/TestNormalMapping.java[TestNormalMapping.java]
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/model/shape/TestSphere.java[TestSphere.java].
|
|
|
|
|
|
|
|
|
=== How do I make a surface wood, stone, metal, etc?
|
|
|
|
|
|
Create Textures as image files. Use the AssetManager to load a Material and use texture mapping for improved looks.
|
|
|
|
|
|
-*Learn more:* <<jme3/beginner/hello_material#,Hello Material>>, <<jme3/intermediate/how_to_use_materials#,How To Use Materials>>, <<jme3/advanced/materials_overview#,Materials Overview>>, <<jme3/advanced/asset_manager#,Asset Manager>>, link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/asset/AssetManager.java[com.jme3.assets.AssetManager], link:http://wiki.blender.org/index.php/Doc:Manual/Textures/Maps/Bump_and_Normal_Maps[Blender: Creating Bump Maps and Normal Maps] +
|
|
|
-*Code sample:* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/material/TestSimpleBumps.java[TestSimpleBumps.java]
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/beginner/hello_material#,Hello Material>>
|
|
|
+* <<jme3/intermediate/how_to_use_materials#,How To Use Materials>>
|
|
|
+* <<jme3/advanced/materials_overview#,Materials Overview>>
|
|
|
+* <<jme3/advanced/asset_manager#,Asset Manager>>
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/asset/AssetManager.java[com.jme3.assets.AssetManager]
|
|
|
+* link:http://wiki.blender.org/index.php/Doc:Manual/Textures/Maps/Bump_and_Normal_Maps[Blender: Creating Bump Maps and Normal Maps]
|
|
|
+
|
|
|
+*Code sample:*
|
|
|
+
|
|
|
+link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/material/TestSimpleBumps.java[TestSimpleBumps.java]
|
|
|
|
|
|
|
|
|
=== Why are materials too bright, too dark, or flickering?
|
|
@@ -268,8 +344,14 @@ If you use a lit material (based on Lighting.j3md) then you must attach a light
|
|
|
|
|
|
Use com.jme3.shadow.BasicShadowRenderer together with com.jme3.light.DirectionalLight, and setShadowMode().
|
|
|
|
|
|
-*Learn more:* <<jme3/advanced/light_and_shadow#,Light and Shadow>> +
|
|
|
-*Code sample:* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/effect/TestEverything.java[TestEverything.java], link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/light/TestShadow.java[TestShadow.java]
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/advanced/light_and_shadow#,Light and Shadow>>
|
|
|
+
|
|
|
+*Code sample:*
|
|
|
+
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/effect/TestEverything.java[TestEverything.java]
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/light/TestShadow.java[TestShadow.java]
|
|
|
|
|
|
|
|
|
=== How do I make materials transparent?
|
|
@@ -281,7 +363,10 @@ Assign a texture with an alpha channel to a Material and set the Material's blen
|
|
|
material.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);
|
|
|
----
|
|
|
|
|
|
-*Learn more:* <<jme3/beginner/hello_material#,Hello Material>>, <<jme3/intermediate/how_to_use_materials#,How To Use Materials>>,
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/beginner/hello_material#,Hello Material>>
|
|
|
+* <<jme3/intermediate/how_to_use_materials#,How To Use Materials>>
|
|
|
|
|
|
|
|
|
=== How do I force or disable culling?
|
|
@@ -300,7 +385,9 @@ You can also deactivate the `com.jme3.scene.Spatial.CullHint` of a whole spatial
|
|
|
someNode.setCullHint(CullHint.Never);
|
|
|
----
|
|
|
|
|
|
-*Learn more:* <<jme3/advanced/spatial#,Spatial>>
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/advanced/spatial#,Spatial>>
|
|
|
|
|
|
|
|
|
=== Can I draw only an outline of the scene?
|
|
@@ -312,14 +399,18 @@ Add a renders state to the material's and activate `Wireframe`.
|
|
|
material.getAdditionalRenderState().setWireframe(true);
|
|
|
----
|
|
|
|
|
|
-*Learn more:* <<jme3/advanced/debugging#,Debugging>>.
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/advanced/debugging#,Debugging>>.
|
|
|
|
|
|
|
|
|
== I want to control the camera
|
|
|
|
|
|
The default camera `cam` is an instance of the `Camera` class.
|
|
|
|
|
|
-*Learn more:* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/renderer/Camera.java[com.jme3.renderer.Camera]
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/renderer/Camera.java[com.jme3.renderer.Camera]
|
|
|
|
|
|
|
|
|
=== How do I keep the camera from moving?
|
|
@@ -331,8 +422,6 @@ SimpleApplication activates `flyCam` (an instance of `FlyByCamera`) by default.
|
|
|
flyCam.setEnabled(false);
|
|
|
----
|
|
|
|
|
|
-
|
|
|
-
|
|
|
=== How do I switch between third-person and first-person view ?
|
|
|
|
|
|
You can activate the FlyBy Cam as a first-person camera.
|
|
@@ -342,8 +431,13 @@ You can activate the FlyBy Cam as a first-person camera.
|
|
|
flyCam.setEnabled(true);
|
|
|
----
|
|
|
|
|
|
-*Learn more:* <<jme3/beginner/hello_collision#,Hello Collision>>. +
|
|
|
-*Code sample:* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/input/FlyByCamera.java[com.jme3.input.FlyByCamera]
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/beginner/hello_collision#,Hello Collision>>
|
|
|
+
|
|
|
+*Code sample:*
|
|
|
+
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/input/FlyByCamera.java[com.jme3.input.FlyByCamera]
|
|
|
|
|
|
You can also create a third-person chase cam.
|
|
|
|
|
@@ -353,9 +447,13 @@ flyCam.setEnabled(false);
|
|
|
chaseCam = new ChaseCamera(cam, spatial, inputManager);
|
|
|
----
|
|
|
|
|
|
-*Learn more:* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/input/ChaseCamera.java[com.jme3.input.ChaseCamera] +
|
|
|
-*Code sample:* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/input/TestChaseCamera.java[jme3test/input/TestChaseCamera.java].
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/input/ChaseCamera.java[com.jme3.input.ChaseCamera]
|
|
|
+
|
|
|
+*Code sample:*
|
|
|
|
|
|
+link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/input/TestChaseCamera.java[jme3test/input/TestChaseCamera.java]
|
|
|
|
|
|
|
|
|
=== How do I increase camera speed?
|
|
@@ -373,45 +471,88 @@ flyCam.setMoveSpeed(50f);
|
|
|
|
|
|
Use Controls to define the behaviour of types of Spatials. Use Application States to implement global behaviour, to group subsets of input handlers or +++<abbr title="Graphical User Interface">GUI</abbr>+++ screens, etc. Use the `simpleUpdate()` and `update()` loops for tests and interactions. Use Cinematics to remote-control objects in scenes.
|
|
|
|
|
|
-*Learn more:* <<jme3/beginner/hello_main_event_loop#,Hello Loop>>, <<jme3/advanced/update_loop#,Update Loop>>, <<jme3/advanced/custom_controls#,Custom Controls>>, <<jme3/advanced/application_states#,Application States>>, <<jme3/advanced/cinematics#,Cinematics>>
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/beginner/hello_main_event_loop#,Hello Loop>>
|
|
|
+* <<jme3/advanced/update_loop#,Update Loop>>
|
|
|
+* <<jme3/advanced/custom_controls#,Custom Controls>>
|
|
|
+* <<jme3/advanced/application_states#,Application States>>
|
|
|
+* <<jme3/advanced/cinematics#,Cinematics>>
|
|
|
|
|
|
|
|
|
=== How do I let players interact via keyboard?
|
|
|
|
|
|
Use com.jme3.input.KeyInput and a Input Listener.
|
|
|
|
|
|
-*Learn more:* <<jme3/beginner/hello_input_system#,Hello Input>>, <<jme3/advanced/input_handling#,Input Handling>>
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/beginner/hello_input_system#,Hello Input>>
|
|
|
+* <<jme3/advanced/input_handling#,Input Handling>>
|
|
|
|
|
|
|
|
|
=== How do I let players interact by clicking?
|
|
|
|
|
|
-Players typically click the mouse to pick up objects, to open doors, to shoot a weapon, etc. Use an Input Listener to respond to mouse clicks, then cast a ray from the player; if it intersects with the bounding volume of a spatial, this is the selected target. The links below contain code samples for both “fixed crosshair picking and “free mouse pointer picking.
|
|
|
+Players typically click the mouse to pick up objects, to open doors, to shoot a weapon, etc. Use an Input Listener to respond to mouse clicks, then cast a ray from the player; if it intersects with the bounding volume of a spatial, this is the selected target. The links below contain code samples for both `fixed` crosshair picking and `free` mouse pointer picking.
|
|
|
|
|
|
-*Learn more:* <<jme3/beginner/hello_picking#,Hello Picking>>, <<jme3/advanced/mouse_picking#,Mouse Picking>>, <<jme3/advanced/collision_and_intersection#,Collision and Intersection>>, <<jme3/advanced/input_handling#,Input Handling>>, link:https://github.com/jMonkeyEngine/jmonkeyengine/tree/master/jme3-core/src/main/java/com/jme3/bounding[com.jme3.bounding.], link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/math/Ray.java[com.jme3.math.Ray.java], link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/math/Ray.java[com.jme3.collision.CollisionResults.java]. +
|
|
|
-*Code sample:* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/bounding/TestRayCollision.java[TestRayCollision.java]
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/beginner/hello_picking#,Hello Picking>>
|
|
|
+* <<jme3/advanced/mouse_picking#,Mouse Picking>>
|
|
|
+* <<jme3/advanced/collision_and_intersection#,Collision and Intersection>>
|
|
|
+* <<jme3/advanced/input_handling#,Input Handling>>
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/tree/master/jme3-core/src/main/java/com/jme3/bounding[com.jme3.bounding.]
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/math/Ray.java[com.jme3.math.Ray.java]
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/math/Ray.java[com.jme3.collision.CollisionResults.java]
|
|
|
+
|
|
|
+*Code sample:*
|
|
|
+
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/bounding/TestRayCollision.java[TestRayCollision.java]
|
|
|
|
|
|
|
|
|
=== How do I animate characters?
|
|
|
|
|
|
Create an animated OgreMesh model with bones in a 3-D mesh editor (e.g. Blender).
|
|
|
|
|
|
-*Learn more:* link:https://github.com/jMonkeyEngine/jmonkeyengine/tree/master/jme3-core/src/main/java/com/jme3/animation[com.jme3.animation.], <<jme3/beginner/hello_animation#,Hello Animation>>, <<jme3/advanced/animation#,Animation>>, link:http://wiki.blender.org/index.php/Doc:Tutorials/Animation/BSoD/Character_Animation[Blender animation tutorial] +
|
|
|
-*Code sample:* link:https://github.com/jMonkeyEngine/jmonkeyengine/tree/master/jme3-examples/src/main/java/jme3test/model/anim[animation]
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/tree/master/jme3-core/src/main/java/com/jme3/animation[com.jme3.animation.]
|
|
|
+* <<jme3/beginner/hello_animation#,Hello Animation>>
|
|
|
+* <<jme3/advanced/animation#,Animation>>
|
|
|
+* link:http://wiki.blender.org/index.php/Doc:Tutorials/Animation/BSoD/Character_Animation[Blender animation tutorial]
|
|
|
+
|
|
|
+*Code sample:*
|
|
|
+
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/tree/master/jme3-examples/src/main/java/jme3test/model/anim[animation]
|
|
|
|
|
|
|
|
|
=== How do I keep players from falling through walls and floors?
|
|
|
|
|
|
Use collision detection. The most common solution is to use jme's physics integration, jBullet.
|
|
|
|
|
|
-*Learn more:* <<jme3/beginner/hello_collision#,Hello Collision>>, <<jme3/advanced/physics#,Physics>>, link:https://github.com/jMonkeyEngine/jmonkeyengine/tree/master/jme3-bullet/src/common/java/com/jme3/bullet[com.jme3.bullet.], CapsuleCollisionShape versus CompoundCollisionShape, CharacterControl versus RigidBodyControl.
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/beginner/hello_collision#,Hello Collision>>
|
|
|
+* <<jme3/advanced/physics#,Physics>>
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/tree/master/jme3-bullet/src/common/java/com/jme3/bullet[com.jme3.bullet.]
|
|
|
+* CapsuleCollisionShape versus CompoundCollisionShape, CharacterControl versus RigidBodyControl.
|
|
|
|
|
|
|
|
|
=== How do I make balls/wheels/etc bounce and roll?
|
|
|
|
|
|
Add physics controls to Spatials and give them spherical or cylindrical bounding volumes.
|
|
|
|
|
|
-*Learn more:* <<jme3/beginner/hello_physics#,Hello Physics>>, <<jme3/advanced/physics#,Physics>>, link:https://github.com/jMonkeyEngine/jmonkeyengine/tree/master/jme3-core/src/main/java/com/jme3/bounding[com.jme3.bounding.], link:https://github.com/jMonkeyEngine/jmonkeyengine/tree/master/jme3-bullet/src/main/java/com/jme3/bullet/collision[com.jme3.bullet.collisions], link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-bullet/src/common/java/com/jme3/bullet/control/RigidBodyControl.java[com.jme3.bullet.control.RigidBodyControl.java] +
|
|
|
-*Code sample:* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/bullet/TestSimplePhysics.java[TestSimplePhysics.java], link:https://github.com/jMonkeyEngine/jmonkeyengine/tree/master/jme3-examples/src/main/java/jme3test/bullet[more physics samples]
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/beginner/hello_physics#,Hello Physics>>
|
|
|
+* <<jme3/advanced/physics#,Physics>>
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/tree/master/jme3-core/src/main/java/com/jme3/bounding[com.jme3.bounding.]
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/tree/master/jme3-bullet/src/main/java/com/jme3/bullet/collision[com.jme3.bullet.collisions]
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-bullet/src/common/java/com/jme3/bullet/control/RigidBodyControl.java[com.jme3.bullet.control.RigidBodyControl.java]
|
|
|
+
|
|
|
+*Code sample:*
|
|
|
+
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/bullet/TestSimplePhysics.java[TestSimplePhysics.java]
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/tree/master/jme3-examples/src/main/java/jme3test/bullet[more physics samples]
|
|
|
|
|
|
|
|
|
=== How do I debug weird Physics behaviour?
|
|
@@ -428,24 +569,38 @@ bulletAppState.getPhysicsSpace().enableDebug(assetManager);
|
|
|
|
|
|
You can use jBullet's CharacterControl that locks a physical object upright, so it does not tip over when moving/walking (as tall physical objects are typically wanted to).
|
|
|
|
|
|
-*Learn more:* CharacterControl +
|
|
|
-*Code samples:* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/bullet/TestQ3.java[TestQ3.java] (first-person), link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/bullet/TestPhysicsCharacter.java[TestPhysicsCharacter.java] (third-person)
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/advanced/walking_character#bettercharactercontrol,BetterCharacterControl>>
|
|
|
+
|
|
|
+*Code Sample:*
|
|
|
+
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/bullet/TestQ3.java[TestQ3.java] (first-person)
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/bullet/TestPhysicsCharacter.java[TestPhysicsCharacter.java] (third-person)
|
|
|
|
|
|
|
|
|
=== How do I steer vehicles?
|
|
|
|
|
|
Use a VehicleControl that supports suspension behavior.
|
|
|
|
|
|
-*Learn more:* <<jme3/advanced/vehicles#,Vehicles>>, link:https://github.com/jMonkeyEngine/jmonkeyengine/tree/master/jme3-bullet/src/common/java/com/jme3/bullet[com.jme3.bullet.], VehicleControl +
|
|
|
-Code samples: link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/bullet/TestFancyCar.java[TestFancyCar.java], (Press HUJK keys to steer, spacebar to jump.)
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/advanced/vehicles#,Vehicles>>
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/tree/master/jme3-bullet/src/common/java/com/jme3/bullet/control/[com.jme3.bullet.control.VehicleControl]
|
|
|
+
|
|
|
+*Code Sample:*
|
|
|
+
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/bullet/TestFancyCar.java[TestFancyCar.java] (Press HUJK keys to steer, spacebar to jump.)
|
|
|
|
|
|
|
|
|
=== Can objects swing like a pendulums, chains, ropebridges?
|
|
|
|
|
|
Use a PhysicsControl's hinges and joints.
|
|
|
|
|
|
-*Learn more:* <<jme3/advanced/hinges_and_joints#,Hinges and Joints>>, [com.jme3.bullet.joints.],
|
|
|
-link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/bullet/TestPhysicsHingeJoint.java[TestPhysicsHingeJoint.java] (Press HK keys to turn, spacebar to swing.)
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/advanced/hinges_and_joints#,Hinges and Joints>>
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/bullet/TestPhysicsHingeJoint.java[TestPhysicsHingeJoint.java] (Press HK keys to turn, spacebar to swing.)
|
|
|
|
|
|
|
|
|
== Default GUI Display
|
|
@@ -455,7 +610,9 @@ link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/sr
|
|
|
|
|
|
At the bottom left of every default SimpleGame, you see the <<jme3/advanced/statsview#,StatsView>> and the FPS (frames per seconds) view. These views provide you with extra information during the development phase. For example, if you notice the object count is increasing and the FPS is decreasing, then you know that your code attaches too many objects and does not detach enough of them again (maybe a loop gone wild?).
|
|
|
|
|
|
-*Learn more:* <<jme3/advanced/statsview#,StatsView>>
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/advanced/statsview#,StatsView>>
|
|
|
|
|
|
|
|
|
=== How do I get rid of the FPS/Objects statistics?
|
|
@@ -473,24 +630,38 @@ setDisplayStatView(false); // to hide the statistics
|
|
|
|
|
|
Attach text and pictures to the orthogonal `guiNode` to create a heads-up display (link:http://en.wikipedia.org/wiki/HUD_%28video_gaming%29[HUD]).
|
|
|
|
|
|
-*Learn more:* <<jme3/advanced/hud#,HUD>>, link:https://github.com/jMonkeyEngine/jmonkeyengine/tree/master/jme3-core/src/main/java/com/jme3/font[com.jme3.font.], link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/ui/Picture.java[com.jme3.ui.Picture.java], guiNode.attachChild() +
|
|
|
-*Code sample:* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/gui/TestOrtho.java[TestOrtho.java],
|
|
|
-link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/gui/TestBitmapFont.java[TestBitmapFont.java]
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/advanced/hud#,HUD>>
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/tree/master/jme3-core/src/main/java/com/jme3/font[com.jme3.font.]
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/ui/Picture.java[com.jme3.ui.Picture] guiNode.attachChild()
|
|
|
+
|
|
|
+*Code Sample:*
|
|
|
+
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/gui/TestOrtho.java[TestOrtho.java]
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/gui/TestBitmapFont.java[TestBitmapFont.java]
|
|
|
|
|
|
|
|
|
=== How do I display buttons and UI controls?
|
|
|
|
|
|
You may want to display buttons to let the player switch between the game, settings screen, and score screens. For buttons and other more advanced UI controls, jME supports the Nifty +++<abbr title="Graphical User Interface">GUI</abbr>+++ library.
|
|
|
|
|
|
-*Learn more:* <<jme3/advanced/nifty_gui#,Nifty GUI>> +
|
|
|
-Sample Code: link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/niftygui/TestNiftyGui.java[TestNiftyGui.java]
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/advanced/nifty_gui#,Nifty GUI>>
|
|
|
+
|
|
|
+*Code Sample:*
|
|
|
+
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/niftygui/TestNiftyGui.java[TestNiftyGui.java]
|
|
|
|
|
|
|
|
|
=== How do i display a loading screen?
|
|
|
|
|
|
Instead of having a frozen frame while your games loads, you can have a loading screen while it loads.
|
|
|
|
|
|
-*Learn more:* <<jme3/advanced/loading_screen#,Loading screen>>
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/advanced/loading_screen#,Loading screen>>
|
|
|
|
|
|
|
|
|
== Nifty GUI
|
|
@@ -523,46 +694,82 @@ link:http://nifty-gui.svn.sourceforge.net/viewvc/nifty-gui/nifty-examples/trunk/
|
|
|
|
|
|
Use AudioRenderer, Listener, and AudioNode from com.jme3.audio..
|
|
|
|
|
|
-*Learn more:* <<jme3/beginner/hello_audio#,Hello Audio>>, <<jme3/advanced/audio#,Audio>> +
|
|
|
-*Code sample:* link:https://github.com/jMonkeyEngine/jmonkeyengine/tree/master/jme3-examples/src/main/java/jme3test/audio[audio]
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/beginner/hello_audio#,Hello Audio>>
|
|
|
+* <<jme3/advanced/audio#,Audio>>
|
|
|
+
|
|
|
+*Code sample:*
|
|
|
+
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/tree/master/jme3-examples/src/main/java/jme3test/audio[audio]
|
|
|
|
|
|
|
|
|
=== How do I make fire, smoke, explosions, swarms, magic spells?
|
|
|
|
|
|
For swarm like effects you use particle emitters.
|
|
|
|
|
|
-*Learn more:* <<jme3/beginner/hello_effects#,Hello Effects>>, <<jme3/advanced/particle_emitters#,Particle Emitters>>, <<jme3/advanced/bloom_and_glow#,Bloom and Glow>>, <<jme3/advanced/effects_overview#,Effects Overview>>, link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/effect/shapes/EmitterSphereShape.java[com.jme3.effect.EmitterSphereShape.java], link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/effect/ParticleEmitter.java[com.jme3.effect.ParticleEmitter.java] +
|
|
|
-*Code sample:* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/effect/TestExplosionEffect.java[TestExplosionEffect.java],
|
|
|
-link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/effect/TestMovingParticle.java[TestMovingParticle.java],
|
|
|
-link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/effect/TestSoftParticles.java[TestSoftParticle.java]
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/beginner/hello_effects#,Hello Effects>>
|
|
|
+* <<jme3/advanced/particle_emitters#,Particle Emitters>>
|
|
|
+* <<jme3/advanced/bloom_and_glow#,Bloom and Glow>>
|
|
|
+* <<jme3/advanced/effects_overview#,Effects Overview>>
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/effect/shapes/EmitterSphereShape.java[com.jme3.effect.EmitterSphereShape.java]
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/effect/ParticleEmitter.java[com.jme3.effect.ParticleEmitter.java]
|
|
|
+
|
|
|
+*Code sample:*
|
|
|
+
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/effect/TestExplosionEffect.java[TestExplosionEffect.java]
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/effect/TestMovingParticle.java[TestMovingParticle.java]
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/effect/TestSoftParticles.java[TestSoftParticle.java]
|
|
|
|
|
|
|
|
|
=== How do I make water, waves, reflections?
|
|
|
|
|
|
Use a special post-processor renderer from com.jme3.water..
|
|
|
|
|
|
-*Learn more:* <<jme3/advanced/water#,Water>>, <<jme3/advanced/post-processor_water#,Post-Processor Water>> +
|
|
|
-*Code sample:* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/water/TestSimpleWater.java[TestSimpleWater.java], link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/water/TestSceneWater.java[TestSceneWater.java], link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/water/TestPostWaterLake.java[TestPostWaterLake.java], link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/water/TestPostWater.java[TestPostWater.java]
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/advanced/water#,Water>>
|
|
|
+* <<jme3/advanced/post-processor_water#,Post-Processor Water>>
|
|
|
+
|
|
|
+*Code sample:*
|
|
|
+
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/water/TestSimpleWater.java[TestSimpleWater.java]
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/water/TestSceneWater.java[TestSceneWater.java]
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/water/TestPostWaterLake.java[TestPostWaterLake.java]
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/water/TestPostWater.java[TestPostWater.java]
|
|
|
|
|
|
|
|
|
=== How do I make fog, bloom, blur, light scattering?
|
|
|
|
|
|
Use special post-processor renderers from com.jme3.post..
|
|
|
|
|
|
-*Learn more:* <<jme3/advanced/effects_overview#,Effects Overview>>
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/advanced/effects_overview#,Effects Overview>>
|
|
|
|
|
|
|
|
|
=== How do I generate a terrain?
|
|
|
|
|
|
Use com.jme3.terrain.. The JMonkeyEngine also provides you with a Terrain Editor plugin.
|
|
|
|
|
|
-*Learn more:* <<jme3/beginner/hello_terrain#,Hello Terrain>>, <<jme3/advanced/terrain#,Terrain>>, <<sdk/terrain_editor#,Terrain Editor>> +
|
|
|
-*Code sample:* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/terrain/TerrainTest.java[TerrainTest.java]
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/beginner/hello_terrain#,Hello Terrain>>
|
|
|
+* <<jme3/advanced/terrain#,Terrain>>
|
|
|
+* <<sdk/terrain_editor#,Terrain Editor>>
|
|
|
+
|
|
|
+*Code sample:*
|
|
|
+
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/terrain/TerrainTest.java[TerrainTest.java]
|
|
|
|
|
|
|
|
|
=== How do I make a sky?
|
|
|
|
|
|
-*Code sample:* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/texture/TestSkyLoading.java[TestSkyLoading.java]
|
|
|
+*Code sample:*
|
|
|
+
|
|
|
+* link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/texture/TestSkyLoading.java[TestSkyLoading.java]
|
|
|
|
|
|
[source,java]
|
|
|
----
|
|
@@ -571,7 +778,9 @@ rootNode.attachChild(SkyFactory.createSky( assetManager,
|
|
|
skyGeo.setQueueBucket(Bucket.Sky)
|
|
|
----
|
|
|
|
|
|
-*Learn more:* <<jme3/advanced/sky#,Sky>>
|
|
|
+*Learn more:*
|
|
|
+
|
|
|
+* <<jme3/advanced/sky#,Sky>>
|
|
|
|
|
|
|
|
|
== I want to access to back-end properties
|
|
@@ -630,7 +839,7 @@ Many maths functions (mult(), add(), subtract(), etc) come as local and a non-lo
|
|
|
*** Returns the result as a new <<jme3/rotate.html#,Quaternion>> q1.
|
|
|
*** The involved objects q2 and q3 stay as they are and can be reused.
|
|
|
|
|
|
-** Example 2: `v.mult(b).add(b);`
|
|
|
+** Example 2: `v.mult(b).add(b);`
|
|
|
*** *Watch out:* This calculates the expected result, but unless you actually use the return value, it is discarded!
|
|
|
|
|
|
|
|
@@ -650,7 +859,7 @@ Many maths functions (mult(), add(), subtract(), etc) come as local and a non-lo
|
|
|
|
|
|
=== What is the difference between World and Local coordinates?
|
|
|
|
|
|
-World coordinates of a Spatial are its absolute coordinates in the 3D scene (this is like giving GPS coordinates). Local coordinates are relative to the Spatial's parent Spatial (this is like saying, “I'm ten meters left of the entrance).
|
|
|
+World coordinates of a Spatial are its absolute coordinates in the 3D scene (this is like giving GPS coordinates). Local coordinates are relative to the Spatial's parent Spatial (this is like saying, `I'm ten meters left of the entrance`).
|
|
|
|
|
|
|
|
|
=== How do I convert Degrees to Radians?
|