Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 859 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
connect 2 bones (with ang and vec) #404671
07/12/12 16:06
07/12/12 16:06
Joined: Nov 2003
Posts: 433
The Netherlands
T
Toon Offline OP
Senior Member
Toon  Offline OP
Senior Member
T

Joined: Nov 2003
Posts: 433
The Netherlands
okay...I got this code to work:

Code:
vec_for_bone(axe_vec.x,player,"righthand");
ang_for_bone(axe_ang.pan,player,"righthand");
vec_set(my.x,axe_vec);
vec_set(my.pan,axe_ang);



But what I want is to set "Bone" from the axe entity (my) to the position of the "righthand" position (so not the just the pivot-point of the axe model (my). How can I do that?

Re: connect 2 bones (with ang and vec) [Re: Toon] #404673
07/12/12 16:20
07/12/12 16:20
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,107
Germany
In most games this is done by setting the axe into the correct pos and then applying it to the right hand bone. Normally weapons have no "pos-bones" except for gunbrasses and so on. The code you need you already have. ^^

Code:
VECTOR _p,_a;
vec_for_bone(_p, ThePlayer, "Righthand");
ang_for_bone(_a, ThePlayer, "Righthand");
vec_set(Axe.x, _p.x); //set the axe to the right hand
vec_set(Axe.pan, _a); //and rotate it with the animation of the bone



regards

Last edited by rayp; 07/12/12 17:32.

Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;

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

Gamestudio download | chip programmers | 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