Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (EternallyCurious, howardR), 646 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 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