Originally Posted By: Omicron_NEGA
is it possible to set bone as a physics objects?
im trying to make something like that.
thx!

No. But you can create entity and attach bone to entity. This method I use in PCE (Physics Constrains Editor)
Code:
ENTITY* bones_ent = ent_create("bones.mdl",nullvector,NULL);
ENTITY* ph_ent = ent_create("box.mdl",nullvector,NULL);
STRING* ph_ent_bone = "bone1";
function attach_ent_bones  ()
{
 	VECTOR b_pos;
	VECTOR b_move;
	VECTOR b_ang;
	VECTOR b_ang1;

	ent_bonereset(bones_ent,ph_ent_bone);
	vec_for_bone(b_pos,bones_ent,ph_ent_bone);
	ang_for_bone(b_ang,bones_ent,ph_ent_bone);
	vec_set(b_move,ph_ent.x);vec_sub(b_move,b_pos);
	b_move.x/= bones_ent.scale_x;b_move.y/= bones_ent.scale_y; b_move.z/= bones_ent.scale_z; 
	vec_rotateback (b_move,b_ang);///
			
	b_ang.x = 360-b_ang.x;b_ang.y = 360-b_ang.y;b_ang.z = 360-b_ang.z;
	vec_set(b_ang1,nullvector);
	ang_add(b_ang1,vector(b_ang.x,0,0));
	ang_add(b_ang1,vector(0,b_ang.y,0));
	ang_add(b_ang1,vector(0,0,b_ang.z));
	ang_rotate(b_ang1,ent.pan);
	ent_bonerotate(bones_ent,ph_ent_bone,b_ang1);
	ent_bonemove(bones_ent,ph_ent_bone,b_move)
}
 


Last edited by XD1v0; 12/16/08 12:07.

A7 Commercial cool
Celeron 1700, GeForce 5500 FX 256mb, 1 Gb Ram