Class TCastleGrabJoint
Unit
Declaration
type TCastleGrabJoint = class(TCastleAbstractOneBodyJoint)
Description
Grab joint pulls the rigid body Anchor towards a TargetWorld defined in the world coordinates. The pull is not instant, rather it works like a flexible spring / elastic rope.
Hierarchy
- TObject
- TPersistent
- TComponent
- TCastleComponent
- TCastleBehavior
- TCastleAbstractJoint
- TCastleAbstractOneBodyJoint
- TCastleGrabJoint
Overview
Fields
nested const DefaultFrequencyHz = 5.0; |
|
nested const DefaultDampingRatio = 0.7; |
Methods
function GetKraftJoint: TKraftConstraintJoint; override; |
|
procedure CreateKraftJoint; override; |
|
procedure DeinitializeKraftJoint; override; |
|
procedure SetName(const Value: TComponentName); override; |
|
constructor Create(AOwner: TComponent); override; |
|
destructor Destroy; override; |
|
procedure WorldBeforeDetach; override; |
|
procedure InternalCreateGizmos; override; |
|
procedure InternalDestroyGizmos; override; |
|
function PropertySections(const PropertyName: String): TPropertySections; override; |
Properties
property Anchor: TVector3 read FAnchor write SetAnchor; |
|
property TargetWorld: TVector3 read FTargetWorld write SetTargetWorld; |
|
property FrequencyHz: Single read FFrequencyHz write SetFrequencyHz default DefaultFrequencyHz; |
|
property DampingRatio: Single read FDampingRatio write SetDampingRatio default DefaultDampingRatio; |
|
property MaxForce: Single read FMaxForce write SetMaxForce default 0.0; |
|
property AnchorPersistent: TCastleVector3Persistent read FAnchorPersistent ; |
|
property TargetWorldPersistent: TCastleVector3Persistent read FTargetWorldPersistent ; |
Description
Fields
nested const DefaultFrequencyHz = 5.0; |
|
This item has no description. |
nested const DefaultDampingRatio = 0.7; |
|
This item has no description. |
Methods
function GetKraftJoint: TKraftConstraintJoint; override; |
|
This item has no description. Showing description inherited from TCastleAbstractJoint.GetKraftJoint. Get physics engine (Kraft) joint instance. |
procedure CreateKraftJoint; override; |
|
This item has no description. Showing description inherited from TCastleAbstractJoint.CreateKraftJoint. Create physics engine (Kraft) joint and set its specialized properties. |
procedure DeinitializeKraftJoint; override; |
|
This item has no description. |
procedure SetName(const Value: TComponentName); override; |
|
This item has no description. |
constructor Create(AOwner: TComponent); override; |
|
This item has no description. |
destructor Destroy; override; |
|
This item has no description. |
procedure WorldBeforeDetach; override; |
|
This item has no description. Showing description inherited from TCastleBehavior.WorldBeforeDetach.
Called before Parent stops being part of World. Called only if ListenWorldChange is This is also called at the destruction of behavior (more precisely from BeforeDestruction now). Even in this case, we guarantee that Parent is still valid during this call, and not in half-destroyed state. Before the actual destructor of TCastleBehavior we do BeforeParentDetach and BeforeWorldDetach and set Parent to |
procedure InternalCreateGizmos; override; |
|
This item has no description. Showing description inherited from TCastleAbstractJoint.InternalCreateGizmos.
Create design-time transformations that are displayed in the hierarchy to visualize physics joints 3D points. If you want to visualize the behavior using a visible TCastleTransform, then create and add to Parent a descendant of TCastleJointTool, and set InternalCastleDesignInvalidate to |
procedure InternalDestroyGizmos; override; |
|
This item has no description. Showing description inherited from TCastleAbstractJoint.InternalDestroyGizmos.
Destroy design-time stuff. You can destroy any component, just be sure to set InternalCastleDesignInvalidate to |
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. |
Properties
property Anchor: TVector3 read FAnchor write SetAnchor; |
|
Point, in local coordinates, that will be pulled to TargetWorld. |
property TargetWorld: TVector3 read FTargetWorld write SetTargetWorld; |
|
Point, in world coordinates, that pulls Anchor. With time, Anchor (in local coords) will match TargetWorld (in world coords). |
property FrequencyHz: Single read FFrequencyHz write SetFrequencyHz default DefaultFrequencyHz; |
|
Frequency controls how fast the oscillations occur. The smaller the value, the longer the oscillation movement. This may not seem intuitive, but a higher value causes the oscillation in specified time to be faster and therefore the movement is shorter. So if you want longer movement make this value smaller. See live example: https://gamedev.stackexchange.com/questions/98772/b2distancejoint-with-frequency-equal-to-0-vs-b2weldjoint |
property DampingRatio: Single read FDampingRatio write SetDampingRatio default DefaultDampingRatio; |
|
How fast the oscillations are damped, large values can cause the body will not do even one oscillation. |
property MaxForce: Single read FMaxForce write SetMaxForce default 0.0; |
|
Maximal force that will be aplied to the body to move it. Zero (default) means "unlimited". |
property AnchorPersistent: TCastleVector3Persistent read FAnchorPersistent ; |
|
Anchor 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 Anchor directly. See also
|
property TargetWorldPersistent: TCastleVector3Persistent read FTargetWorldPersistent ; |
|
TargetWorld 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 TargetWorld directly. See also
|
Generated by PasDoc 0.16.0-snapshot.