Let’s say that I have a Player, and my player can walk, run, and jump. Also, my player has a Polygon Collider 2D and if 2D GameObjects( with a Rigidbody2D and Box Collider 2D) are detected in the Polygon Collider 2D the Player will Add Force to movable 2D GameObjects that are in the Polygon Collider 2D to be pulled towards the Player.
- (One)- How can I detect if any 2D GameObjects are in the Polygon Collider? & (Two)- How can I Add Force to movable 2D GameObjects that are in the Polygon Collider 2D to be pulled towards the Player?
—— Please code and explain your answer, for I am new to unity and won’t understand if you just give me directions, I don’t just use your code and forget about it, I write it down in my note book line to line and review and study it on my free time