Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Grabing and droping

Discussion in '2D' started by Kottler, Mar 12, 2019.

  1. Kottler

    Kottler

    Joined:
    Mar 11, 2018
    Posts:
    12
    Hello, i'm working on a top down game, and i want the character to be able to grab and drop objects, like a box or crate.
    The player aproachs the crate, presses a button and then the object gets attached to the player, then the player may press the button again to drop the object.
    I need help with that.

    There is no grid, the player moves freely and should be able to grab the object from all the sides.
    I guess i should be attaching the rigidbody somehow to follow the player.
     
  2. beanie4now

    beanie4now

    Joined:
    Apr 22, 2018
    Posts:
    311
  3. Kottler

    Kottler

    Joined:
    Mar 11, 2018
    Posts:
    12
    That's just perfect! You opened a wide window to me, thanks!