Gamestudio Links
Zorro Links
Newest Posts
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
ZorroGPT
by TipmyPip. 04/08/26 17:08
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (ApprenticeInMuc, Quad, TipmyPip), 7,096 guests, and 19 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Geir, ondrej, mredit, vestriaa, Lukudo
19206 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to connect bones of different Models? #357093
02/05/11 14:58
02/05/11 14:58
Joined: Feb 2011
Posts: 3
ChaosNe0 Offline OP
Guest
ChaosNe0  Offline OP
Guest

Joined: Feb 2011
Posts: 3
Hello up there!

I had just the idea of a game for which I have to know how ro combine bones of different Models so that it become one "unit".
I set one bone in the main-model and one in the target-model. Than I tried to write a light-c script which sets every frame the bone of the target-model to the bone of the main-model but this didn't work the way I wanted. I even don't know which commands I've to use for as I'm new in programming light-c.

Hope to get soon answers,

greetings ChaosNe0

Re: How to connect bones of different Models? [Re: ChaosNe0] #357113
02/05/11 15:53
02/05/11 15:53
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
vec_for_bone gives you the position of a bone, this should help, but I didn't try it myself:
http://www.conitec.net/beta/avec_for_bone.htm

Re: How to connect bones of different Models? [Re: Pappenheimer] #357138
02/05/11 19:34
02/05/11 19:34
Joined: Feb 2011
Posts: 3
ChaosNe0 Offline OP
Guest
ChaosNe0  Offline OP
Guest

Joined: Feb 2011
Posts: 3
Yes, I've used it in my script too.
The script for the entity which is attached is...:
function testsubjekt_orientierung()
{
ANGLE bone_angle;
VECTOR bone_vec;
VECTOR ent_vec;
while(1)
{
vec_for_bone(bone_vec,TEO,"Rezeptor");
ang_for_bone(bone_angle,TEO,parentname);
if((teo_animframe_counter>=4)&&(teo_animframe_counter<=9))
{
vec_for_bone(ent_vec,my,"TargetPoint");
my.x = -(ent_vec.x-my.x)+bone_vec.x; a = my.x;
my.y = -(ent_vec.y-my.y)+bone_vec.y; b = my.y;
my.z = -(ent_vec.z-my.z)+bone_vec.z; c = my.z;
ent_bonereset(my,"TargetPoint");
ent_bonerotate(my,"TargetPoint",bone_angle);
}
else
{
vec_for_bone(ent_vec,my,"TargetPoint1");
my.x = -(ent_vec.x-my.x)+bone_vec.x;
my.y = -(ent_vec.y-my.y)+bone_vec.y;
my.z = -(ent_vec.z-my.z)+bone_vec.z;
ent_bonereset(my,"TargetPoint1");
ent_bonerotate(my,"TargetPoint1",bone_angle);
}

wait(1);
}
}

...

You've also to know...:
var teo_animframe_counter;
ENTITY* TEO; //TestEnvironmentObject
...and that the command "ent_bonemove" ( http://www.conitec.net/beta/aent_bonemove ) didn't work in here. (Don't ask me why ;D)

The problem is: the "testsubject"-entity is avery frame set on a chosen bone but this bone is animated and in the second part of the animation the testsubject moves partly like the animated bone but not direct there where it should move. It moves a bit next to the animated bone.

Edit: I know now what the problem with the "ent_bonemove"-command was... I didn't assign the vertexes to the bone. laugh
But now I got another problem: The testsubject is always set by the false vector.

Last edited by ChaosNe0; 02/07/11 15:31.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1