Transforming bones

There are situations in which you may want to change specific bones' transformation. For example if you are making a shooter game, a character's hands should be pointing towards its target, or in a RPG, NPCs could rotate their head towards characters they interact with etc.

This can be achieved with methods set_node_rotation and set_node_position of BBMOD_AnimationPlayer:

/// @desc Step event
var _armId = modCharacter.find_node_id("ArmRight");
var _rotation = new BBMOD_Quaternion()
    .FromAxisAngle(new BBMOD_Vec3(0, 1, 0), directionUp);
animationPlayer.set_node_rotation(_armId, _rotation);
Do you find this page helpful?

Copyright © 2023, BlueBurn. Built on March 24, 2023 using GMDoc.