[Java 3D Physics] from scratch - Collision Detection With Terrain (Height Map vs Point) Test

preview_player
Показать описание
Thanks to the ThinMatrix tutorial (link below) i could get the idea on ​​how to do this. The only difference is that i'm using a more simplified formula for barycentric coordinate system: f(x, z) = (1 - x - z) * y1 + x * y2 + z * y3 (x and z are values between 0.0~1.0, y = terrain height)

References:

Resource:
Рекомендации по теме
Комментарии
Автор

OMG ! ! awesome ! and 0:49 very smart !

rauledgardocorimayo
Автор

This is exactly what I'm trying to do!

RaposaCadela
Автор

I dont see any heightmap used here.
What is actually going on here. Are you extracting the pixel color value from a image(heightmap) then using that to calculate what the height of the player should be.
Or am i wrong.(I am still beginner)

oom
Автор

One question, why is that when we press and hold a key, it waits on the first press and then continues moving. How can you do it when pressing it, it start moving right away as u hold it

factionmanager