marasovec
Member
Here's a pic of that what I'm trying to do (the whole limb rotates around it's origin)
10 and 30 long parts are attached but I can't figure out a solution how to attach the 50 long part
Here's my code
10 and 30 long parts are attached but I can't figure out a solution how to attach the 50 long part
Here's my code
Code:
// 30 long part
d3d_transform_add_rotation_y(pitch);
d3d_transform_add_rotation_z(dir);
d3d_transform_add_scaling(3, 3, 3);
d3d_transform_add_translation(x+lengthdir_x(10,dir), y+lengthdir_y(10,dir), z);
d3d_model_draw(leg1, 0, 0, 0, tex1);
d3d_transform_set_identity();
// 50 long part (not working)
d3d_transform_add_rotation_y(45);
d3d_transform_add_rotation_z(dir);
d3d_transform_add_scaling(3, 3, 3);
d3d_transform_add_translation(
x+lengthdir_x(10,dir)+lengthdir_x(30,dir),
y+lengthdir_y(10,dir)+lengthdir_y(30,dir),
z+lengthdir_y(30,-pitch-90));
d3d_model_draw(leg2, 0, 0, 0, tex2);
d3d_transform_set_identity();