Crosshair + grabbing objects

I’m trying to get it to where my character can pick up and place a weighted block onto a pressure plate to open a door

the problem i am having is i can’t get the object to parent at only a certain distance from the player and be allowed to be set down

if anyone can provide a blend that shows how to accomplish this it would be most appreciated

scripting XD

Like mercc said, use scripting. Here’s the code, assuming that you have a ray sensor (detecting cube objects - objects with a ‘cube’ property, for example) and an Always sensor hooked up to a Python controller running the script:


cont = logic.getCurrentController() # The Python controller running this script
obj = cont.owner                        # The object running the script
ray = cont.sensors['Ray']              # The ray sensor checking for cubes

maxdist = 5                                # In blender units, the maximum pick-up distance

if ray.positive:
     cube = ray.hitObject
     if obj.getDistanceTo(cube) < maxdist:
          cube.setParent(obj)

That should work so that you can change the minimum distance to the cube that you can pick it up.