Forum Discussion

pjenness's avatar
pjenness
Rising Star
9 years ago

Grabbable item not staying with hand on Character movement

Hiya

Im using the grabable script to pick up items.
THey seem to pickup and lock to the hand well when just doing touch hand movement.

But when I introduce character movement (walking) they don't catch-up..they seem to do a slow lerp style movement to catch up.

Usually to alleviate this you can parent game objects to he player controller , however if I do that the grabbable item seems to get multiple movements, and if I walk forward the item shoots ahead of the player.

Anyone got past this issue?

Cheers

-P

5 Replies

  • The Grabbable script makes objects follow the hand, it doesn't child them.

    Make sure your hands are children of your Avatar, try playing with script execution orders to minimise it.
  • @pjenness Hey Paul there's a toggle on the right and left hand prefabs that solves this problem for me? Look for parentHeldObject near the top of the hand script component. I'm messing with holding objects and travelling in world now and this fixes the stuttering of held objects when locomoting for me.


  • The Grabbable script makes objects follow the hand, it doesn't child them.

    Make sure your hands are children of your Avatar, try playing with script execution orders to minimise it.


    Hiay
    yea the hands are children of my Character controller so they are smooth.
    It was the grabbable that is the problem... it lags..and if I parent it , th motion freaks out

  • JulianB said:

    @pjenness Hey Paul there's a toggle on the right and left hand prefabs that solves this problem for me? Look for parentHeldObject near the top of the hand script component. I'm messing with holding objects and travelling in world now and this fixes the stuttering of held objects when locomoting for me.


    OH sweet... will try thanks!

    -P