Class SphereCollider
A sphere-shaped primitive collider.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Physics/Colliders/SphereCollider.h
Syntax
public class SphereCollider : public Collider
Methods
DrawPhysicsDebug(RenderView& view)
Declaration
protected virtual void DrawPhysicsDebug(RenderView& view) override
Parameters
RenderView
view
|
Overrides
GetGeometry(CollisionShape& collision)
Gets the collider shape geometry.
Declaration
protected virtual void GetGeometry(CollisionShape& collision) override
Parameters
CollisionShape
collision
The output collision shape. |
Overrides
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
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