Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sample code - Terrain Collision #144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/modules/core/pages/collision/terrain_collision.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public class HelloTerrainCollision extends SimpleApplication

// You can change the gravity of individual physics objects after they are
// added to the PhysicsSpace.
player.setGravity(new Vector3f(0,-30f,0));
player.setGravity(-30f);
Copy link
Member

@Ali-RS Ali-RS Jan 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@stephengold stephengold Jan 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, @Ali-RS. The PhysicsCharacter.setGravity(float) argument represents acceleration in the character's "down" direction, so it's usually non-negative. That's true in both Minie and jme3-jbullet.

It would be great to get all the sample code in the Wiki synched with the "jme3test.helloworld" package in jme3-examples.


}
/** We over-write some navigational key mappings here, so we can
Expand Down