You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This might be part of the problem people have had with getting Geocoordinates' positions and headings.
To learn the surface position, I have two choices:
1 - Take the PQS predicted ideal terrain height, which is never exactly right because it's a smooth surface function that's only approximated by the actual terrain made of flat polygons drawn to verteces of that smooth surface function.
2 - Take a raycast from that position through polygons to find the terrain polygons exact location.
I do option 2 when the terrain is close, or option 1 when it's far away.
The problem is that apparently the raycast used for option 2 is finding hits with the ship itself even though it's allegedly supposed to be masked to only pay attention to terrrain. So the terrain height gets reported as the top of the vessel on the ground above the spot, rather than the height of the ground. Something is wrong with the raycast mask there - I can't figure out why because I'm explicitly using the right raycast mask, or so I thought.
The text was updated successfully, but these errors were encountered:
Possible problem found. The prototypes for Physics.RayCast are set up in such a way that if you leave off the distance cap argument, then the layer mask argument gets placed into the distance cap argument instead, and promoted from an int to a float so it can be read as the distance.
So I'm probably not masking at all. my masking bit pattern of 00000000000000000100000000000000 was taken as just being a really big max distance of 2^15 meters.
Dunbaratu
added a commit
to Dunbaratu/KOS-1
that referenced
this issue
Jan 3, 2015
This might be part of the problem people have had with getting Geocoordinates' positions and headings.
To learn the surface position, I have two choices:
1 - Take the PQS predicted ideal terrain height, which is never exactly right because it's a smooth surface function that's only approximated by the actual terrain made of flat polygons drawn to verteces of that smooth surface function.
2 - Take a raycast from that position through polygons to find the terrain polygons exact location.
I do option 2 when the terrain is close, or option 1 when it's far away.
The problem is that apparently the raycast used for option 2 is finding hits with the ship itself even though it's allegedly supposed to be masked to only pay attention to terrrain. So the terrain height gets reported as the top of the vessel on the ground above the spot, rather than the height of the ground. Something is wrong with the raycast mask there - I can't figure out why because I'm explicitly using the right raycast mask, or so I thought.
The text was updated successfully, but these errors were encountered: