|
bone to bone conection (two models)
#309674
02/10/10 16:44
02/10/10 16:44
|
Joined: Jun 2008
Posts: 402 Germany
sebbi91
OP
Senior Member
|
OP
Senior Member
Joined: Jun 2008
Posts: 402
Germany
|
hi I have two different Models with much bones and i want to connect this both models with a script! I want to connect the bone nr. 1 from my human-model with bone nr 1 from my hair-model. And the same thing with bone 2 and 3! Is there any way to make this possible I tried this way :
human_ent_p1= ent_create("player1.mdl",NULL,NULL); human_ent_p1.pan=180; human_ent_p1.scale_x=0.05; human_ent_p1.scale_y=0.05; human_ent_p1.scale_z=0.05; human_ent_p1.z=50; human_ent_p1.material = human_material; set(human_ent_p1,SHADOW||OVERLAY);
//Define the bone points //PLAYER-BONES vec_for_bone (Player_Neck_pos_p1,human_ent_p1,"Neck_bone"); vec_for_bone (Player_Head_center_pos_p1,human_ent_p1,"Head_center_bone"); vec_for_bone (Player_Eye_center_pos_p1,human_ent_p1,"Eye_center_bone");
//Create the other parts of the human hair_p1= ent_create("hair_short.mdl",NULL,NULL); hair_p1.scale_x=0.05; hair_p1.scale_y=0.05; hair_p1.scale_z=0.05;
if(hair_p1==1) { //HAIR_BONES vec_for_bone (Hair_Neck_pos_p1,hair_p1,"Neck_bone"); // Hair_Neck_bone_p1 = ent_create ("barrel.mdl",temp,NULL); vec_for_bone (Hair_Head_center_pos_p1,hair_p1,"Head_center_bone"); // Hair_Head_center_bone_p1 = ent_create ("barrel.mdl",temp,NULL); vec_for_bone (Hair_Eye_center_pos_p1,hair_p1,"Eye_center_bone"); // Hair_Eye_center_bone_p1 = ent_create ("barrel.mdl",temp,NULL);
}
... while(1) { if(hair_p1) { vec_for_bone(hair_p1.x,human_ent_p1,"Head_center_bone"); // place gun at hand position
vec_for_bone(Hair_Neck_pos_p1.x,human_ent_p1,"Neck_bone"); // place gun at hand position vec_for_bone(Hair_Head_center_pos_p1.x,human_ent_p1,"Head_center_bone"); // place gun at hand position vec_for_bone(Hair_Eye_center_pos_p1.x,human_ent_p1,"Eye_center_bone"); // place gun at hand position
ang_for_bone(hair_p1.pan,human_ent_p1,"Head_center_bone"); // rotate gun by hand angle // vec_for_bone(hair_p1.x,human_ent_p1,"Head_center_bone"); // place gun at hand position // ang_for_bone(hair_p1.pan,human_ent_p1,"Head_center_bone"); // rotate gun by hand angle
} ..
regards sebbi
Last edited by sebbi91; 02/10/10 18:47.
3D-Gamestudio A8 - Commercial
|
|
|
Re: bone to bone conection (two models)
[Re: sebbi91]
#309871
02/11/10 18:53
02/11/10 18:53
|
Joined: Jul 2007
Posts: 424 EUROPE
maslone1
Senior Member
|
Senior Member
Joined: Jul 2007
Posts: 424
EUROPE
|
I think you wanna connect some bodyparts to each other, and than do some script-rigging, don't you? Am i right?
A8c, Blender, FlStudio, Unity3d
|
|
|
Re: bone to bone conection (two models)
[Re: maslone1]
#309884
02/11/10 19:34
02/11/10 19:34
|
Joined: Jun 2008
Posts: 402 Germany
sebbi91
OP
Senior Member
|
OP
Senior Member
Joined: Jun 2008
Posts: 402
Germany
|
exact ^^ i have the player.mdl and the hair.mdl! I create the player in my game and than i create the hair.mdl! Now i want to stick them together!
bone 1 from the player.mdl with bone 1 from the hair.mdl. bone 2 from the player.mdl with bone 2 from the hair.mdl. bone 3 from the player.mdl with bone 3 from the hair.mdl.
and all this with a script! But i cant get it working ^^
I hope you could help !
regards sebbi
3D-Gamestudio A8 - Commercial
|
|
|
Re: bone to bone conection (two models)
[Re: Progger]
#310001
02/12/10 16:03
02/12/10 16:03
|
Joined: Jun 2008
Posts: 402 Germany
sebbi91
OP
Senior Member
|
OP
Senior Member
Joined: Jun 2008
Posts: 402
Germany
|
because i have some different Playermodells with different numbers of vertices, and the same at the other modells like the hair! my game should be a MORPG and so the player can select the hairstyle & the other parts like cloths,...
I thought the best way to make this system possible are bone to bone connections! the bone names are the same only the modell must be changed! And if i want to script 50 different kinds of model connections with vertices the script gets very worse big!
Any ideas?
Last edited by sebbi91; 02/12/10 16:05.
3D-Gamestudio A8 - Commercial
|
|
|
Re: bone to bone conection (two models)
[Re: Progger]
#310190
02/13/10 16:43
02/13/10 16:43
|
Joined: Jun 2008
Posts: 402 Germany
sebbi91
OP
Senior Member
|
OP
Senior Member
Joined: Jun 2008
Posts: 402
Germany
|
ok I will try it ^^ THX a lot
3D-Gamestudio A8 - Commercial
|
|
|
Re: bone to bone conection (two models)
[Re: sebbi91]
#310318
02/14/10 12:45
02/14/10 12:45
|
Joined: Jun 2008
Posts: 402 Germany
sebbi91
OP
Senior Member
|
OP
Senior Member
Joined: Jun 2008
Posts: 402
Germany
|
ok it works fine but only for the hair, the boots and the gloves! o.O
If i want to connect the t-shirt with the body and the trusers with the legs it doesn't work! It's because the ragdoll!
If my player dies, the t-shirt and the trusers dindt move with the player! At this point i realy need bone to bone conections!
I hope someone can help!
wfg Sebbi
3D-Gamestudio A8 - Commercial
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|