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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, SBGuy, TipmyPip, ozgur), 923 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: getting bone name hit by c_trace with USE_BOX [Re: Reconnoiter] #470396
01/11/18 14:43
01/11/18 14:43
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
You could make a USE_BOX trace first, then, on a hit, do a SCAN_TEXTURE (without USE_BOX) trace to some target like endpoint:

c_trace(from,to,USE_BOX);
if(trace_hit)
{
vec_diff(temp,target,from);
vec_scale(temp,1.05); // make sure it reaches far enough
vec_add(temp,from);
c_trace(from,to,SCAN_TEXTURE);
}


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: getting bone name hit by c_trace with USE_BOX [Re: Superku] #470429
01/14/18 14:08
01/14/18 14:08
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline OP
Serious User
Reconnoiter  Offline OP
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Ty for the suggestion.
I went with the same approach as Rayp went, which works (surprisingly) decent for humanoids. I use vec_to_ent to transform the hit.x(yz) to local coordinates than compare with minxyz/maxxyz etc. I can check for torso, head, (roughly) arms and legs this way.

Page 2 of 2 1 2

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