Backward physics raycasting

I raycasted to the terrain downward from over the terrain and it gave me the correct result.
But raycasting upward from the point under the terrain did not returned successfully.
Is ‘back-side’ of the physics mesh does not have collision?

What would be the best way to know the ‘current position’ is overground/underground?

Edit by O: Removed things the OP found confusing and thought is ChatGPT Ai generated text. :rofl: Converted to simple 2 small paragraphs. There, concise.

TLDR: No engine that I have used and have contracted with has this ability (raycast up…backward physics raycasting) without custom work and meshes. It can be done though.

I had to build this in Unity (my own design and contracted) and it works exactly the same in Flax. If constantly using physics for spatial awareness you will have serious performance issues later. Star Citizen and Bethesda’s game designs are great examples of heavy physics usage and the issues associated with them. Bethesda’s cell based system changes sizes between games too because of this. Fallout 4’s cells are much smaller because of all the junk. CIG is trying to get their PES smoothed out and having lots of issues because of the limits of the physics engine and their database methods. Not sure if they will ever get it work properly. It is working now but barely.

Each object (abstract, static, interactive, physics et al.) needs to have some sort of spatial awareness at some point. Even static. Choosing physics rigid body solutions for everything is a very bad idea.

Hmm… This is rather a compromised practice for a rigged chatacter controller in a ‘map’, than a logical solution for a spatial query.

I am querying the position of an abstract object, not a physical roaming entity - so cross checking external data and ‘revert warp’ might be not applicable, but anyway thank you for advice.

In conclusion - most engines does not allow double sided raycast detection, so must make some workaround.

1 Like

Edit by O: Details post rescinded.

Are you using generative AI to make answers here?
First answer was at least a little helpful, but the latter one is embarrasingly out of focus, talking all about ‘a certain map implementation design’ and very ‘ChatGPT list styled’.

I considered that you had touched and added your experiences to the generated answer at the first time, but ‘Keyword feeding’ at the second answer is pretty uncomfortable.

I’ve seen many of your activities which was not like this, and I thought you were an experienced dev. Are you hacked or something?

I cannot even imagine what lead you to post code of dampening.

“You need to think out of box…”.appendText(RETURNED_VALUE)

Is not much a good development of logics to connect an arbitrary paragraph.