Property | Type | Description | |
---|---|---|---|
collidesWithLayers | int | ||
isTrigger | bool | ||
physicsLayer | int | ||
shape | |||
shouldColliderScaleAndRotateWithTransform | bool |
Property | Type | Description | |
---|---|---|---|
_colliderRequiresAutoSizing | bool | ||
_isColliderRegistered | bool | ||
_isParentEntityAddedToScene | bool | ||
_localOffset | Vector2 |
Method | Description | |
---|---|---|
clone ( ) : Component | ||
collidesWith ( |
checks to see if this Collider collides with collider. If it does, true will be returned and result will be populated with collision data
|
|
collidesWith ( |
checks to see if this Collider with motion applied (delta movement vector) collides with collider. If it does, true will be returned and result will be populated with collision data.
|
|
collidesWithAny ( |
checks to see if this Collider collides with any other Colliders in the Scene. The first Collider it intersects will have its collision data returned in the CollisionResult.
|
|
collidesWithAny ( Vector2 &motion, |
checks to see if this Collider with motion applied (delta movement vector) collides with any collider. If it does, true will be returned and result will be populated with collision data. Motion will be set to the maximum distance the Collider can travel before colliding.
|
|
onAddedToEntity ( ) : void | ||
onDisabled ( ) : void | ||
onEnabled ( ) : void | ||
onEntityTransformChanged ( |
||
onRemovedFromEntity ( ) : void | ||
overlaps ( |
checks to see if this shape overlaps any other Colliders in the Physics system
|
|
registerColliderWithPhysicsSystem ( ) : void |
the parent Entity will call this at various times (when added to a scene, enabled, etc)
|
|
setLocalOffset ( Vector2 offset ) : |
localOffset is added to entity.position to get the final position for the collider. This allows you to add multiple Colliders to an Entity and position them separately.
|
|
setShouldColliderScaleAndRotateWithTransform ( bool shouldColliderScaleAndRotateWithTransform ) : |
if set to true, the Collider will scale and rotate following the Transform it is attached to
|
|
unregisterColliderWithPhysicsSystem ( ) : void |
the parent Entity will call this at various times (when removed from a scene, disabled, etc)
|
public collidesWith ( |
||
collider | Collider. | |
result | Result. | |
return | bool |
public collidesWith ( |
||
collider | Collider. | |
motion | Vector2 | Motion. |
result | Result. | |
return | bool |
public collidesWithAny ( |
||
result | Result. | |
return | bool |
public collidesWithAny ( Vector2 &motion, |
||
motion | Vector2 | Motion. |
result | Result. | |
return | bool |
public onEntityTransformChanged ( |
||
comp | ||
return | void |
public registerColliderWithPhysicsSystem ( ) : void | ||
return | void |
public setLocalOffset ( Vector2 offset ) : |
||
offset | Vector2 | Offset. |
return |
public setShouldColliderScaleAndRotateWithTransform ( bool shouldColliderScaleAndRotateWithTransform ) : |
||
shouldColliderScaleAndRotateWithTransform | bool | If set to |
return |
public unregisterColliderWithPhysicsSystem ( ) : void | ||
return | void |
protected bool _colliderRequiresAutoSizing | ||
return | bool |
protected bool _isParentEntityAddedToScene | ||
return | bool |