-
Notifications
You must be signed in to change notification settings - Fork 0
RayCast2D
Home | API by Category | Complete API Index | API Compatibility
| Field | Value |
|---|---|
| Full name | Electron2D.RayCast2D |
| Namespace | Electron2D |
| Kind | class |
| Category | Physics |
Provides an Electron2D 2D raycast node.
public class Electron2D.RayCast2D : Electron2D.Node2DProfile: Electron2D 0.1.0 2D
Status: Partial / Not verified
Out of profile: yes
Godot reference: RayCast2D
Ray query settings, forced update and cached AABB hit result through PhysicsDirectSpaceState2D.
The 0.1.0 Preview baseline stores raycast query settings. Real physics query execution is introduced by the later raycast and shape query task, so result methods return an empty collision state.
This type is not synchronized. Create and mutate nodes on the main scene thread.
This type is available since Electron2D 0.1.0 Preview.
| Member | Kind | Summary |
|---|---|---|
CollideWithAreas |
Property | Gets or sets whether areas should be considered by the raycast. |
CollideWithBodies |
Property | Gets or sets whether bodies should be considered by the raycast. |
CollisionMask |
Property | Gets or sets the collision mask used by the raycast. |
Enabled |
Property | Gets or sets whether this raycast is enabled. |
ExcludeParent |
Property | Gets or sets whether the direct parent should be excluded from results. |
HitFromInside |
Property | Gets or sets whether hits are allowed when the ray starts inside a shape. |
TargetPosition |
Property | Gets or sets the ray target position in the node's local coordinates. |
Electron2D.RayCast2D() |
Constructor | Initializes a new instance of the RayCast2D type. |
ForceRaycastUpdate() |
Method | Updates the cached raycast result immediately. |
GetCollider() |
Method | Gets the object hit by the raycast. |
GetColliderRid() |
Method | Gets the RID of the object hit by the raycast. |
GetColliderShape() |
Method | Gets the shape index hit by the raycast. |
GetCollisionNormal() |
Method | Gets the collision normal reported by the raycast. |
GetCollisionPoint() |
Method | Gets the collision point reported by the raycast. |
IsColliding() |
Method | Checks whether the raycast currently collides with an object. |
Kind: Property
public System.Boolean CollideWithAreas { get; set; }Gets or sets whether areas should be considered by the raycast.
This property follows the validation and lifetime rules of its declaring type.
The current collide with areas value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.RayCast2D
Kind: Property
public System.Boolean CollideWithBodies { get; set; }Gets or sets whether bodies should be considered by the raycast.
This property follows the validation and lifetime rules of its declaring type.
The current collide with bodies value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.RayCast2D
Kind: Property
public System.UInt32 CollisionMask { get; set; }Gets or sets the collision mask used by the raycast.
This property follows the validation and lifetime rules of its declaring type.
The current collision mask value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.RayCast2D
Kind: Property
public System.Boolean Enabled { get; set; }Gets or sets whether this raycast is enabled.
This property follows the validation and lifetime rules of its declaring type.
The current enabled value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.RayCast2D
Kind: Property
public System.Boolean ExcludeParent { get; set; }Gets or sets whether the direct parent should be excluded from results.
This property follows the validation and lifetime rules of its declaring type.
The current exclude parent value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.RayCast2D
Kind: Property
public System.Boolean HitFromInside { get; set; }Gets or sets whether hits are allowed when the ray starts inside a shape.
This property follows the validation and lifetime rules of its declaring type.
The current hit from inside value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.RayCast2D
Kind: Property
public Electron2D.Vector2 TargetPosition { get; set; }Gets or sets the ray target position in the node's local coordinates.
This property follows the validation and lifetime rules of its declaring type.
The current target position value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.RayCast2D
Kind: Constructor
public Electron2D.RayCast2D()Initializes a new instance of the RayCast2D type.
The new instance follows the lifetime and validation rules of its declaring type.
This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.
This API is available since Electron2D 0.1.0 Preview.
Electron2D.RayCast2D
Kind: Method
public System.Void ForceRaycastUpdate()()Updates the cached raycast result immediately.
Real query execution is not part of the current baseline, so this method keeps the result in an empty state.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.RayCast2D
Kind: Method
public Electron2D.Object GetCollider()()Gets the object hit by the raycast.
This method follows the validation and lifetime rules of its declaring type.
null until the query backend is implemented.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.RayCast2D
Kind: Method
public Electron2D.Rid GetColliderRid()()Gets the RID of the object hit by the raycast.
This method follows the validation and lifetime rules of its declaring type.
The default empty Electron2D.Rid until the query backend is implemented.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.RayCast2D
Kind: Method
public System.Int32 GetColliderShape()()Gets the shape index hit by the raycast.
This method follows the validation and lifetime rules of its declaring type.
0 until the query backend is implemented.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.RayCast2D
Kind: Method
public Electron2D.Vector2 GetCollisionNormal()()Gets the collision normal reported by the raycast.
This method follows the validation and lifetime rules of its declaring type.
Electron2D.Vector2.Zero until the query backend is implemented.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.RayCast2D
Kind: Method
public Electron2D.Vector2 GetCollisionPoint()()Gets the collision point reported by the raycast.
This method follows the validation and lifetime rules of its declaring type.
Electron2D.Vector2.Zero until the query backend is implemented.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.RayCast2D
Kind: Method
public System.Boolean IsColliding()()Checks whether the raycast currently collides with an object.
This method follows the validation and lifetime rules of its declaring type.
false until the query backend is implemented.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.RayCast2D
Electron2D 0.1.0 Preview API reference. Generated from 175 public runtime types.