Skip to main content

Collision

Complete API reference for Collision, including constructors, attributes, virtual attributes, and methods.

Package: JAVARuntime

Category: Physics

Component: no


public class Collision

Constructors

SignatureDescription
Collision(Collision)Executes Collision and returns after the underlying engine call finishes.
Collision()Executes Collision and returns after the underlying engine call finishes.

Attributes

NameTypeDescription
instanceCollisionRepresents the instance value stored on this instance. Read or assign to update the property.

Virtual Attributes

NameTypeAccessDescription
colliderColliderget/setReturns the collider associated with this collision.
colliderObjectSpatialObjectget/setReturns the object associated with the Collider in this collision.
contactCountintgetReturns the number of contact points in the collision.
contactPointVector3get/setReturns the contact position of the first contact point (deprecated, get a Contact using contactAt() or getContactList() and call getContactPoint() on it).
distancefloatget/setReturns the penetration distance at the first contact point (deprecated, get a Contact using contactAt() or getContactList() and call getDistance() on it).
impulsefloatget/setReturns the impulse magnitude at the first contact point (deprecated, get a Contact using contactAt() or getContactList() and call getImpulse() on it).
normalVector3get/setReturns the normal vector of the first contact point (deprecated, get a Contact using contactAt() or getContactList() and call getNormal() on it).
objectSpatialObjectget/setReturns the other object involved in the collision.
physicsComponentPhysicsComponentget/setReturns the physics of the other object involved in the collision.

Methods

SignatureReturnsDescription
contactCount()intReturns the number of contact points in the collision.
contactAt(int)ContactReturns the contact at the specified index.
getContactList()List<Contact>Returns the list of contact points in the collision.