RaycastColliderComponent class
Marks an entity as participating in ray-cast queries and defines its circular collision shape.
Add this component to any entity that should be hittable by rays.
entity.addComponent(RaycastColliderComponent(radius: 14.0, tag: 'enemy'));
Constructors
Properties
- componentType → Type
-
Type identifier for this component
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- height ↔ double
-
Height for AABB colliders (0 = use radius as circle).
getter/setter pair
- isBlocker ↔ bool
-
When
truethe ray terminates on this surface. Whenfalsethe hit is recorded but the ray continues through.getter/setter pair - isReflective ↔ bool
-
Whether rays can bounce off this surface.
getter/setter pair
- radius ↔ double
-
Collision radius in world units (used for circle colliders).
getter/setter pair
- reflectivity ↔ double
-
Energy coefficient applied to the reflected ray's distance (0–1).
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tag ↔ String?
-
Optional semantic tag used for filtering ray queries (e.g.
'enemy').getter/setter pair - width ↔ double
-
Width for AABB colliders (0 = use radius as circle).
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onAttach(
EntityId entityId) → void -
Called when this component is added to an entity.
inherited
-
onDetach(
EntityId entityId) → void -
Called when this component is removed from an entity.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited