electricField()
Creates and returns a field behavior object that interacts with charged items.
Declaration
class func electricField() -> SelfReturn Value
An field behavior object that applies an electric field to charged items.
Discussion
The amount of force applied by the field is proportional to the charge of the item and is modeled after the first part of the Lorentz equation (F = qE). This equation means that the force equals the charge of the object multiplied by the strength of the electric field at the item’s current location in that field.
You can use electric fields as a way to apply forces to an object that are based on charge instead of mass. You can use electric fields to repel or attract items in your interface, with opposite charges attracting each other and similar charges repelling each other. In other words, an item with a positive charge value is attracted to fields whose strength value is negative and repelled by fields whose strength value is positive.