To make a custom player's character sit ...

Hi everyone … I am just curious if anyone is working on a method to make a custom character sit.
Sit in a chair, on a bench, etc.
Just wondering … :slight_smile:

I mean sitting is kinda important … we spend almost most of our time as humans sitting in front of computers dont we? :slight_smile:

I know the capsule would have to move position in order to do this.
Just wondering if anyone have any ideas here :slight_smile:

Use root motion which basically means leaving your capsule at the root while the animation is some short distance from it. You would probably have to do different animations for all the different types of seatings. One animation for the transition from standing to sitting and another just to sit… perhaps more for “sitting idle” animations.

Just to dream a little … wouldn’t it be great if you could do this with AI. The character becomes almost self aware and knows how to shift its position to seat itself properly. Almost like it turning into a little robot :slight_smile:

My guess is doable. I didnt try AI animations yet as I am still pretty noob to AI (Still trying to get nav link proxy with the two points coordinates for procedural generated landscape in blueprint, which probably wont work unless in c++).

You could try with this direction, but no guarantee that it might work as i didnt test it.
Using sequence, branch to

  1. Select animation type( maybe hug a tree)
  2. find a tree
  3. walk to tree
  4. animation (hug a tree and freezing movement inputs)
  5. wait

Assuming that your character is in a vertical upright position your capsule would have to lower position. After that it depends on how “lazy” your implementation is. Your “bone” from thigh to knee would have to lower and your torso would have to move backwards relative to your feet. Often a lazy approach is done and the actor is lowered until the thigh bone is at a ninety degree angle with the knee rather than trying to detect a collision between buttocks and the sitting surface. If you have gravity working and centered on the torso of the actor a more natural effect appearance to the motion will be visible. Also if the legs are sufficiently far apart you will get a squat rather than a sit action - in that case the toes will rotate away from each other and the actor’s vertical center. If the actor lowers itself sufficiently without contacting a surface you have a backwards fall (probably about 135 degree rotation at the knee). The lazy approach is simply rotate the actors thigh at the knee 90 degrees and lock it against gravity. I’m sure you’ve seen animations where the actor is simply sitting on air. Does this help?

O.k. thanks guys yes this is all helpful. I was just putting the thought out there to see if anyone wants to chime in
and leave their ideas. So I guess it is possible to animate the capsule? Is it? Can you give it commands to make
it scale for example as the character is sitting in game or is it not possible? You have to position the capsule and scale it
from the get go so that it will work with all in game positions?

This is old, but was new to me when I went searching for it here. Here is a walkthrough on how to enable this functionality for first time;

Thanks for that.
I ended building into my state machine which worked out well.
In fact sitting, crouching, kneeling, bending over those can all be states.

Also sitting is pretty comin in the game Warframe.
There they make it an emote or “pose” if you would.
No rules really you can do this in multiple ways.

What I would really like to see is a system that is not based on line traces but where a character can actually judge distance and space or objects’ sizes and scale and make
decisions on the fly as to how to interact with the environment, just like the human brain does.
In other words a form of “spatial” intelligence or awareness.
The same ability the human brain has for example what enables us to drive a truck or car and allow us to park it safely without hitting anything.
You can do that with hundreds of line traces but you have to build it.
It would be great if that functionality was just part of the character’s movement abilities.

HI, Any Luck on Implementing Ai to sit on different heights??

can’t we make our character to sit on chairs, benches of different height?