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.
hope that works, I made this script for a previous question, just set the variable 'dist' to 4 like in your script
answered Jul 27 '11 at 01:25 PM
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.
answered Jul 27 '11 at 01:26 PM
I will give that a go and see how I get on.
answered Jul 27 '11 at 03:59 PM