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 CharacterControl to be compatible with Minie #588

Merged
merged 1 commit into from
Mar 27, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

import com.jme3.bullet.collision.shapes.CollisionShape;
import com.jme3.bullet.control.CharacterControl;
import com.jme3.bullet.objects.PhysicsCharacter;
import com.jme3.gde.core.icons.IconList;
import com.jme3.math.Vector3f;
import java.awt.Image;
Expand Down Expand Up @@ -85,15 +86,15 @@ protected Sheet createSheet() {

set.put(makeProperty(obj, Vector3f.class, "getPhysicsLocation", "setPhysicsLocation", "Physics Location"));

set.put(makeProperty(obj, CollisionShape.class, "getCollisionShape", "setCollisionShape", "Collision Shape"));
set.put(makeProperty(obj, int.class, "getCollisionGroup", "setCollisionGroup", "Collision Group"));
set.put(makeProperty(obj, int.class, "getCollideWithGroups", "setCollideWithGroups", "Collide With Groups"));
PhysicsCharacter character = obj.getCharacter();

set.put(makeProperty(obj, int.class, "getUpAxis", "setUpAxis", "Up Axis"));
set.put(makeProperty(obj, float.class, "getFallSpeed", "setFallSpeed", "Fall Speed"));
set.put(makeProperty(obj, float.class, "getJumpSpeed", "setJumpSpeed", "Jump Speed"));
set.put(makeProperty(obj, float.class, "getGravity", "setGravity", "Gravity"));
set.put(makeProperty(obj, float.class, "getMaxSlope", "setMaxSlope", "Max Slope"));
set.put(makeEmbedProperty(character, PhysicsCharacter.class, CollisionShape.class, "getCollisionShape", "setCollisionShape", "Collision Shape"));
set.put(makeEmbedProperty(character, PhysicsCharacter.class, int.class, "getCollisionGroup", "setCollisionGroup", "Collision Group"));
set.put(makeEmbedProperty(character, PhysicsCharacter.class, int.class, "getCollideWithGroups", "setCollideWithGroups", "Collide With Groups"));

set.put(makeEmbedProperty(character, PhysicsCharacter.class, float.class, "getFallSpeed", "setFallSpeed", "Fall Speed"));
set.put(makeEmbedProperty(character, PhysicsCharacter.class, float.class, "getJumpSpeed", "setJumpSpeed", "Jump Speed"));
set.put(makeEmbedProperty(character, PhysicsCharacter.class, float.class, "getMaxSlope", "setMaxSlope", "Max Slope"));

sheet.put(set);
return sheet;
Expand Down