OverLap Sphere and the best way to pick up objects?

If this all just centers around how crouching by setting a non-linear scale (1,0.5f,1) causes childed objects to also change, as per the rules of Transform hierarchy, the most obvious possible solutions are:

  1. don’t use the non-linear scale to crouch. Instead:
    a. make a proper crouch animation, OR
    b. just move the anchor of the camera down, OR
    c. swap out models, OR
    d. use a blendshape, OR
    e something else?

OR:

  1. don’t put the childed object below the scaled object. instead, have a separate hierarchy within the player where you equip items.

For instance, using this controller:

I just ran it, paused it, put a GameObject cube 3.0 units in front of me parented to the player, then crouched uncrouched. It doesn’t affect cube scale because it crouches by a non-scale method.

Then I ripped the cube off and stuck it on the camera instead, so it could look anywhere I looked rather than staying flat on the ground, and it still worked.

1 Like