- Direct Known Subclasses:
PxBoxControllerDesc,PxCapsuleControllerDesc
- See Also:
-
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 PxControllerDescarrayGet(long baseAddress, int index) Specifies a user behavior callback.floatThe contact offset used by the controller.floatDensity of underlying kinematic actorfloatHeight of invisible walls created around non-walkable trianglesThe material for the actor associated with the controller.floatMaximum height a jumping character can reachThe non-walkable mode controls if a character controller slides or not on a non-walkable part.The position of the characterbooleanUse a deletion listener to get informed about released objects and clear internal caches if needed.Specifies a user report callback.floatScale coefficient for underlying kinematic actorfloatThe maximum slope which the character can walk up.floatDefines the maximum height of an obstacle which the character can climb.getType()Returns the character controller typeSpecifies the 'up' directionUser specified data associated with the controller.floatCached volume growthbooleanisValid()returns true if the current settings are validvoidSpecifies a user behavior callback.voidsetContactOffset(float value) The contact offset used by the controller.voidsetDensity(float value) Density of underlying kinematic actorvoidsetInvisibleWallHeight(float value) Height of invisible walls created around non-walkable trianglesvoidsetMaterial(PxMaterial value) The material for the actor associated with the controller.voidsetMaxJumpHeight(float value) Maximum height a jumping character can reachvoidThe non-walkable mode controls if a character controller slides or not on a non-walkable part.voidsetPosition(PxExtendedVec3 value) The position of the charactervoidsetRegisterDeletionListener(boolean value) Use a deletion listener to get informed about released objects and clear internal caches if needed.voidSpecifies a user report callback.voidsetScaleCoeff(float value) Scale coefficient for underlying kinematic actorvoidsetSlopeLimit(float value) The maximum slope which the character can walk up.voidsetStepOffset(float value) Defines the maximum height of an obstacle which the character can climb.voidsetUpDirection(PxVec3 value) Specifies the 'up' directionvoidsetUserData(NativeObject value) User specified data associated with the controller.voidsetVolumeGrowth(float value) Cached volume growthstatic PxControllerDescwrapPointer(long address) Methods 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
-
PxControllerDesc
protected PxControllerDesc() -
PxControllerDesc
protected PxControllerDesc(long address)
-
-
Method Details
-
wrapPointer
-
arrayGet
-
getPosition
The position of the characterNote: The character's initial position must be such that it does not overlap the static geometry.
Default: Zero
-
setPosition
The position of the characterNote: The character's initial position must be such that it does not overlap the static geometry.
Default: Zero
-
getUpDirection
Specifies the 'up' directionIn order to provide stepping functionality the SDK must be informed about the up direction.
Default: (0, 1, 0)
-
setUpDirection
Specifies the 'up' directionIn order to provide stepping functionality the SDK must be informed about the up direction.
Default: (0, 1, 0)
-
getSlopeLimit
public float getSlopeLimit()The maximum slope which the character can walk up.In general it is desirable to limit where the character can walk, in particular it is unrealistic for the character to be able to climb arbitary slopes.
The limit is expressed as the cosine of desired limit angle. A value of 0 disables this feature.
\warning It is currently enabled for static actors only (not for dynamic/kinematic actors), and not supported for spheres or capsules.
Default: 0.707
-
setSlopeLimit
public void setSlopeLimit(float value) The maximum slope which the character can walk up.In general it is desirable to limit where the character can walk, in particular it is unrealistic for the character to be able to climb arbitary slopes.
The limit is expressed as the cosine of desired limit angle. A value of 0 disables this feature.
\warning It is currently enabled for static actors only (not for dynamic/kinematic actors), and not supported for spheres or capsules.
Default: 0.707
-
getInvisibleWallHeight
public float getInvisibleWallHeight()Height of invisible walls created around non-walkable trianglesThe library can automatically create invisible walls around non-walkable triangles defined by the 'slopeLimit' parameter. This defines the height of those walls. If it is 0.0, then no extra triangles are created.
Default: 0.0
-
setInvisibleWallHeight
public void setInvisibleWallHeight(float value) Height of invisible walls created around non-walkable trianglesThe library can automatically create invisible walls around non-walkable triangles defined by the 'slopeLimit' parameter. This defines the height of those walls. If it is 0.0, then no extra triangles are created.
Default: 0.0
-
getMaxJumpHeight
public float getMaxJumpHeight()Maximum height a jumping character can reachThis is only used if invisible walls are created ('invisibleWallHeight' is non zero).
When a character jumps, the non-walkable triangles he might fly over are not found by the collision queries (since the character's bounding volume does not touch them). Thus those non-walkable triangles do not create invisible walls, and it is possible for a jumping character to land on a non-walkable triangle, while he wouldn't have reached that place by just walking.
The 'maxJumpHeight' variable is used to extend the size of the collision volume downward. This way, all the non-walkable triangles are properly found by the collision queries and it becomes impossible to 'jump over' invisible walls.
If the character in your game can not jump, it is safe to use 0.0 here. Otherwise it is best to keep this value as small as possible, since a larger collision volume means more triangles to process.
Default: 0.0
-
setMaxJumpHeight
public void setMaxJumpHeight(float value) Maximum height a jumping character can reachThis is only used if invisible walls are created ('invisibleWallHeight' is non zero).
When a character jumps, the non-walkable triangles he might fly over are not found by the collision queries (since the character's bounding volume does not touch them). Thus those non-walkable triangles do not create invisible walls, and it is possible for a jumping character to land on a non-walkable triangle, while he wouldn't have reached that place by just walking.
The 'maxJumpHeight' variable is used to extend the size of the collision volume downward. This way, all the non-walkable triangles are properly found by the collision queries and it becomes impossible to 'jump over' invisible walls.
If the character in your game can not jump, it is safe to use 0.0 here. Otherwise it is best to keep this value as small as possible, since a larger collision volume means more triangles to process.
Default: 0.0
-
getContactOffset
public float getContactOffset()The contact offset used by the controller.Specifies a skin around the object within which contacts will be generated. Use it to avoid numerical precision issues.
This is dependant on the scale of the users world, but should be a small, positive non zero value.
Default: 0.1
-
setContactOffset
public void setContactOffset(float value) The contact offset used by the controller.Specifies a skin around the object within which contacts will be generated. Use it to avoid numerical precision issues.
This is dependant on the scale of the users world, but should be a small, positive non zero value.
Default: 0.1
-
getStepOffset
public float getStepOffset()Defines the maximum height of an obstacle which the character can climb.A small value will mean that the character gets stuck and cannot walk up stairs etc, a value which is too large will mean that the character can climb over unrealistically high obstacles.
Default: 0.5
-
setStepOffset
public void setStepOffset(float value) Defines the maximum height of an obstacle which the character can climb.A small value will mean that the character gets stuck and cannot walk up stairs etc, a value which is too large will mean that the character can climb over unrealistically high obstacles.
Default: 0.5
-
getDensity
public float getDensity()Density of underlying kinematic actorThe CCT creates a PhysX's kinematic actor under the hood. This controls its density.
Default: 10.0
-
setDensity
public void setDensity(float value) Density of underlying kinematic actorThe CCT creates a PhysX's kinematic actor under the hood. This controls its density.
Default: 10.0
-
getScaleCoeff
public float getScaleCoeff()Scale coefficient for underlying kinematic actorThe CCT creates a PhysX's kinematic actor under the hood. This controls its scale factor. This should be a number a bit smaller than 1.0.
Default: 0.8
-
setScaleCoeff
public void setScaleCoeff(float value) Scale coefficient for underlying kinematic actorThe CCT creates a PhysX's kinematic actor under the hood. This controls its scale factor. This should be a number a bit smaller than 1.0.
Default: 0.8
-
getVolumeGrowth
public float getVolumeGrowth()Cached volume growthAmount of space around the controller we cache to improve performance. This is a scale factor that should be higher than 1.0f but not too big, ideally lower than 2.0f.
Default: 1.5
-
setVolumeGrowth
public void setVolumeGrowth(float value) Cached volume growthAmount of space around the controller we cache to improve performance. This is a scale factor that should be higher than 1.0f but not too big, ideally lower than 2.0f.
Default: 1.5
-
getReportCallback
Specifies a user report callback.This report callback is called when the character collides with shapes and other characters.
Setting this to NULL disables the callback.
Default: NULL
- See Also:
-
setReportCallback
Specifies a user report callback.This report callback is called when the character collides with shapes and other characters.
Setting this to NULL disables the callback.
Default: NULL
- See Also:
-
getBehaviorCallback
Specifies a user behavior callback.This behavior callback is called to customize the controller's behavior w.r.t. touched shapes.
Setting this to NULL disables the callback.
Default: NULL
- See Also:
-
setBehaviorCallback
Specifies a user behavior callback.This behavior callback is called to customize the controller's behavior w.r.t. touched shapes.
Setting this to NULL disables the callback.
Default: NULL
- See Also:
-
getNonWalkableMode
The non-walkable mode controls if a character controller slides or not on a non-walkable part.This is only used when slopeLimit is non zero.
Default: PxControllerNonWalkableMode::ePREVENT_CLIMBING
-
setNonWalkableMode
The non-walkable mode controls if a character controller slides or not on a non-walkable part.This is only used when slopeLimit is non zero.
Default: PxControllerNonWalkableMode::ePREVENT_CLIMBING
-
getMaterial
The material for the actor associated with the controller.The controller internally creates a rigid body actor. This parameter specifies the material of the actor.
Default: NULL
- See Also:
-
setMaterial
The material for the actor associated with the controller.The controller internally creates a rigid body actor. This parameter specifies the material of the actor.
Default: NULL
- See Also:
-
getRegisterDeletionListener
public boolean getRegisterDeletionListener()Use a deletion listener to get informed about released objects and clear internal caches if needed.If a character controller registers a deletion listener, it will get informed about released objects. That allows the controller to invalidate cached data that connects to a released object. If a deletion listener is not registered, PxController::invalidateCache has to be called manually after objects have been released.
Default: true
-
setRegisterDeletionListener
public void setRegisterDeletionListener(boolean value) Use a deletion listener to get informed about released objects and clear internal caches if needed.If a character controller registers a deletion listener, it will get informed about released objects. That allows the controller to invalidate cached data that connects to a released object. If a deletion listener is not registered, PxController::invalidateCache has to be called manually after objects have been released.
Default: true
-
getUserData
User specified data associated with the controller.Default: NULL
-
setUserData
User specified data associated with the controller.Default: NULL
-
isValid
public boolean isValid()returns true if the current settings are valid- Returns:
- True if the descriptor is valid.
-
getType
Returns the character controller type- Returns:
- The controllers type.
- See Also:
-