Graphics Reference
In-Depth Information
5. In this case, we want to rotate the tail bone and rotate and position the neck.
For this, we add the following to the render loop:
// the neck bone
giraffe.children[0].children[1].children[0].children[0].rotation.x
= control.neck_rot_x;
giraffe.children[0].children[1].children[0].children[0].rotation.y
= control.neck_rot_y;
giraffe.children[0].children[1].children[0].children[0].rotation.z
= control.neck_rot_z;
giraffe.children[0].children[1].children[0].children[0].position.x
= control.neck_pos_x;
giraffe.children[0].children[1].children[0].children[0].position.y
= control.neck_pos_y;
giraffe.children[0].children[1].children[0].children[0].position.z
= control.neck_pos_z;
// the tail bone
giraffe.children[0].children[0].children[0].rotation.z
-= 0.1
Search WWH ::




Custom Search