link hover image

Unity 2D how to create a magnet

Frontpage calendar image January 1, 2017

Make your coin a Rigidbody and try velocit to the coin.  The idea is that you have a trigger circle around the coin. Also change the tag of the magnet gameobject to “magnet”. Then set the code inside the class of coin you want pulled in. bool inside; public Transform magnet; private CircleCollider2D circleCollider; void Start […]