|
Hey, Tried looking around but could not find anything that completely helped me out. I am trying to add a simple function that allows the player to pick up move and drop objects. I have a rigid body object in the scene and the first person controller colideing with it, but I am quite new to code and can't get very far with that code of things. What I have so far, if its right at all. Any help on this would be great. Thanks
(comments are locked)
|
hope that works, I made this script for a previous question, just set the variable 'dist' to 4 like in your script scribe
(comments are locked)
|
|
Looks like your doing the right thing so far. But instead use Vector3.Distance(transform.position, theOtherObject.transform.position) instead of just distance. Because that will not do anything, you never assigned it as a variable. I will make a script for you sometime later in the day.
(comments are locked)
|
|
Thanks guys, I will give that a go and see how I get on.
(comments are locked)
|
