reckfellENGINE

Entity3D

Base object in 3D space, inherited by all 3D nodes.

On this page
class Entity3DReckfellSharpInherits Entity

Base object in 3D space, inherited by all 3D entities.

The Entity3D entity is the base representation of a entity in 3D space. All other 3D entities inherit from this class. Affine operations (translation, rotation, scale) are calculated in the coordinate system relative to the parent, unless the Entity3D's Entity3D.TopLevel is true. In this coordinate system, affine operations correspond to direct affine operations on the Entity3D's Entity3D.Transform. The term parent space refers to this coordinate system. The coordinate system that is attached to the Entity3D itself is referred to as object-local coordinate system, or local space. Note: Unless otherwise specified, all methods that need angle parameters must receive angles in radians. To convert degrees to radians, use @GlobalScope.deg_to_rad. Note: In Reckfell and older, Entity3D was named Spatial.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

Entity3DConstructor
# Entity3D
C#
public Entity3D();

Properties17

BasisProperty
# Basis
C#
public Basis Basis { get; set; }

Basis of the Entity3D.Transform property. Represents the rotation, scale, and shear of this entity in parent space (relative to the parent entity).

GlobalBasisProperty
# GlobalBasis
C#
public Basis GlobalBasis { get; set; }

Basis of the Entity3D.GlobalTransform property. Represents the rotation, scale, and shear of this entity in global space (relative to the world). Note: If the entity is not inside the tree, getting this property fails and returns Basis.Identity.

GlobalPositionProperty
# GlobalPosition
C#
public Vector3 GlobalPosition { get; set; }

Global position (translation) of this entity in global space (relative to the world). This is equivalent to the Entity3D.GlobalTransform's Transform3D.Origin. Note: If the entity is not inside the tree, getting this property fails and returns Vector3.Zero.

GlobalRotationProperty
# GlobalRotation
C#
public Vector3 GlobalRotation { get; set; }

Global rotation of this entity as Euler angles, in radians and in global space (relative to the world). This value is obtained from Entity3D.GlobalBasis's rotation.

  • The Vector3.X is the angle around the global X axis (pitch);
  • The Vector3.Y is the angle around the global Y axis (yaw);
  • The Vector3.Z is the angle around the global Z axis (roll). Note: Unlike Entity3D.Rotation, this property always follows the YXZ convention (EULER_ORDER_YXZ). Note: If the entity is not inside the tree, getting this property fails and returns Vector3.Zero.
GlobalRotationDegreesProperty
# GlobalRotationDegrees
C#
public Vector3 GlobalRotationDegrees { get; set; }

The Entity3D.GlobalRotation of this entity, in degrees instead of radians. Note: If the entity is not inside the tree, getting this property fails and returns Vector3.Zero.

GlobalTransformProperty
# GlobalTransform
C#
public Transform3D GlobalTransform { get; set; }

The transformation of this entity, in global space (relative to the world). Contains and represents this entity's Entity3D.GlobalPosition, Entity3D.GlobalRotation, and global scale. Note: If the entity is not inside the tree, getting this property fails and returns Transform3D.Identity.

PositionProperty
# Position
C#
public Vector3 Position { get; set; }

Position (translation) of this entity in parent space (relative to the parent entity). This is equivalent to the Entity3D.Transform's Transform3D.Origin.

QuaternionProperty
# Quaternion
C#
public Quaternion Quaternion { get; set; }

Rotation of this entity represented as a Quaternion in parent space (relative to the parent entity). This value is obtained from Entity3D.Basis's rotation. Note: Quaternions are much more suitable for 3D math but are less intuitive. Setting this property can be useful for interpolation (see Quaternion.Slerp).

RotationProperty
# Rotation
C#
public Vector3 Rotation { get; set; }

Rotation of this entity as Euler angles, in radians and in parent space (relative to the parent entity). This value is obtained from Entity3D.Basis's rotation.

  • The Vector3.X is the angle around the local X axis (pitch);
  • The Vector3.Y is the angle around the local Y axis (yaw);
  • The Vector3.Z is the angle around the local Z axis (roll). The order of each consecutive rotation can be changed with Entity3D.RotationOrder (see EulerOrder constants). In Reckfell, Euler angles always use intrinsic order. By default, the intrinsic YXZ convention is used (EULER_ORDER_YXZ). Note: This property is edited in degrees in the inspector. If you want to use degrees in a script, use Entity3D.RotationDegrees.
RotationDegreesProperty
# RotationDegrees
C#
public Vector3 RotationDegrees { get; set; }

The Entity3D.Rotation of this entity, in degrees instead of radians. Note: This is not the property available in the Inspector dock.

RotationEditModeProperty
# RotationEditMode
C#
public Entity3D.RotationEditModeEnum RotationEditMode { get; set; }

How this entity's rotation and scale are displayed in the Inspector dock.

RotationOrderProperty
# RotationOrder
C#
public EulerOrder RotationOrder { get; set; }

The axis rotation order of the Entity3D.Rotation property. In Reckfell, Euler angles always use intrinsic order, meaning that the final orientation is calculated by rotating around the local axes in this order.

ScaleProperty
# Scale
C#
public Vector3 Scale { get; set; }

Scale of this entity in local space (relative to this entity). This value is obtained from Entity3D.Basis's scale. Note: The behavior of some 3D entity types is not affected by this property. These include Light3D, Camera3D, AudioStreamPlayer3D, and more. Warning: The scale's components must either be all positive or all negative, and not exactly 0.0. Otherwise, it won't be possible to obtain the scale from the Entity3D.Basis. This may cause the intended scale to be lost when reloaded from disk, and potentially other unstable behavior.

TopLevelProperty
# TopLevel
C#
public bool TopLevel { get; set; }

If true, the entity does not inherit its transformations from its parent. As such, entity transformations will only be in global space, which also means that Entity3D.GlobalTransform and Entity3D.Transform will be identical.

TransformProperty
# Transform
C#
public Transform3D Transform { get; set; }

The local transformation of this entity, in parent space (relative to the parent entity). Contains and represents this entity's Entity3D.Position, Entity3D.Rotation, and Entity3D.Scale.

VisibilityParentProperty
# VisibilityParent
C#
public EntityPath VisibilityParent { get; set; }

Path to the visibility range parent for this entity and its descendants. The visibility parent must be a GeometryInstance3D. Any visual instance will only be visible if the visibility parent (and all of its visibility ancestors) is hidden by being closer to the camera than its own GeometryInstance3D.VisibilityRangeBegin. entities hidden via the Entity3D.Visible property are essentially removed from the visibility dependency tree, so dependent instances will not take the hidden entity or its descendants into account.

VisibleProperty
# Visible
C#
public bool Visible { get; set; }

If true, this entity can be visible. The entity is only rendered when all of its ancestors are visible, as well. That means Entity3D.IsVisibleInTree must return true.

Methods73

AddGizmovoid
# AddGizmo
C#
public void AddGizmo(Entity3DGizmo gizmo);

Attaches the given gizmo to this entity. Only works in the editor. Note: gizmo should be an EditorEntity3DGizmo. The argument type is Entity3DGizmo to avoid depending on editor classes in Entity3D.

Parameters
NameTypeDefault
gizmoEntity3DGizmo—
ClearGizmosvoid
# ClearGizmos
C#
public void ClearGizmos();

Clears all EditorEntity3DGizmo objects attached to this entity. Only works in the editor.

ClearSubgizmoSelectionvoid
# ClearSubgizmoSelection
C#
public void ClearSubgizmoSelection();

Deselects all subgizmos for this entity. Useful to call when the selected subgizmo may no longer exist after a property change. Only works in the editor.

ForceUpdateTransformvoid
# ForceUpdateTransform
C#
public void ForceUpdateTransform();

Forces the entity's Entity3D.GlobalTransform to update, by sending Entity3D.NotificationTransformChanged. Fails if the entity is not inside the tree. Note: For performance reasons, transform changes are usually accumulated and applied once at the end of the frame. The update propagates through Entity3D children, as well. Therefore, use this method only when you need an up-to-date transform (such as during physics operations).

GetBasisBasis
# GetBasis
C#
public Basis GetBasis();
Returns Basis
GetGizmosReckfell.Collections.Array<Entity3DGizmo>
# GetGizmos
C#
public Reckfell.Collections.Array<Entity3DGizmo> GetGizmos();

Returns all the EditorEntity3DGizmo objects attached to this entity. Only works in the editor.

Returns Reckfell.Collections.Array<Entity3DGizmo>
GetGlobalBasisBasis
# GetGlobalBasis
C#
public Basis GetGlobalBasis();
Returns Basis
GetGlobalPositionVector3
# GetGlobalPosition
C#
public Vector3 GetGlobalPosition();
Returns Vector3
GetGlobalRotationVector3
# GetGlobalRotation
C#
public Vector3 GetGlobalRotation();
Returns Vector3
GetGlobalRotationDegreesVector3
# GetGlobalRotationDegrees
C#
public Vector3 GetGlobalRotationDegrees();
Returns Vector3
GetGlobalTransformTransform3D
# GetGlobalTransform
C#
public Transform3D GetGlobalTransform();
Returns Transform3D
GetGlobalTransformInterpolatedTransform3D
# GetGlobalTransformInterpolated
C#
public Transform3D GetGlobalTransformInterpolated();

Returns a visual world transform for per-frame consumers such as a camera. Current 3D composes it from EntityTreeFTI local hierarchy. In the physics phase or with the global system disabled it is not a separate predicted pose; do not use it for authoritative collisions.

Returns Transform3D
GetParentEntity3DEntity3D
# GetParentEntity3D
C#
public Entity3D GetParentEntity3D();

Returns the parent Entity3D that directly affects this entity's Entity3D.GlobalTransform. Returns null if no parent exists, the parent is not a Entity3D, or Entity3D.TopLevel is true. Note: This method is not always equivalent to Entity.GetParent, which does not take Entity3D.TopLevel into account.

Returns Entity3D
GetPositionVector3
# GetPosition
C#
public Vector3 GetPosition();
Returns Vector3
GetQuaternionQuaternion
# GetQuaternion
C#
public Quaternion GetQuaternion();
Returns Quaternion
GetRotationVector3
# GetRotation
C#
public Vector3 GetRotation();
Returns Vector3
GetRotationDegreesVector3
# GetRotationDegrees
C#
public Vector3 GetRotationDegrees();
Returns Vector3
GetRotationEditModeEntity3D.RotationEditModeEnum
# GetRotationEditMode
C#
public Entity3D.RotationEditModeEnum GetRotationEditMode();
Returns Entity3D.RotationEditModeEnum
GetRotationOrderEulerOrder
# GetRotationOrder
C#
public EulerOrder GetRotationOrder();
Returns EulerOrder
GetScaleVector3
# GetScale
C#
public Vector3 GetScale();
Returns Vector3
GetTransformTransform3D
# GetTransform
C#
public Transform3D GetTransform();
Returns Transform3D
GetVisibilityParentEntityPath
# GetVisibilityParent
C#
public EntityPath GetVisibilityParent();
Returns EntityPath
GetWorld3DWorld3D
# GetWorld3D
C#
public World3D GetWorld3D();

Returns the World3D this entity is registered to. Usually, this is the same as the world used by this entity's viewport (see Entity.GetViewport and Viewport.FindWorld3D).

Returns World3D
GlobalRotatevoid
# GlobalRotate
C#
public void GlobalRotate(Vector3 axis, float angle);

Rotates this entity's Entity3D.GlobalBasis around the global axis by the given angle, in radians. This operation is calculated in global space (relative to the world) and preserves the Entity3D.GlobalPosition.

Parameters
NameTypeDefault
axisVector3—
anglefloat—
GlobalScalevoid
# GlobalScale
C#
public void GlobalScale(Vector3 scale);

Scales this entity's Entity3D.GlobalBasis by the given Entity3D.Scale factor. This operation is calculated in global space (relative to the world) and preserves the Entity3D.GlobalPosition. Note: This method is not to be confused with the Entity3D.Scale property.

Parameters
NameTypeDefault
scaleVector3—
GlobalTranslatevoid
# GlobalTranslate
C#
public void GlobalTranslate(Vector3 offset);

Adds the given translation offset to the entity's Entity3D.GlobalPosition in global space (relative to the world).

Parameters
NameTypeDefault
offsetVector3—
Hidevoid
# Hide
C#
public void Hide();

Prevents this entity from being rendered. Equivalent to setting Entity3D.Visible to false. This is the opposite of Entity3D.Show.

IsLocalTransformNotificationEnabledbool
# IsLocalTransformNotificationEnabled
C#
public bool IsLocalTransformNotificationEnabled();

Returns true if the entity receives Entity3D.NotificationLocalTransformChanged whenever Entity3D.Transform changes. This is enabled with Entity3D.SetNotifyLocalTransform.

Returns bool
IsScaleDisabledbool
# IsScaleDisabled
C#
public bool IsScaleDisabled();

Returns true if this entity's Entity3D.GlobalTransform is automatically orthonormalized. This results in this entity not appearing distorted, as if its global scale were set to Vector3.One (or its negative counterpart). See also Entity3D.SetDisableScale and Entity3D.Orthonormalize. Note: Entity3D.Transform is not affected by this setting.

Returns bool
IsSetAsTopLevelbool
# IsSetAsTopLevel
C#
public bool IsSetAsTopLevel();
Returns bool
IsTransformNotificationEnabledbool
# IsTransformNotificationEnabled
C#
public bool IsTransformNotificationEnabled();

Returns true if the entity receives Entity3D.NotificationTransformChanged whenever Entity3D.GlobalTransform changes. This is enabled with Entity3D.SetNotifyTransform.

Returns bool
IsVisiblebool
# IsVisible
C#
public bool IsVisible();
Returns bool
IsVisibleInTreebool
# IsVisibleInTree
C#
public bool IsVisibleInTree();

Returns true if this entity is inside the scene tree and the Entity3D.Visible property is true for this entity and all of its Entity3D ancestors in sequence. An ancestor of any other type (such as Entity or Entity2D) breaks the sequence. See also Entity.GetParent. Note: This method cannot take VisualInstance3D.Layers into account, so even if this method returns true, the entity may not be rendered.

Returns bool
LookAt2 overloads
# LookAt · 1/2
C#
public void LookAt(Vector3 target, Vector3? up);

Rotates the entity so that the local forward axis (-Z, Vector3.Forward) points toward the target position. This operation is calculated in global space (relative to the world). The local up axis (+Y) points as close to the up vector as possible while staying perpendicular to the local forward axis. The resulting transform is orthogonal, and the scale is preserved. Non-uniform scaling may not work correctly. The target position cannot be the same as the entity's position, the up vector cannot be Vector3.Zero. Furthermore, the direction from the entity's position to the target position cannot be parallel to the up vector, to avoid an unintended rotation around the local Z axis. If use_model_front is true, the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the target position. By default, the -Z axis (camera forward) is treated as forward (implies +X is right). Note: This method fails if the entity is not in the scene tree. If necessary, use Entity3D.LookAtFromPosition instead.

Parameters
NameTypeDefault
targetVector3—
upVector3?—
# LookAt · 2/2
C#
public void LookAt(Vector3 target, Vector3? up = default, bool useModelFront = false);

Rotates the entity so that the local forward axis (-Z, Vector3.Forward) points toward the target position. This operation is calculated in global space (relative to the world). The local up axis (+Y) points as close to the up vector as possible while staying perpendicular to the local forward axis. The resulting transform is orthogonal, and the scale is preserved. Non-uniform scaling may not work correctly. The target position cannot be the same as the entity's position, the up vector cannot be Vector3.Zero. Furthermore, the direction from the entity's position to the target position cannot be parallel to the up vector, to avoid an unintended rotation around the local Z axis. If use_model_front is true, the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the target position. By default, the -Z axis (camera forward) is treated as forward (implies +X is right). Note: This method fails if the entity is not in the scene tree. If necessary, use Entity3D.LookAtFromPosition instead.

Parameters
NameTypeDefault
targetVector3—
upVector3?default
useModelFrontboolfalse
up

If the parameter is null, then the default value is new Vector3(0.0f, 1.0f, 0.0f).

LookAtFromPosition2 overloads
# LookAtFromPosition · 1/2
C#
public void LookAtFromPosition(Vector3 position, Vector3 target, Vector3? up);

Moves the entity to the specified Entity3D.Position, then rotates the entity to point toward the target position, similar to Entity3D.LookAt. This operation is calculated in global space (relative to the world).

Parameters
NameTypeDefault
positionVector3—
targetVector3—
upVector3?—
# LookAtFromPosition · 2/2
C#
public void LookAtFromPosition(Vector3 position, Vector3 target, Vector3? up = default, bool useModelFront = false);

Moves the entity to the specified Entity3D.Position, then rotates the entity to point toward the target position, similar to Entity3D.LookAt. This operation is calculated in global space (relative to the world).

Parameters
NameTypeDefault
positionVector3—
targetVector3—
upVector3?default
useModelFrontboolfalse
up

If the parameter is null, then the default value is new Vector3(0.0f, 1.0f, 0.0f).

Orthonormalizevoid
# Orthonormalize
C#
public void Orthonormalize();

Orthonormalizes this entity's Entity3D.Basis. This method sets this entity's Entity3D.Scale to Vector3.One (or its negative counterpart), but preserves the Entity3D.Position and Entity3D.Rotation. See also Transform3D.Orthonormalized.

Rotatevoid
# Rotate
C#
public void Rotate(Vector3 axis, float angle);

Rotates this entity's Entity3D.Basis around the axis by the given angle, in radians. This operation is calculated in parent space (relative to the parent) and preserves the Entity3D.Position.

Parameters
NameTypeDefault
axisVector3—
anglefloat—
RotateObjectLocalvoid
# RotateObjectLocal
C#
public void RotateObjectLocal(Vector3 axis, float angle);

Rotates this entity's Entity3D.Basis around the axis by the given angle, in radians. This operation is calculated in local space (relative to this entity) and preserves the Entity3D.Position.

Parameters
NameTypeDefault
axisVector3—
anglefloat—
RotateXvoid
# RotateX
C#
public void RotateX(float angle);

Rotates this entity's Entity3D.Basis around the X axis by the given angle, in radians. This operation is calculated in parent space (relative to the parent) and preserves the Entity3D.Position.

Parameters
NameTypeDefault
anglefloat—
RotateYvoid
# RotateY
C#
public void RotateY(float angle);

Rotates this entity's Entity3D.Basis around the Y axis by the given angle, in radians. This operation is calculated in parent space (relative to the parent) and preserves the Entity3D.Position.

Parameters
NameTypeDefault
anglefloat—
RotateZvoid
# RotateZ
C#
public void RotateZ(float angle);

Rotates this entity's Entity3D.Basis around the Z axis by the given angle, in radians. This operation is calculated in parent space (relative to the parent) and preserves the Entity3D.Position.

Parameters
NameTypeDefault
anglefloat—
ScaleObjectLocalvoid
# ScaleObjectLocal
C#
public void ScaleObjectLocal(Vector3 scale);

Scales this entity's Entity3D.Basis by the given Entity3D.Scale factor. This operation is calculated in local space (relative to this entity) and preserves the Entity3D.Position.

Parameters
NameTypeDefault
scaleVector3—
SetAsTopLevelvoid
# SetAsTopLevel
C#
public void SetAsTopLevel(bool enable);
Parameters
NameTypeDefault
enablebool—
SetBasisvoid
# SetBasis
C#
public void SetBasis(Basis basis);
Parameters
NameTypeDefault
basisBasis—
SetDisableScalevoid
# SetDisableScale
C#
public void SetDisableScale(bool disable);

Enables world Basis orthonormalization on recalculation. In 1.0.0 the call itself does not invalidate an already cached GlobalTransform. Set the flag before adding the Entity to the tree, or assign Transform = Transform after changing the flag to request recalculation. Local Transform and position are preserved.

Parameters
NameTypeDefault
disablebool—
disable

True enables world-basis orthonormalization; false restores ordinary scale inheritance after recalculation.

SetGlobalBasisvoid
# SetGlobalBasis
C#
public void SetGlobalBasis(Basis basis);
Parameters
NameTypeDefault
basisBasis—
SetGlobalPositionvoid
# SetGlobalPosition
C#
public void SetGlobalPosition(Vector3 position);
Parameters
NameTypeDefault
positionVector3—
SetGlobalRotationvoid
# SetGlobalRotation
C#
public void SetGlobalRotation(Vector3 eulerRadians);
Parameters
NameTypeDefault
eulerRadiansVector3—
SetGlobalRotationDegreesvoid
# SetGlobalRotationDegrees
C#
public void SetGlobalRotationDegrees(Vector3 eulerDegrees);
Parameters
NameTypeDefault
eulerDegreesVector3—
SetGlobalTransformvoid
# SetGlobalTransform
C#
public void SetGlobalTransform(Transform3D global);
Parameters
NameTypeDefault
globalTransform3D—
SetIdentityvoid
# SetIdentity
C#
public void SetIdentity();

Sets this entity's Entity3D.Transform to Transform3D.Identity, which resets all transformations in parent space (Entity3D.Position, Entity3D.Rotation, and Entity3D.Scale).

SetIgnoreTransformNotificationvoid
# SetIgnoreTransformNotification
C#
public void SetIgnoreTransformNotification(bool enabled);

If true, the entity will not receive Entity3D.NotificationTransformChanged or Entity3D.NotificationLocalTransformChanged. It may useful to call this method when handling these notifications to prevent infinite recursion.

Parameters
NameTypeDefault
enabledbool—
SetNotifyLocalTransformvoid
# SetNotifyLocalTransform
C#
public void SetNotifyLocalTransform(bool enable);

If true, the entity will receive Entity3D.NotificationLocalTransformChanged whenever Entity3D.Transform changes. Note: Some 3D entities such as CsgShape3D or CollisionShape3D automatically enable this to function correctly.

Parameters
NameTypeDefault
enablebool—
SetNotifyTransformvoid
# SetNotifyTransform
C#
public void SetNotifyTransform(bool enable);

If true, the entity will receive Entity3D.NotificationTransformChanged whenever Entity3D.GlobalTransform changes. Note: Most 3D entities such as VisualInstance3D or CollisionObject3D automatically enable this to function correctly. Note: In the editor, entities will propagate this notification to their children if a gizmo is attached (see Entity3D.AddGizmo).

Parameters
NameTypeDefault
enablebool—
SetPositionvoid
# SetPosition
C#
public void SetPosition(Vector3 position);
Parameters
NameTypeDefault
positionVector3—
SetQuaternionvoid
# SetQuaternion
C#
public void SetQuaternion(Quaternion quaternion);
Parameters
NameTypeDefault
quaternionQuaternion—
SetRotationvoid
# SetRotation
C#
public void SetRotation(Vector3 eulerRadians);
Parameters
NameTypeDefault
eulerRadiansVector3—
SetRotationDegreesvoid
# SetRotationDegrees
C#
public void SetRotationDegrees(Vector3 eulerDegrees);
Parameters
NameTypeDefault
eulerDegreesVector3—
SetRotationEditModevoid
# SetRotationEditMode
C#
public void SetRotationEditMode(Entity3D.RotationEditModeEnum editMode);
Parameters
NameTypeDefault
editModeEntity3D.RotationEditModeEnum—
SetRotationOrdervoid
# SetRotationOrder
C#
public void SetRotationOrder(EulerOrder order);
Parameters
NameTypeDefault
orderEulerOrder—
SetScalevoid
# SetScale
C#
public void SetScale(Vector3 scale);
Parameters
NameTypeDefault
scaleVector3—
SetSubgizmoSelectionvoid
# SetSubgizmoSelection
C#
public void SetSubgizmoSelection(Entity3DGizmo gizmo, int id, Transform3D transform);

Selects the gizmo's subgizmo with the given id and sets its transform. Only works in the editor. Note: The gizmo object would typically be an instance of EditorEntity3DGizmo, but the argument type is kept generic to avoid creating a dependency on editor classes in Entity3D.

Parameters
NameTypeDefault
gizmoEntity3DGizmo—
idint—
transformTransform3D—
SetTransformvoid
# SetTransform
C#
public void SetTransform(Transform3D local);
Parameters
NameTypeDefault
localTransform3D—
SetVisibilityParentvoid
# SetVisibilityParent
C#
public void SetVisibilityParent(EntityPath path);
Parameters
NameTypeDefault
pathEntityPath—
SetVisiblevoid
# SetVisible
C#
public void SetVisible(bool visible);
Parameters
NameTypeDefault
visiblebool—
Showvoid
# Show
C#
public void Show();

Allows this entity to be rendered. Equivalent to setting Entity3D.Visible to true. This is the opposite of Entity3D.Hide.

ToGlobalVector3
# ToGlobal
C#
public Vector3 ToGlobal(Vector3 localPoint);

Returns the local_point converted from this entity's local space to global space. This is the opposite of Entity3D.ToLocal.

Parameters
NameTypeDefault
localPointVector3—
Returns Vector3
ToLocalVector3
# ToLocal
C#
public Vector3 ToLocal(Vector3 globalPoint);

Returns the global_point converted from global space to this entity's local space. This is the opposite of Entity3D.ToGlobal.

Parameters
NameTypeDefault
globalPointVector3—
Returns Vector3
Translatevoid
# Translate
C#
public void Translate(Vector3 offset);

Adds the given translation offset to the entity's position, in local space (relative to this entity). Note: Prefer using Entity3D.TranslateObjectLocal, instead, as this method may be changed in a future release. Note: Despite the naming convention, this operation is not calculated in parent space for compatibility reasons. To translate in parent space, add offset to the Entity3D.Position (node_3d.position += offset).

Parameters
NameTypeDefault
offsetVector3—
TranslateObjectLocalvoid
# TranslateObjectLocal
C#
public void TranslateObjectLocal(Vector3 offset);

Adds the given translation offset to the entity's position, in local space (relative to this entity).

Parameters
NameTypeDefault
offsetVector3—
UpdateGizmosvoid
# UpdateGizmos
C#
public void UpdateGizmos();

Updates all the EditorEntity3DGizmo objects attached to this entity. Only works in the editor.

Signals and events1

VisibilityChangedEvent
# VisibilityChanged
C#
public event Action VisibilityChanged;

Emitted when this entity's visibility changes (see Entity3D.Visible and Entity3D.IsVisibleInTree). This signal is emitted after the related Entity3D.NotificationVisibilityChanged notification.

Fields and constants5

NotificationEnterWorldField
# NotificationEnterWorld
C#
public const long NotificationEnterWorld = 41;

Notification received when this entity is registered to a new World3D (see Entity3D.GetWorld3D).

NotificationExitWorldField
# NotificationExitWorld
C#
public const long NotificationExitWorld = 42;

Notification received when this entity is unregistered from the current World3D (see Entity3D.GetWorld3D). This notification is sent in reversed order.

NotificationLocalTransformChangedField
# NotificationLocalTransformChanged
C#
public const long NotificationLocalTransformChanged = 44;

Notification received when this entity's Entity3D.Transform changes, if Entity3D.IsLocalTransformNotificationEnabled is true. This is not received when a parent Entity3D's Entity3D.Transform changes. See also Entity3D.SetNotifyLocalTransform. Note: Some 3D entities such as CsgShape3D or CollisionShape3D automatically enable this to function correctly.

NotificationTransformChangedField
# NotificationTransformChanged
C#
public const long NotificationTransformChanged = 2000;

Notification received when this entity's Entity3D.GlobalTransform changes, if Entity3D.IsTransformNotificationEnabled is true. See also Entity3D.SetNotifyTransform. Note: Most 3D entities such as VisualInstance3D or CollisionObject3D automatically enable this to function correctly. Note: In the editor, entities will propagate this notification to their children if a gizmo is attached (see Entity3D.AddGizmo).

NotificationVisibilityChangedField
# NotificationVisibilityChanged
C#
public const long NotificationVisibilityChanged = 43;

Notification received when this entity's visibility changes (see Entity3D.Visible and Entity3D.IsVisibleInTree). This notification is received before the related Entity3D.VisibilityChanged signal.

Entity3D.RotationEditModeEnum

ValueDescription
Basis = 2

The rotation is edited using a Basis. In this mode, the raw Entity3D.Basis's axes can be freely modified, but the Entity3D.Scale property is not available.

Euler = 0

The rotation is edited using a Vector3 in Euler angles. In Reckfell, Euler angles always use intrinsic order, meaning that rotation happens around the local axes of the object.

Quaternion = 1

The rotation is edited using a Quaternion. Quaternions avoid gimbal lock and having to choose an order of rotation, but are less intuitive. Quaternion rotation is mostly the same as rotors in 3D geometric algebra, except that the numbers are labeled differently.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.