java.lang.Object
physx.NativeObject
physx.character.PxController
physx.character.PxCapsuleController
A capsule character controller.
The capsule is defined as a position, a vertical height, and a radius. The height is the distance between the two sphere centers at the end of the capsule. In other words:
p = pos (returned by controller)
h = height
r = radius
p = center of capsule
top sphere center = p.y + h*0.5
bottom sphere center = p.y - h*0.5
top capsule point = p.y + h*0.5 + r
bottom capsule point = p.y - h*0.5 - r
-
Nested Class Summary
Nested classes/interfaces inherited from class physx.NativeObject
NativeObject.Allocator<T> -
Field Summary
FieldsFields inherited from class physx.NativeObject
address, isExternallyAllocated, SIZEOF_BYTE, SIZEOF_DOUBLE, SIZEOF_FLOAT, SIZEOF_INT, SIZEOF_LONG, SIZEOF_POINTER, SIZEOF_SHORT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PxCapsuleControllerarrayGet(long baseAddress, int index) Gets controller's climbing mode.floatGets controller's height.floatGets controller's radius.booleanSets controller's climbing mode.booleansetHeight(float height) Resets controller's height.booleansetRadius(float radius) Sets controller's radius.static PxCapsuleControllerwrapPointer(long address) Methods inherited from class physx.character.PxController
getActor, getContactOffset, getFootPosition, getNonWalkableMode, getPosition, getScene, getSlopeLimit, getState, getStats, getStepOffset, getType, getUpDirection, getUserData, invalidateCache, move, move, release, resize, setContactOffset, setFootPosition, setNonWalkableMode, setPosition, setSlopeLimit, setStepOffset, setUpDirection, setUserDataMethods inherited from class physx.NativeObject
checkNotNull, equals, getAddress, hashCode
-
Field Details
-
SIZEOF
public static final int SIZEOF -
ALIGNOF
public static final int ALIGNOF- See Also:
-
-
Constructor Details
-
PxCapsuleController
protected PxCapsuleController() -
PxCapsuleController
protected PxCapsuleController(long address)
-
-
Method Details
-
wrapPointer
-
arrayGet
-
getRadius
public float getRadius()Gets controller's radius.- Returns:
- The radius of the controller.
- See Also:
-
setRadius
public boolean setRadius(float radius) Sets controller's radius.\warning this doesn't check for collisions.
- Parameters:
radius- The new radius for the controller.- Returns:
- Currently always true.
- See Also:
-
getHeight
public float getHeight()Gets controller's height.- Returns:
- The height of the capsule controller.
- See Also:
-
setHeight
public boolean setHeight(float height) Resets controller's height.\warning this doesn't check for collisions.
- Parameters:
height- The new height for the controller.- Returns:
- Currently always true.
- See Also:
-
getClimbingMode
Gets controller's climbing mode.- Returns:
- The capsule controller's climbing mode.
- See Also:
-
setClimbingMode
Sets controller's climbing mode.- Parameters:
mode- The capsule controller's climbing mode.- See Also:
-