playMaker

Author Topic: Asking help to make a completely physical character  (Read 1114 times)

PolyMad

  • Hero Member
  • *****
  • Posts: 545
Asking help to make a completely physical character
« on: April 27, 2016, 04:32:17 AM »
I need to make a completely physical character, that can correctly interact with the physics objects in the scene.

The Unity character is not good for this: if the character runs into an object, it will kick it away with unforeseeable consequences, usually big kicks to the object, because the character is unmovable and with infinite mass. Or so it seems: it tried to give it a very low weight, but nothing changes.

I need the character to blend completely into the physical world, so it must be a rigidbody (may be a capsule or sphere), subject to gravity, and the player controls it by adding forces, nothing else.

Making a character as a sphere with a camera in the center, and reorient the camera horizontal at every frame is not difficult, but I need something more.

I need the character to be like a capsule .3 radius x 1.8 height and this brings in quite some more complexity, which I am not able to overcome alone at the moment.

First of all, when a force is added to the capsule, in example, forward, the capsule of course will tend to roll, because of the friction with the ground.
So a counter rotation must be added to the capsule to keep it vertical at all times.

I can easily add force to the capsule to move it sideways and jump etc. but I can't imagine how to add this counter-rotation force.

Can anybody help?