Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
4 registered members (AndrewAMD, Quad, soulman3, Ayumi), 675 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
c_trace ? #202453
04/15/08 01:21
04/15/08 01:21

M
Malice
Unregistered
Malice
Unregistered
M



how can I tell if a model was by a c_tarce on the front side or the back side??

Thanks,Malice

Re: c_trace ? [Re: ] #202485
04/15/08 09:19
04/15/08 09:19
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
?

The traced entity should be set to 'you', then you can look for you.pan and compare it to the direction of the trace.

Is it that what you mean?

Re: c_trace ? [Re: Pappenheimer] #202591
04/15/08 21:49
04/15/08 21:49

M
Malice
Unregistered
Malice
Unregistered
M



Yeah but I not sure how to compare it ..

if(you.pan==my.pan){
you hit no the back}
if(you.pan==my.pan+180){
you hit on the front}

something like that??

Re: c_trace ? [Re: ] #202595
04/15/08 21:54
04/15/08 21:54
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
There is an example in the Movement & Interaction Tutorial in my signature: the three last exposed actions of the third level. (It was made with A5, but the main things didn't change much.)

Re: c_trace ? [Re: Pappenheimer] #202600
04/15/08 22:23
04/15/08 22:23

M
Malice
Unregistered
Malice
Unregistered
M



thank you will look at I download it a few months ago and have use stuff from it before.. THanks for making in the first place.


Thanks,Malice

Re: c_trace ? [Re: ] #202634
04/16/08 08:23
04/16/08 08:23
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
i dont know if it works neve rtryed but this inside the manual

> 0 Distance to the hit polygon of the next obstacle.
0 No polygon was hit.
< 0 A polygon was hit from behind. The from position lies within a solid object, or the me entity intersects with a target entity.


"empty"
Re: c_trace ? [Re: flits] #202679
04/16/08 14:19
04/16/08 14:19

M
Malice
Unregistered
Malice
Unregistered
M



that means result=c_trace(ect) the result = the distance trace but how doe that tell me if the fornt of the model was hit or the back? It would be nice if the bounding box had planes and each plane had a number that was returned to the trace.

if(trace_hit==1)
{
if(bbox_plane=1)
{
model hit on the front}
}


Do you think this is worth addingto the futrure forum??
Malcie

Re: c_trace ? [Re: ] #202694
04/16/08 15:24
04/16/08 15:24
Joined: Jan 2007
Posts: 221
F
Fenriswolf Offline
Member
Fenriswolf  Offline
Member
F

Joined: Jan 2007
Posts: 221
Hello,

basically you can do this with this code.

You just need to calculate the angle of your trace and compare it with the angle of the hit entity. If the absolute difference between the angles is greater than, lets say, 90, the entity was hit from behind.

So you would probably do it like that:
if (abs(ang(ang_to_target.pan - hit_entity.pan)) > 90 ) ...

Re: c_trace ? [Re: Fenriswolf] #202709
04/16/08 16:23
04/16/08 16:23

M
Malice
Unregistered
Malice
Unregistered
M



THANK YOU!! This is want I was looking for. I don't have the math skill to have ever come up with this on my own.

Thanks,Malice


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