Skip to main content

Collider

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

Package: JAVARuntime

Category: Physics

Component: yes


public class Collider extends Component

Constructors

SignatureDescription
Collider(Collider)Executes Collider and returns after the underlying engine call finishes.
Collider()Creates a new instance of Collider.
Collider(Shape)Executes Collider and returns after the underlying engine call finishes.

Attributes

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

Virtual Attributes

NameTypeAccessDescription
convexVertexVertexsetSets the convex vertex of the collider.
vertexVertexget/setReturns the collider vertex.
vertexFileVertexFilesetSets the vertex file for the collider.

Methods

SignatureReturnsDescription
getShape()ShapeReturns the shape type of the collider.
setShape(Shape)voidSets the shape type of the collider.
colliderWithName(String)booleanChecks if this object is colliding with an object with the specified name.
isColliding()booleanChecks if this object is colliding with anything.
getCollisionList()List<Collision>Returns a list of all current collisions.
getCollisionsCount()intReturns the number of current collisions.
getCollisionAt(int)CollisionReturns the Collision at the specified index.
componentClassMatch(Component, Component)booleanExecutes componentClassMatch and returns after the underlying engine call finishes.
getEngineComponent()ComponentExecutes getEngineComponent and returns after the underlying engine call finishes.