# Kerbal standing on truck does not move along with it

## Recommended Posts

Build something similar to a truck. Put a Kerbal on it. Then switch to the truck and move.

Weirdness. The Kerbal don't stay on the truck. Instead it stay in relativity to the gravity of where it stand.

There is not enough 'pull' to stick Kerbal feet on the truck so they can move along with the truck.

I know that that is the game engines "Unity" that cause this.

My question for discussion:-

1) Is it logical to have this rectify?

Edited by sumghai
##### Share on other sites

this has to do with friction between the mesh of the truck and the kerbal

##### Share on other sites

If there is any friction at all, I guess there will not be too much of it. Remember how far can Kerbals keep rolling after a collision. Experiment with longer car could tell us whether there is any friction between two ships or not.

##### Share on other sites

I wonder how quickly the truck accelerated. Rovers in KSP are capable of rather startling acceleration, and the magnitude of speed in m/s can make it seem like it's not moving quickly if you think in km/h or mph.

That said, give the poor kerbal a seat.

##### Share on other sites

So, a discussion thread with no discussion, a suggestion thread full of criticism.

Let me spice this up...

@Red Iron Crown : Try test the scenarios before making useless comment, and it seems that you are following Kasuha in every post that he go.

##### Share on other sites

Only trying to help, sorry you didn't find it so. If you find my posts useless, by all means add me to your ignore list and never have to read any of my comments again. Or pm me if there's something specific you'd like to discuss. I wish you good luck with your discussion.

Edited by Red Iron Crown
##### Share on other sites

@Red Iron Crown: Give you a video instead of you are asking for craft file.

Btw, thanks for the tips for [ignore list]. I have a very great use of it.

Edited by Sirine
##### Share on other sites

@Red Iron Crown: Give you a video instead of you are asking for craft file.

http://youtu.be/984XRwps11U

Okay, this is funny. Apparently there is no friction between two ships. Good to know.

Both the Kerbal and the rover are in "Landed" state and clearly the only thing that gets evaluated are collisions, not relative movement or friction.

##### Share on other sites

@Kasuha

It appear that both 'object' are in space. However it is interesting to know how the 'wheel' traction work in KSP. It works only on single direction, Means if you put your wheels facing forward instead of downward, it will not 'move' even touches the ground.

Edited by Sirine
##### Share on other sites

The PA in this thread needs to get taken down a couple of notches I think. I have noticed the behavior the OP talks about. I feel like if it ever gets fixed we may end up with the ability to set up proper AG rings in space. currently the logic for inter-surface interaction is minimal. I hope it's a placeholder.

##### Share on other sites

@Kasuha

However it is interesting to know how the 'wheel' traction work in KSP. It works only on single direction, Means if you put your wheels facing forward instead of downward, it will not 'move' even touches the ground.

That's because wheels aren't wheels. They're sticks.

On topic, though, I think there was a mod allowing kerbals to stay on moving vehicles. Don't remember its name, probably something about sea sickness because it was initially made for floating/flying HooliganLabs contraptions.

Edited by J.Random
##### Share on other sites

That's because wheels aren't wheels. They're sticks.

On topic, though, I think there was a mod allowing kerbals to stay on moving vehicles. Don't remember its name, probably something about sea sickness because it was initially made for floating/flying HooliganLabs contraptions.

It was Sea Sickness Cure by DukeofHell. It was only available on SpacePort, so it's now lost.

However, it had a "do what you want" licence, so here's the source in full:

* Autor: DukeofHell
* Copyright: You may use this in any way you like. If you use it in an other mod please link to this mod's site on kerbalspaceport
* in your mod's description and also release the source code of your mod to the public so others can benefit from open source like you did.
*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
using System.Timers;

public class SeaSicknessCure : PartModule
{
[KSPField]
public bool debug = false;

float last_bump = 0f;

public override void OnUpdate()
{
if (!HighLogic.LoadedSceneIsFlight) return; //Don't execute in VAB/SPH

//Focus is a ship and we are over water - set everything back to splashed
if (!FlightGlobals.ActiveVessel.isEVA && vessel.situation == Vessel.Situations.LANDED && vessel.terrainAltitude < 0f)
{
foreach (Vessel eva in FlightGlobals.Vessels)
{
if (eva.isEVA)
{
eva.situation = Vessel.Situations.SPLASHED;
eva.Landed = false;
eva.Splashed = true;
}
}

vessel.situation = Vessel.Situations.SPLASHED;
vessel.Landed = false;
vessel.Splashed = true;
}

//Focus is EVA - land everything
if (FlightGlobals.ActiveVessel.isEVA && vessel.LandedOrSplashed)
{
if (vessel.situation == Vessel.Situations.SPLASHED)
vessel.Landed = true;

Vessel eva = FlightGlobals.ActiveVessel;

if (eva.situation != Vessel.Situations.LANDED)
eva.Landed = true;

if (debug)
Debug.Log(eva.transform.up);

//Kerbal fell over - give him a small bump
if (eva.transform.up.z < 0.8 && ((Time.time - last_bump) > 3.0f))
{
last_bump = Time.time;
eva.rigidbody.WakeUp();
}
}

if(debug)
DebugLog();
}

Vessel.Situations vessel_sit = Vessel.Situations.FLYING;
Vessel.Situations avessel_sit = Vessel.Situations.FLYING;

private void DebugLog()
{
if (vessel_sit != vessel.situation || avessel_sit != FlightGlobals.ActiveVessel.situation)
{
Debug.Log(vessel.name + " Sit:" + vessel.situation.ToString() + " " + FlightGlobals.ActiveVessel.name + " Sit:" + FlightGlobals.ActiveVessel.situation.ToString());
}

vessel_sit = vessel.situation;
avessel_sit = FlightGlobals.ActiveVessel.situation;
}
}
`/* Sea Sickness Cure`

##### Share on other sites

okay, after having used unity since unity2, I know of the problem you speak of.

Basic pre-packaged unity character controller scripts (which is what Ksp uses) simply set the speed you are travelling when you walk, so even when you do get friction accounted for, whenever you jump, or walk, you will fall way... back. It takes a bit more of a complex script to account for all the cases, and requires a bit of a redo compared to the unity "FPS Walker" character controller.

Okay if tl;dr or you dont think I explained well, squad went for a bad default. There is however a happy and free + easy solution squad could use, simply follow the link and replace the FPS walker on the Kerbal Prefab with "Advanced FPS Walker". Link : http://wiki.unity3d.com/index.php?title=FPSWalkerEnhanced , Since the script(s) were made in an older version of unity (unity3) some snippets may require updating, but that shouldn't be a problem.

##### Share on other sites

@pizzaoverhead & Nemrav: Thanks for the info. I really hope the SQUAD will put a note on this.

@All: I'm currently do not have C#Dev gear ready for my "newly format-ed windows notebook". If anyone kind enough to compile the above code to a useable mod, (.dll) It is very much appreciated.

##### Share on other sites

• 1 year later...

Sorry for brining up this thread.

Any updates on this 'behaviour' ?

##### Share on other sites

Since Kerbals nowadays cannot even hold on to a ladder in orbit (== free fall), I doubt that any improvements in that direction happened....

## 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.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

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

×

• #### Community

• Release Notes

• #### Social Media

• Store
×
• Create New...