CollisionShape2D

Node that represents collision shape data in 2D space.

Editor facility for creating and editing collision shapes in 2D space. You can use this node to represent all sorts of collision shapes, for example, add this to an Area2D to give it a detection shape, or add it to a PhysicsBody2D to create a solid object. IMPORTANT: this is an Editor-only helper to create shapes, use CollisionObject2D.shapeOwnerGetShape to get the actual shape.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

_shapeChanged
void _shapeChanged()
getShape
Ref!Shape2D getShape()
isDisabled
bool isDisabled()
isOneWayCollisionEnabled
bool isOneWayCollisionEnabled()
opAssign
CollisionShape2D opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(CollisionShape2D other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
setDisabled
void setDisabled(bool disabled)
setOneWayCollision
void setOneWayCollision(bool enabled)
setShape
void setShape(Shape2D shape)

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

disabled
bool disabled [@property setter]

A disabled collision shape has no effect in the world.

disabled
bool disabled [@property getter]

A disabled collision shape has no effect in the world.

oneWayCollision
bool oneWayCollision [@property getter]
bool oneWayCollision [@property setter]

Sets whether this collision shape should only detect collision on one side (top or bottom).

shape
Shape2D shape [@property getter]
Shape2D shape [@property setter]

The actual shape owned by this collision shape.

Static functions

_new
CollisionShape2D _new()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

_classBinding
struct _classBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
ToRef as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta