Collision
ClassA state generated for ColliderComponent collision events.
- Available on all platforms
Since Lens Scripting v164
Index
Properties
Methods
Extends
Properties
collider
readonlycollider:ColliderComponent
Primitive shapes that physics objects interact with, such as spheres, boxes, and meshes, or compound shapes formed from multiple shapes. Used with Physics, Hair Simulation and Cloth Simulation.
Since
Lens Scripting Version 164
contactCount
readonlycontactCount:number
The number of contact points in the collision.
Since
Lens Scripting Version 164
contacts
readonlycontacts:Contact[]
Array of contacts in the collision.
Since
Lens Scripting Version 164
id
readonlyid:number
ID of the collision, unique for this collider.
Since
Lens Scripting Version 164
Methods
getTypeName()
staticgetTypeName():TypeName<Collision>
Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().
Returns
TypeName<Collision>
Since
Lens Scripting Version 164
Overrides
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Returns true if the object matches or derives from the passed in type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
isSame()
isSame(
other):boolean
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean