Jump to content

Colliders of Kerbals colliding with ground in 1.11.x - help needed


Recommended Posts

I support two mods:

  • Eva Follower
  • Walk About

which both make kerbals walk around.  Walk About was actually written using code from Eva Follower, so it makes sense the problem is in both.

In 1.11.2 (what I've been testing on), the kerbals it's trying to move animate, but stay in place.  After a few hours of digging and an off-hand suggestion from a Twitch viewer, it seems that the collider(s) for the kerbals is hitting the ground, and they aren't moving.  It could also be there is some new code which essentially "locks" a kerbal in place to keep it from sliding. 

I did add the new ResetRBAnchor() call, but that didn't seem to help.  I should add that the Vessel.isAnchored is false, so I didn't think the ResetRBAnchor work do anything, but didn't hurt to try it out

This is the code in question:

                    Quaternion from = eva.part.vessel.transform.rotation;
                    Quaternion to = Quaternion.LookRotation(move, eva.fUp);
                    Quaternion result = Quaternion.RotateTowards(from, to, eva.turnRate);

                    eva.part.vessel.SetRotation(result);

                    Rigidbody rigidbody = null;
                    eva.GetComponentCached<Rigidbody>(ref rigidbody);

                    //move
                    if(rigidbody != null)
                    {
                        eva.vessel.ResetRBAnchor(); // Just added as test
                        rigidbody.MovePosition(rigidbody.position + move);
                    }

I did notice that if I added an "up" component to the movement, they would move, but in a jerky manner.  My assumption is that the "up" movement is breaking the contact with the ground.

One more thing:  This is only a problem on land.  When in the water, the mod works fine (ie:  kerbals move (slowly), and followers do follow properly.

Suggestions?

Thanks

 

Edited by linuxgurugamer
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...