Controlling A Ragdoll In No Gravity On One Axis?

Howdy,
I am very new to unity (30 day trial new) and the whole game making world. I am making a game like Super Mario Galaxy. The basis of the game is space like physics with the ability to jump from planet to plnet.

I have everything under control (including a very sad ragdoll charracter, if anyone wants to help make a cool one :-D)
BUT! I can’t figure out how to make the movement script for the ragdoll! I want the chest (root) to move to give it a dragging look but the hard part is only allowing the player to move left right, up and down. No back and forward.
Thanks a million if you can show me some code!
:smile: :smile:

I dont mean to be a pest but anyone? :frowning:

Try this script:

function Update () {
   var h = Input.GetAxis ("Horizontal");
   var v = Input.GetAxis ("Vertical");

   rigidbody.AddForce (h, v, 0);
}

Make sure it has a rigidbody and that the rigidbody is set not to use gravity. If the forces are too strong or too soft, go into the code and multiply them. :slight_smile:

if your camera angle could be any, then you should try using a force equal to the right and up vector of the transform in the camera object, multiplied by the input.

Also, if you are messing with physics, use FixedUpdate instead of Update.

.ORG