4 registered members (ozgur, Ayumi, VHX, monarch),
1,161
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
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
OP
Serious User
|
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]
#314719
03/10/10 14:45
03/10/10 14:45
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
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
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: splashmaker]
#314733
03/10/10 16:30
03/10/10 16:30
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
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
|
|
|
|