Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/19/24 18:45
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (7th_zorro, AndrewAMD, TedMar), 837 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
reading ph_wave surface #314285
03/07/10 13:51
03/07/10 13:51
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
i've been trying to detect the surface of water entities but so far the trace doesnt seem to be affected by the moving surface even with polygon flag set, its just treating it as a flat terrain, anyone has ideas on this? am aware not alot of people have pro so i may have to ask the dev..

Last edited by darkinferno; 03/07/10 14:42.
Re: reading ph_wave surface [Re: darkinferno] #314713
03/10/10 13:57
03/10/10 13:57
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
any takers?

Re: reading ph_wave surface [Re: darkinferno] #314717
03/10/10 14:25
03/10/10 14:25
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Better not try to achieve this as it would be (too) slow, that's why the collision hull is not updated. Do you really need this small feature?


"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: reading ph_wave surface [Re: darkinferno] #314719
03/10/10 14:45
03/10/10 14:45
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
I dont have pro myself, so I cant test at all, but try using the USE_POLYGON in the c-trace call.
The physics may "hide" the entitys polygon flag.

As an alternative, could it be done by using c-trace to find the nearest vertex and get its global XYZ
and use that Z to calculate the surface height?
eg
Code:
var dist = c_trace(me, vector(me.x, me.y, me.z-1000), IGNORE_ME|SCAN_TEXTURE|ETC);
if((dist)&&(you)&&(hit.vertex))
{
   vec_for_vertex(hit.x, you, hit.vertex);
   dist = vec_dist (me.x, hit.x);
}
else
{  vec_set(hit.x, nullvector);   dist = 0;   }
///
///now "dist" equals distance from ME to the vertex nearest the 
///downward trace and hit.XYZ is set to the global co-ordinate of it.
///
///otherwise, if no entity or terrain was hit, "dist" is set to 0,
///and hit.XYZ is set to nullvector.


Get what I mean?


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: reading ph_wave surface [Re: EvilSOB] #314729
03/10/10 16:08
03/10/10 16:08
Joined: Nov 2004
Posts: 55
Michigan
S
splashmaker Offline
Junior Member
splashmaker  Offline
Junior Member
S

Joined: Nov 2004
Posts: 55
Michigan
I think EvilSOB's suggestion would work good as long as you are trying to trace straight down or maybe at a slight angle. To get the best results you will want to use linear interpolation of the three closest vertices.

If you are trying to do a trace that is not straight down then it may be very hard since you would have to calculate if an extruded vertice is in front of another one.

Re: reading ph_wave surface [Re: splashmaker] #314733
03/10/10 16:30
03/10/10 16:30
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
If the accuracy requirements are seriously strict, I agree about the interpolation.
A middle ground would be use my process to retrieve the "hit.polygon" and average its three vertices.

And, as splash has mentioned where I forgot, the angle will be pretty critical.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial

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