Object Placement on Avatar
Ported from Microsoft's XNA 4.0 Object Placement on Avatar Sample for Xbox 360.
Source for this sample on GitHub ↗
Opens in a new tab. Click the game canvas to focus the keyboard. CNA supplies its own avatars and preset motions; their appearance and timing differ from Xbox avatars. Keyboard emulation is enabled alongside gamepad input. Documented differences ↗
About this sample
The sample calculates the world transform of every avatar bone from its animation, bind pose and parent. A baseball bat uses the transform of the right-hand SpecialRight bone with the original small position and rotation offset.
Compare Stand, Celebrate, Clap and Stand 5 while the bat follows the hand. The fingers continue animating and do not grip the bat, as in the original. You can orbit the camera or create another random avatar.
Controls
| Action | Keyboard | Gamepad |
|---|---|---|
| Celebrate / Clap / Stand 5 / Stand | K / L / J / I | A / B / X / Y |
| New random avatar | E | Right shoulder |
| Orbit camera | Arrow keys | Right stick |
| Zoom out / in | Z / C | Left / right trigger |
| Reset camera | Right Shift | Right stick click |
| Stop the sample | Escape | Back |