Magnet
Class in Zigurous.Physics
Declaration
public sealed class Magnet : MonoBehaviour
Description
An object that produces a magnetic field that attracts objects.
Properties
magneticField | The sphere collider that represents the magnetic field of the magnet (Read only). |
strength | The strength of the magnet. If an object is within multiple magnetic fields, then it will be attracted to the magnet with the higher strength. |
radius | The radius of the magnetic field produced by the magnet. Magnetic objects within the radius are attracted to the magnet. |