-
Notifications
You must be signed in to change notification settings - Fork 0
CollisionShape2D
Home | API by Category | Complete API Index | API Compatibility
| Field | Value |
|---|---|
| Full name | Electron2D.CollisionShape2D |
| Namespace | Electron2D |
| Kind | class |
| Category | Physics |
Provides a node that attaches a Electron2D.Shape2D to a collision object.
public class Electron2D.CollisionShape2D : Electron2D.Node2DThis node stores a shape resource reference and validates shape placement
rules when it enters a Electron2D.SceneTree.
This type is not synchronized. Create and mutate nodes on the main scene thread.
This type is available since Electron2D 0.1.0 Preview.
Electron2D.CollisionObject2DElectron2D.Shape2D
| Member | Kind | Summary |
|---|---|---|
DebugColor |
Property | Gets or sets the color used for collision shape debug visualization. |
Disabled |
Property | Gets or sets whether the shape is disabled. |
OneWayCollision |
Property | Gets or sets whether the shape should act as a one-way collision shape. |
OneWayCollisionMargin |
Property | Gets or sets the one-way collision margin. |
Shape |
Property | Gets or sets the shape resource attached by this node. |
Electron2D.CollisionShape2D() |
Constructor | Initializes a new instance of the CollisionShape2D type. |
Kind: Property
public Electron2D.Color DebugColor { get; set; }Gets or sets the color used for collision shape debug visualization.
This value is consumed by the internal debug collision shape snapshot
when Electron2D.SceneTree.DebugCollisionsHint is enabled.
The property stores only managed color data and does not expose renderer or physics backend handles.
The override color. Electron2D.Color.Transparent means that the
engine default debug color should be used.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.SceneTree.DebugCollisionsHint
Kind: Property
public System.Boolean Disabled { get; set; }Gets or sets whether the shape is disabled.
Disabled shapes do not participate in overlap, query or motion checks. They can still be present in debug visualization snapshots so the editor can show that the shape exists but is inactive.
true when the shape should be ignored by physics checks;
otherwise, false.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.CollisionShape2D.Shape
Kind: Property
public System.Boolean OneWayCollision { get; set; }Gets or sets whether the shape should act as a one-way collision shape.
The current managed motion baseline uses this value for downward movement against static shapes.
true to make the shape one-way for supported motion checks;
otherwise, false.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.CollisionShape2D.OneWayCollisionMargin
Kind: Property
public System.Single OneWayCollisionMargin { get; set; }Gets or sets the one-way collision margin.
Higher values make one-way collision more tolerant for fast movement.
The margin in world units used by one-way collision checks.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.CollisionShape2D.OneWayCollision
Kind: Property
public Electron2D.Shape2D Shape { get; set; }Gets or sets the shape resource attached by this node.
The 0.1.0 Preview baseline uses this resource for managed AABB overlap, query, motion and debug visualization snapshots.
The assigned Electron2D.Shape2D resource, or null when this
node has no collision geometry.
-
System.InvalidOperationException: Thrown when aElectron2D.ConcavePolygonShape2Dis assigned under a collision owner that is not aElectron2D.StaticBody2D.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.CollisionShape2D.DebugColor
Kind: Constructor
public Electron2D.CollisionShape2D()Initializes a new instance of the CollisionShape2D 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.CollisionShape2D
Electron2D 0.1.0 Preview API reference. Generated from 175 public runtime types.