Class CapsuleCollider
A capsule-shaped primitive collider.
Capsules are cylinders with a half-sphere at each end centered at the origin and extending along the X axis, and two hemispherical ends.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Physics/Colliders/CapsuleCollider.h
Syntax
public class CapsuleCollider : public Collider
Fields
ImplementPhysicsDebug
Declaration
protected ImplementPhysicsDebug
Methods
GetGeometry(CollisionShape& collision)
Gets the collider shape geometry.
Declaration
protected virtual void GetGeometry(CollisionShape& collision) override
Parameters
|
CollisionShape
collision
The output collision shape. |
Overrides
GetHeight()
Gets the height of the capsule, measured in the object's local space between the centers of the hemispherical ends.
The capsule height will be scaled by the actor's world scale.
Declaration
public float GetHeight() const
Returns
|
float
|
GetRadius()
Gets the radius of the sphere, measured in the object's local space.
The sphere radius will be scaled by the actor's world scale.
Declaration
public float GetRadius() const
Returns
|
float
|
IntersectsItself(const Ray& ray, Real& distance, Vector3& normal)
Determines if there is an intersection between the current object and a ray.
Declaration
public virtual bool IntersectsItself(const Ray& ray, Real& distance, Vector3& normal) override
Parameters
|
Ray
ray
The ray to test. |
|
Real
distance
When the method completes, contains the distance of the intersection (if any valid). |
|
Vector3
normal
When the method completes, contains the intersection surface normal vector (if any valid). |
Returns
|
bool
True whether the two objects intersected, otherwise false. |
Overrides
OnDebugDrawSelected()
Draws debug shapes for the selected actor and all child scripts.
Declaration
public virtual void OnDebugDrawSelected() override
Overrides
OnDebugDrawSelf()
Declaration
public virtual void OnDebugDrawSelf() override
Overrides
SetHeight(float value)
Sets the height of the capsule, measured in the object's local space between the centers of the hemispherical ends.
The capsule height will be scaled by the actor's world scale.
Declaration
public void SetHeight(float value)
Parameters
|
float
value
|
SetRadius(float value)
Sets the radius of the sphere, measured in the object's local space.
The sphere radius will be scaled by the actor's world scale.
Declaration
public void SetRadius(float value)
Parameters
|
float
value
|
UpdateBounds()
Updates the bounding box of the shape.
Declaration
protected virtual void UpdateBounds() override