public class CharacterControl extends PhysicsCharacter implements PhysicsControl, com.jme3.util.clone.JmeCloneable
BetterCharacterControl as well.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
added |
protected boolean |
applyLocal |
protected boolean |
enabled |
protected PhysicsSpace |
space |
protected com.jme3.scene.Spatial |
spatial |
protected boolean |
useViewDirection |
protected com.jme3.math.Vector3f |
viewDirection |
characterId, fallSpeed, jumpSpeed, locationDirty, stepHeight, tmp_inverseWorldRotation, upAxis, walkDirectionCOLLISION_GROUP_01, COLLISION_GROUP_02, COLLISION_GROUP_03, COLLISION_GROUP_04, COLLISION_GROUP_05, COLLISION_GROUP_06, COLLISION_GROUP_07, COLLISION_GROUP_08, COLLISION_GROUP_09, COLLISION_GROUP_10, COLLISION_GROUP_11, COLLISION_GROUP_12, COLLISION_GROUP_13, COLLISION_GROUP_14, COLLISION_GROUP_15, COLLISION_GROUP_16, COLLISION_GROUP_NONE, collisionGroup, collisionGroupsMask, collisionShape, objectId| Constructor and Description |
|---|
CharacterControl() |
CharacterControl(CollisionShape shape,
float stepHeight) |
| Modifier and Type | Method and Description |
|---|---|
void |
cloneFields(com.jme3.util.clone.Cloner cloner,
java.lang.Object original) |
com.jme3.scene.control.Control |
cloneForSpatial(com.jme3.scene.Spatial spatial) |
PhysicsSpace |
getPhysicsSpace() |
com.jme3.math.Vector3f |
getViewDirection() |
boolean |
isApplyPhysicsLocal() |
boolean |
isEnabled()
Returns the current enabled state of the physics control
|
boolean |
isUseViewDirection() |
java.lang.Object |
jmeClone() |
void |
read(com.jme3.export.JmeImporter im) |
void |
render(com.jme3.renderer.RenderManager rm,
com.jme3.renderer.ViewPort vp) |
void |
setApplyPhysicsLocal(boolean applyPhysicsLocal)
When set to true, the physics coordinates will be applied to the local
translation of the Spatial
|
void |
setEnabled(boolean enabled)
The physics object is removed from the physics space when the control
is disabled.
|
void |
setPhysicsSpace(PhysicsSpace space)
Only used internally, do not call.
|
void |
setSpatial(com.jme3.scene.Spatial spatial) |
void |
setUseViewDirection(boolean viewDirectionEnabled) |
void |
setViewDirection(com.jme3.math.Vector3f vec) |
void |
update(float tpf) |
void |
write(com.jme3.export.JmeExporter ex) |
buildObject, destroy, finalize, getCcdMotionThreshold, getCcdSquareMotionThreshold, getCcdSweptSphereRadius, getControllerId, getFallSpeed, getGravity, getJumpSpeed, getMaxSlope, getPhysicsLocation, getPhysicsLocation, getUpAxis, getWalkDirection, jump, onGround, setCcdMotionThreshold, setCcdSweptSphereRadius, setCollisionShape, setFallSpeed, setGravity, setJumpSpeed, setMaxSlope, setPhysicsLocation, setUpAxis, setWalkDirection, warpaddCollideWithGroup, attachCollisionShape, finalizeNative, getCollideWithGroups, getCollisionGroup, getCollisionShape, getObjectId, getUserObject, initUserPointer, removeCollideWithGroup, setCollideWithGroups, setCollisionGroup, setUserObjectprotected com.jme3.scene.Spatial spatial
protected boolean enabled
protected boolean added
protected PhysicsSpace space
protected com.jme3.math.Vector3f viewDirection
protected boolean useViewDirection
protected boolean applyLocal
public CharacterControl()
public CharacterControl(CollisionShape shape, float stepHeight)
public boolean isApplyPhysicsLocal()
public void setApplyPhysicsLocal(boolean applyPhysicsLocal)
applyPhysicsLocal - public com.jme3.scene.control.Control cloneForSpatial(com.jme3.scene.Spatial spatial)
cloneForSpatial in interface com.jme3.scene.control.Controlpublic java.lang.Object jmeClone()
jmeClone in interface com.jme3.util.clone.JmeCloneablepublic void cloneFields(com.jme3.util.clone.Cloner cloner,
java.lang.Object original)
cloneFields in interface com.jme3.util.clone.JmeCloneablepublic void setSpatial(com.jme3.scene.Spatial spatial)
setSpatial in interface com.jme3.scene.control.Controlpublic void setEnabled(boolean enabled)
PhysicsControlsetEnabled in interface PhysicsControlpublic boolean isEnabled()
PhysicsControlisEnabled in interface PhysicsControlpublic void setViewDirection(com.jme3.math.Vector3f vec)
public com.jme3.math.Vector3f getViewDirection()
public boolean isUseViewDirection()
public void setUseViewDirection(boolean viewDirectionEnabled)
public void update(float tpf)
update in interface com.jme3.scene.control.Controlpublic void render(com.jme3.renderer.RenderManager rm,
com.jme3.renderer.ViewPort vp)
render in interface com.jme3.scene.control.Controlpublic void setPhysicsSpace(PhysicsSpace space)
PhysicsControlsetPhysicsSpace in interface PhysicsControlpublic PhysicsSpace getPhysicsSpace()
getPhysicsSpace in interface PhysicsControlpublic void write(com.jme3.export.JmeExporter ex)
throws java.io.IOException
write in interface com.jme3.export.Savablewrite in class PhysicsCharacterjava.io.IOExceptionpublic void read(com.jme3.export.JmeImporter im)
throws java.io.IOException
read in interface com.jme3.export.Savableread in class PhysicsCharacterjava.io.IOException