|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bulletphysics.dynamics.ActionInterface com.bulletphysics.dynamics.character.KinematicCharacterController
public class KinematicCharacterController
KinematicCharacterController is an object that supports a sliding motion in
a world. It uses a GhostObject
and convex sweep test to test for upcoming
collisions. This is combined with discrete collision detection to recover
from penetrations.
Interaction between KinematicCharacterController and dynamic rigid bodies needs to be explicity implemented by the user.
Constructor Summary | |
---|---|
KinematicCharacterController(PairCachingGhostObject ghostObject,
ConvexShape convexShape,
float stepHeight)
|
|
KinematicCharacterController(PairCachingGhostObject ghostObject,
ConvexShape convexShape,
float stepHeight,
int upAxis)
|
Method Summary | |
---|---|
boolean |
canJump()
|
void |
debugDraw(IDebugDraw debugDrawer)
|
float |
getGravity()
|
float |
getMaxSlope()
|
void |
jump()
|
boolean |
onGround()
|
void |
playerStep(CollisionWorld collisionWorld,
float dt)
|
void |
preStep(CollisionWorld collisionWorld)
|
void |
reset()
|
void |
setFallSpeed(float fallSpeed)
|
void |
setGravity(float gravity)
|
void |
setJumpSpeed(float jumpSpeed)
|
void |
setMaxJumpHeight(float maxJumpHeight)
|
void |
setMaxSlope(float slopeRadians)
|
void |
setUpAxis(int axis)
|
void |
setVelocityForTimeInterval(Vector3f velocity,
float timeInterval)
Caller provides a velocity with which the character should move for the given time period. |
void |
setWalkDirection(Vector3f walkDirection)
This should probably be called setPositionIncrementPerSimulatorStep. |
void |
updateAction(CollisionWorld collisionWorld,
float deltaTime)
|
void |
warp(Vector3f origin)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KinematicCharacterController(PairCachingGhostObject ghostObject, ConvexShape convexShape, float stepHeight)
public KinematicCharacterController(PairCachingGhostObject ghostObject, ConvexShape convexShape, float stepHeight, int upAxis)
Method Detail |
---|
public void updateAction(CollisionWorld collisionWorld, float deltaTime)
updateAction
in class ActionInterface
public void debugDraw(IDebugDraw debugDrawer)
debugDraw
in class ActionInterface
public void setUpAxis(int axis)
public void setWalkDirection(Vector3f walkDirection)
This call will reset any velocity set by setVelocityForTimeInterval(javax.vecmath.Vector3f, float)
.
public void setVelocityForTimeInterval(Vector3f velocity, float timeInterval)
setWalkDirection(javax.vecmath.Vector3f)
.
Negative time intervals will result in no motion.
public void reset()
public void warp(Vector3f origin)
public void preStep(CollisionWorld collisionWorld)
public void playerStep(CollisionWorld collisionWorld, float dt)
public void setFallSpeed(float fallSpeed)
public void setJumpSpeed(float jumpSpeed)
public void setMaxJumpHeight(float maxJumpHeight)
public boolean canJump()
public void jump()
public void setGravity(float gravity)
public float getGravity()
public void setMaxSlope(float slopeRadians)
public float getMaxSlope()
public boolean onGround()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |