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

Hello,

It seems to work very well with the new setting for “Change Position” for my case with the character controller.
Thanks for the update!

Wow, I did not expect it will help but glad to hear it :slight_smile:
Also as I know you making game with lots of animals, then you should check my new asset released few hours ago :wink:
> Spine Animator on the asset store <
And last week trailer when I use Ground Fitter, Spine Animator and others to boost animations quality:

https://www.youtube.com/watch?v=MVEgrhMFIYw

1 Like

Looks very interesting! Is this working with protofactor’s animals?
The link does not work for me, but I found it by searching…

Ouh I accidently pasted preview link.
I tried to make this component as universal as possible and also Protofactor’s monsters models was in my testing library so I’m sure it should work without a problem :wink:

Hello,

I have a problem left with ground fitter:

It rotates my animals around Y sometimes, so they run away instead of attacking the Player etc.
I spent an hour Looking why they do, when I remove Ground fitter everything is fine, when I add it like this, they rotate a lot and very fast between the correct direction and some other Maybe opposite direction…

How can I tell Ground fitter it should never rotate around Y?

Thanks :slight_smile:

Ouh, variable “Rotation Y Axis” is meant to be used for objects movement direction (rotation is contantly overrided from component), thanks to this variable you always go in correct direction, no matter if object will walk on vertical wall or ceiling.
When object is moving over ground and rotating there all axes need to be used, you can’t ignore it.

You can modify your script and use ground fitter “Rotation Y Axis” for movement direction or put your animal with just ground fitter inside other game object which will have rest of components you need.

Like this? In my script for movement:

groundFitter = GetComponent<FIMSpace.GroundFitter.FGroundFitter>();

if (groundFitter != null)
{
groundFitter.RotationYAxis = transform.rotation.y;
}

Does not seem to help, still rotating a lot around Y…

No, to understand add your model on some big slope, rotate it to ground (using x and z axis) and change Y axis value in inspector, you will see when you do it by hand, model will rotate in weird way, variable inside ground fitter makes rotation works always the same no matter how object is rotated on uneven terrain.
You can check how works usage of this variable in code inside demo scripts.

Thanks for the hints!

For now I removed the Ground fitter from my Monsters and animals, there is too much Impact with my exisiting Script using a character Controller. But I want to get rid of it anyway, I want to have a better and simpler Script and without using a character Controller…

I find your ground fitter and your spine animator both great, a script with a target and a follow or flee or wander status, using the raycasts for obstacle and hole avoidance would be great, it should include or work together with these two existing assets, that would be totally great :slight_smile:

1 Like

HI,
I tried this asset (few minutes) thanks for providing it free.

-I used it with the third person template by Unity to make the character rotate only a bit on slopes and it seems not to function…What am i missing? Is it compatible?

-Is there a way to limit forward on high slopes with your components?

-Is it possible to simplify Ground fitter to only return the value of slopes thru the ray cast and use those values inside some other scripts?
thanks

Hi,
I wasn’t trying to use it with third person controller, probably there can be some conflicts.
Remember about setting right collision layers in “Ground Layer Mask” variable.
You can try untoggling first variable “Change Position” but then you have to change variable “RotationYAxis” from code which is angle in degrees for forward direction.
Also you can try putting object which have to be rotated inside child game object, but now I’m not sure if “RotationYAxis” then have to be changed anyway.

"-Is there a way to limit forward on high slopes with your components? "
You mean going up high slopes?
You can check GroundFitter_Demo scene and inside PR_GroundFitter_Feetle enable “Use Physics” in GroundFitter_Movement component, it will limit going up slopes but it’s defined by physic itself, slopes are limited by movement speed, collider and object’s rotation, then probably rigidbody mass too. To use this physic feature you need to have collider and rigidbody attached to your game object.

-Is it possible to simplify Ground fitter to only return the value of slopes thru the ray cast and use those values inside some other scripts?
You can try changing this lines:

            if (TotalSmoother == 0f)
                transform.rotation = targetRotation;
            else
                transform.rotation = Quaternion.Slerp(transform.rotation, targetRotation, 
delta * Mathf.Lerp(50f, 1f, TotalSmoother));

            LastRotation = transform.rotation;

to this

LastRotation = targetRotation;

Then “LastRotation” variable should have desired rotation, but you should remember about “RotationYAxis” variable, and you should have “ChangePosition” setted to false.

I am working on upgrading ground fitter to V2.0 (it will not be free anymore, but anyone who have it already will not have to pay) and it will provide much more examples, will be more polished and designed to replace Unity’s build in movement controller.

2 Likes

Many thanks for your very precise answer!

Actually ground fitter could be an amazing Third Person Controller compared with some on the store that are very expensive. handling multiple speeds jump and slope limits would be perfect for many people if they can add their own moves later. You could even change the name after the update;)

Combined with some of your other modules i think it could be a great solution, you should promote it this way!!

I don’t know what you wanna do with it but i will follow so as for your other assets! i left a message in Look animator to know if i can use it with TPcontroller!:wink:

Cheers

2 Likes

Yo, Ground Fitter is optimized for use on mobiles?

Hey, this code don’t need to be optimized directly for mobiles, it’s just optimal.
How much? You can test it by using “Duplicator” game object in “Patrolling” example scene, but remember to check only code performance, rendering so many meshes can take more fps.

Exactly what I think. +1 vote for this :slight_smile: I’ll buy it!

1 Like

So we think the same thing i guess!! :slight_smile:

This has a huge potential added with look animator and just a few modules…

We would need:
-some speed states and the possibility to create some states. (Walk, run, roll, crouch, so on) Only rigging an animation to a speed
-Simple push forward option for rolling or strafing or i don’t know…
-A Freeze state, like no input.
-Stop moving forward On Slope LImit :slight_smile: only y rotation alowed
-Jump static and in movement

-And the BEst of The Best to me it could be a fantastic hack to Get Climbing any surface for humanoid!!:sunglasses::sunglasses: Like in Zelda BOTW you could rotate the raycast zone to move vertical and check angle on Surface…
Am i dreaming to much?:sweat_smile:
BTW with all the data you have in GroundFitter you could do some IK for foosteps??

I was thinking that a lot could be accomplished to rework existing animations, even using look animator as false IK like carry object with each arm looking at points…:):)(oops other thread :p)

Now the author will raise the price :stuck_out_tongue:

2 Likes

For me personally climbing would be less interesting but could be nice too.

The Other Features would be great :slight_smile:

And I already added the request for Setting a target (GameObject could be Player, NPC, Prey) and a Status to follow / hunt or flee from. I would use it for all non Player characters like monsters and animals :slight_smile:

I could need this for both my current game and my next game.

1 Like

perfect!! :slight_smile:

Thank you guys for suggestions, really nice ones, I will put them in my list for V2.0 :slight_smile:
Also walking on straight up wall is possible now with ground fitter, but it’s not polished yet, model have to rotate in some way toward straight up wall and then it stitch to it, check this moment and watch tall box on the left.

4 Likes

we thank you for listening! :slight_smile: