Skip to main content

ForceField

class ForceField

ForceField is a type of physics specialized in simulating winds, and just like AreaTrigger, it doesn't collide with any objects, it just moves them and checks if an object is in the actual object area.


public class ForceField
extends PhysicsEntity

— Constructors (1) —

ConstructorDescription
ForceField()Creates a new ForceField.

— Methods (6) —

NameDescription
boolean triggerWithName(String objectName)Checks if the object with the same name as the text defined to be "objectName" argument is in the real area of the object.
boolean isTriggering()Returns if any object is in the actual object area.
ArrayList getTriggerList()Returns a ArrayList containing all "collisions" informations with the actual object.
Collision getTrigger(int idx)Returns a Collision class with all informations about the "collision" information with index == idx in getTriggerList method return value.
[PhysicsLayer] getPhysicsLayer()Returns the PhysicsLayer of the ForceField component.
void setPhysicsLayer([PhysicsLayer] layer)Defines the PhysicsLayer of the ForceField component to be "layer" argument.

— 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.