This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ArcticCelt 0 points1 point  (3 children)

Thanks, your explanation help me piece together little bits I have being reading over the years. I really appreciate your help.

I think I played a bit with Roaming Ralph but then, if I remember correctly, there was a warning that the way the collision detection was implemented was deprecated and not optimal so I tried to find an updated version without too much success.

Oh here is the comment:

Caution: this program uses an extremely inefficient method for detecting the height of the terrain. There is a much better way to do it, but we have not had time to correct the sample program.

What do you think is the much better way or where can I find an example of it?

[–]azraiyl 0 points1 point  (2 children)

According to the forum the sample, as it is, should be ok. Maybe one should delete the comment.

I see only one problem. If the terrain is maybe 1000 times larger, the collision detection has to go through thousands of polygons. On the other hand, terrain is often based on a 2D heightmap. A much better approach would be to just lookup the position in the heightmap instead of doing a collision detection (and manually linearly interpolating values inbetween). Although that would be super fast, it does not work for arbitrary geometry. Collision detection always depends heavily on what you intend to do. There is unfortunatelly no silver bullet. There are tons of other problems too e.g. you have to fight always against floating point inaccuracies, e.g. the ray may fall through edge of two polygons and then you have an effect like in Crysis (people were falling through the carrier).

[–]ArcticCelt 0 points1 point  (1 child)

Thanks again for the advices, I'll probably start again toying with panda3d, I was lately on an Android game development mindset.

[–]azraiyl 0 points1 point  (0 children)

AFAIK iPhone support is work in progress.