Skip to content

Forcer

Description

With this forcer community component, an object will act a force on any approaching objects. The force will make the objects move at a specified speed in the specified direction. Note that only one forcer component is needed per object.

Field Description
Speed Determines the speed of the object that has been applied a force. You can fetch the speed using forcer.settings.speed.
Direction Determines the direction in which the object moves after applying a force. You can fetch the direction using forcer.settings.direction.

You can write script to further modify the community component using the YaForcerComponent at https://developer.yahaha.com/api-reference/ForcerComponent/.