Class TCastlePlaneCollider

Unit

Declaration

type TCastlePlaneCollider = class(TCastleCollider)

Description

Push everything to be above the given static plane, like a floor.

Half of 3D space (below the plane) is effectively collidable, and everything is pushed to be above the floor. Note: This is more than just "collide as an infinite plane", because even if you place a body completely below the plane, it will be pushed up.

Add this collider to TCastleTransform behaviors, along with a TCastleRigidBody, to make the given TCastleTransform be affected by physics and collide with other physics bodies.

This collider supports only static rigid bodies. The associated TCastleRigidBody instance (with the same TCastleTransform parent) will behave as if TCastleRigidBody.Dynamic and TCastleRigidBody.Animated are False.

Source: transform/castletransform_physics.inc (line 483).

Hierarchy

Overview

Methods

Protected function CreateKraftShape(const APhysics: TKraft; const ARigidBody: TKraftRigidBody): TKraftShape; override;
Protected procedure CalculateSizeCore; override;
Protected procedure UpdateVisualization; override;
Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public procedure InternalDesigningBegin; override;
Public procedure InternalDesigningEnd; override;
Public function PropertySections(const PropertyName: String): TPropertySections; override;

Properties

Public property Normal: TVector3 read FNormal write SetNormal stored StoredWithAutoSize;
Published property Distance: Single read FDistance write SetDistance stored StoredWithAutoSize;
Published property NormalPersistent: TCastleVector3Persistent read FNormalPersistent stored StoredWithAutoSize;

Description

Methods

Protected function CreateKraftShape(const APhysics: TKraft; const ARigidBody: TKraftRigidBody): TKraftShape; override;

This item has no description.

Source: transform/castletransform_physics.inc (line 492).

Protected procedure CalculateSizeCore; override;

This item has no description. Showing description inherited from TCastleCollider.CalculateSizeCore.

Recalculate collider size. Do not be concerned about AutoSize here, just update collider properties. The default implementation resets Translation and Rotation.

Source: transform/castletransform_physics.inc (line 494).

Protected procedure UpdateVisualization; override;

This item has no description. Showing description inherited from TCastleCollider.UpdateVisualization.

Called when the collider size has changed and needs to be updated.

Source: transform/castletransform_physics.inc (line 495).

Public constructor Create(AOwner: TComponent); override;

This item has no description.

Source: transform/castletransform_physics.inc (line 497).

Public destructor Destroy; override;

This item has no description.

Source: transform/castletransform_physics.inc (line 498).

Public procedure InternalDesigningBegin; override;

This item has no description. Showing description inherited from TCastleCollider.InternalDesigningBegin.

Create collider visualization.

Source: transform/castletransform_physics.inc (line 500).

Public procedure InternalDesigningEnd; override;

This item has no description. Showing description inherited from TCastleCollider.InternalDesigningEnd.

Destroy collider visualization.

Source: transform/castletransform_physics.inc (line 501).

Public function PropertySections(const PropertyName: String): TPropertySections; override;

This item has no description. Showing description inherited from TCastleComponent.PropertySections.

Section where to show property in the editor.

Source: transform/castletransform_physics.inc (line 503).

Properties

Public property Normal: TVector3 read FNormal write SetNormal stored StoredWithAutoSize;

Normal vector of the plane. By default this is +Y (if not AutoSize). This makes the default plane by constant in Y axis, and span to infinity in X and Z axis. This makes it nice as a ground/floor in 3D.

Source: transform/castletransform_physics.inc (line 509).

Published property Distance: Single read FDistance write SetDistance stored StoredWithAutoSize;

Distance from (0,0,0) to the point. Default 0 (if not AutoSize).

Source: transform/castletransform_physics.inc (line 513).

Published property NormalPersistent: TCastleVector3Persistent read FNormalPersistent stored StoredWithAutoSize;

Normal that can be visually edited in Castle Game Engine Editor, Lazarus and Delphi. Normal user code does not need to deal with this, instead read or write Normal directly.

See also
Normal
Normal vector of the plane.

Source: transform/auto_generated_persistent_vectors/tcastleplanecollider_persistent_vectors.inc (line 37).


Generated by PasDoc 0.17.0.snapshot.