You might read the more recent article on Renegades, a much more
fully developed game engine. It solves this problem using a
navigation mesh. Here's the article info:
<http://www.rbdeveloper.com/browse/2.4/2411/>
Sorry, I wasn't clear enough. I do use a navigation mesh made of
triangles, the article I read just didn't show how to support making
ramps and hills (making the character react to changes in the y axis
of the triangles), it only showed how to make flat maps.
But it is also quite possible to use the approach you're using as
well, simply calculating the Y intercept of each triangle.
This was the only way I could think of to do this; what approach do
you reccomend taking?
NAN means Not A Number. It typically happens when you divide 0 by 0
or something like that. There's some singularity in the equations
you're using to calculate the Y offset, and you hit it in that
corner of the room.
OK, I'll try to find the problem there.
Thanks,
Joe Raffanti
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|