Skip to main content

Staticbody

class Staticbody

Staticbody is a kind of specialized physics for walls, it prevents the object from being moved by collisions, an object with this physics does not collide with objects with the same physics or with AreaTrigger or with ForceField.


public class Staticbody
extends PhysicsEntity

— Constructors (1) —

ConstructorDescription
Staticbody()Creates a new Staticbody.

— Methods (7) —

NameDescription
boolean colliderWithName(String objectName)Checks if the current object is colliding with the object whose name is defined to be "name" argument.
boolean isColliding()Returns if the actual object is colliding.
ArrayList getCollisionList()Returns a ArrayList with all collisions informations that are ocurring with the actual object.
Collision getCollisionAt(int idx)Returns a Collision class with all informations about the collision information with index == idx in getCollisionList method return value.
int getCollisionsCount()Returns the number of collisions.
[PhysicsLayer] getPhysicsLayer()Returns the PhysicsLayer of the Staticbody component.
void setPhysicsLayer([PhysicsLayer] layer)Defines the PhysicsLayer of the Staticbody component to be "physicsLayer".

— Inherited Methods (7) —

NameDescription
SpatialObject getObject()Returns the current SpatialObject component.
String getTittle()Returns the current name of the component.
boolean colliderWithName(String objectName)Checks if the current object is colliding with the object whose name is defined to be "name" argument.
boolean isColliding()Returns if the actual object is colliding with any object.
List\<Collision> getCollisionList()Returns a List\<Collision> with all collisions informations that are ocurring with the actual object.
Collision getCollisionAt(int idx)Returns a Collision class with all informations about the collision information with index == idx in getCollisionList method return value.
int getCollisionsCount()Returns the number of collisions.