Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

【Ground Fitter (free)】- Fit your dynamic objects to ground

Discussion in 'Assets and Asset Store' started by FimpossibleGames, Jul 20, 2018.

  1. FimpossibleGames

    FimpossibleGames

    Joined:
    Jun 27, 2018
    Posts:
    159
    You giving groundFitter quaternion y value (it's not degrees) you need put here euler degrees (this is viewed inside inspector window), so:
    Code (CSharp):
    1. fitter.RotationYAxis = lookCenter.rotation.eulerAngles.y;
     
    Last edited: Sep 18, 2019
  2. NerdIt-

    NerdIt-

    Joined:
    Oct 19, 2018
    Posts:
    15
    nvm. I found a solution. I just did this:
    Code (CSharp):
    1. fitter.RotationYAxis = lookCenter.rotation.y * 180;
    and it works fine. Don't know why it happens though.
     
  3. NerdIt-

    NerdIt-

    Joined:
    Oct 19, 2018
    Posts:
    15
    @FimpossibleGames You have been very helpful thx. Sorry that I am a noob at using these sorts of unity assets. I am just trying to get the actual fitting to work now. But like some others in this thread... it isn't working. I have read through some of the comments but I still can't find what is wrong. Here are my Ground Fitter settings:

    The plane I am testing the object on is slanted at 9 on the X-axis and is tagged as Ground. Is this correct or am I missing something?
     
  4. FimpossibleGames

    FimpossibleGames

    Joined:
    Jun 27, 2018
    Posts:
    159
    I don't think if I fully understand, but also plane shouldn't be tagged as Ground, it layer should be Ground.
     
  5. NerdIt-

    NerdIt-

    Joined:
    Oct 19, 2018
    Posts:
    15
    @FimpossibleGames
    Sorry, I meant layer not tagged. I just don't know how to get the actual fitter to work now. Absolutely nothing happens on the default settings and nothing happens on the settings that I copied from the example prefabs.
     
  6. NerdIt-

    NerdIt-

    Joined:
    Oct 19, 2018
    Posts:
    15
    The object just falls through the ground. even though it has a box collider
     
  7. FimpossibleGames

    FimpossibleGames

    Joined:
    Jun 27, 2018
    Posts:
    159
    Can you mail me scene with the problem? There can be many different cases for the issue.
     
  8. NerdIt-

    NerdIt-

    Joined:
    Oct 19, 2018
    Posts:
    15
  9. NerdIt-

    NerdIt-

    Joined:
    Oct 19, 2018
    Posts:
    15
    Just checked and the mesh for the Bear model I was using had disappeared. You need to reapply that. You will also have to reapply the Gravity script to the "@SceneManager" gameObject. That should be it.
     
  10. FimpossibleGames

    FimpossibleGames

    Joined:
    Jun 27, 2018
    Posts:
    159
    I don't know how movement of your characters will be calculated, but if you need ground fitter only to change rotation, untoggle first variable 'ChangePosition' then ground fitter will not try to glue object to the ground.
    Take a look on pink line in scene window, it's ray which will try to detect collision, your model origin center isn't foots so you can set 'RaycastHeightOffset' to zero, so ray will start from center of the model, then change 'RaycastCheckRange' to about 15 (ray will reach ground below feets of bear), because your model is very big. Then it works for me on the scene. (but bear was bouncing off the plane when I hitted play so I freezed rigidbody and moved bear over plane in scene window)
     
  11. NerdIt-

    NerdIt-

    Joined:
    Oct 19, 2018
    Posts:
    15
    It worked thx
     
  12. NerdIt-

    NerdIt-

    Joined:
    Oct 19, 2018
    Posts:
    15
    @FimpossibleGames Hi me again. Your asset worked for a bit (not accurately mind you, but that would have been my fault), but I recently watched your "Rigging a Dragon" video on youtube and tried to apply it to the bear (which I still haven't animated). It didn't work at all. I tried to follow as closely along as could with my smaller model, I ignored the animation bits just for now because I didn't animations set up yet.

    Whenever I approached a hill. The bear will automatically pull itself up to the top extremely fast and then would stick there like a magnet. How do I fix?
     
  13. FimpossibleGames

    FimpossibleGames

    Joined:
    Jun 27, 2018
    Posts:
    159
    I will send you full setup with explanation in PM soon