R2Northstar / NorthstarDocs

Guides and tutorials on how to mod using Northstar
https://docs.northstar.tf/
MIT License
0 stars 2 forks source link

Add some info about inverse kinematics #30

Open GeckoEidechse opened 1 year ago

GeckoEidechse commented 1 year ago

We got some info from "an anonymous source" regarding IK in Titanfall2. Might be useful. Not sure where to put it so I'm just gonna paste the text here and let someone else figure it out :P

# Inverse kinematics

Based on information we collected, inverse kinematics is only enabled for Titan legs to plant their feet on the ground and sometimes for Pilot arms so that they hold guns properly.

Inverse kinematics is (de)activated based on `(Frame, IK value)` pairs. This is done to blend the skeleton between keyframe animation and in-game/realtime inverse kinematics.

## Keyframe / inverse kinematics interpolation

There's a float value that controls the interpolation between keyframe animation and inverse kinematics.
- `0` -> IK disabled, keyframe animation only
- `1` -> keyframe animation disabled, IK only
- values in-between blend IK and keyframe animation

## Attachments

Attachments are predefined points that IK enabled arms/legs try to reach

## Titan legs

If enabled there's a trace/cast going from presumably the ankle joints/attachments to the ground. This is primarily used to properly plant the foot on the ground and to ensure foot rotation also matches the ground angle.

## Pilot arms holding guns

Each weapon has attachment points that contain information about location and rotation that the Pilot's hands and wrist joints then try to join up.
survivorr9049 commented 1 year ago

don't sentry turrets use IK as well? their legs always adapt to the environment properly