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

Physics dragging and campfire system

Discussion in 'Scripting' started by GeneralBishop, Oct 25, 2014.

  1. GeneralBishop

    GeneralBishop

    Joined:
    Oct 25, 2014
    Posts:
    4
    Hello, i wanted to know how he scripted the dragging and dropping mechanism

    Goto 0:17 and i would also like to know how to make the campfire system.

     
  2. Magiichan

    Magiichan

    Joined:
    Jan 5, 2014
    Posts:
    403
    He probably used Physics.Raycast to detect the object in front of him.
    And UnityEngine.Rigidbody to move the object towards his view-direction.
    You should learn the basics of programming first though. Luckily unity has a very
    elaborate tutorial series. they even have projects to help you learn the ways of Unity :'D
    Click <here> to check 'em out ;o
     
  3. GeneralBishop

    GeneralBishop

    Joined:
    Oct 25, 2014
    Posts:
    4
    I need to know how to make it ASAP. The guy in that video told me he used a spring joint connected to a rigid body, i found this https://gist.github.com/mstevenson/4552515 idk if that is it. And idk where to create a script or where to attach it.
     
  4. Magiichan

    Magiichan

    Joined:
    Jan 5, 2014
    Posts:
    403
    Do you know the basics of scripting to begin with?

    I can point you into the right direction if you want, but it's not going to be a complete script.

    Like, what kind of help are you expecting here, cause it
    seems like you're just asking the unity community to code for you.

    Correct me if I'm wrong though.
     
  5. GeneralBishop

    GeneralBishop

    Joined:
    Oct 25, 2014
    Posts:
    4
    Do you have Skype or something? I'll explain it.
     
  6. Magiichan

    Magiichan

    Joined:
    Jan 5, 2014
    Posts:
    403
    What's there to explain? I do have skype, but I'd prefer it if you'd answer my questions in here.
     
  7. GeneralBishop

    GeneralBishop

    Joined:
    Oct 25, 2014
    Posts:
    4
    I can't, i just want to know how to make the script for grabbing and dropping an item.
     
  8. Magiichan

    Magiichan

    Joined:
    Jan 5, 2014
    Posts:
    403