Friday, March 18, 2011

Cubic Interpolation

I have been working on a new waypoint system. The old one which actually used "points" did not work out for smooth navigation. For tracks with a curvy street it was necessary to place a whole lot of points for every turn, which is bad for a racing game that intends to use many curves. So I read myself into calculating Bézier Curves to create a suitable navigation system and this is what it turned out to be:
The yellow lines ar the tangents for the bezier curve. Every waypoint has four tangents which are connected in this image, that means they work as if the point had two tangents, but it is also possible to disconnect them. The dashed line is the auto calculated middle line of the street.

Then I included this system into the editor:
At the moment I try to make the AI work with the new system.

greetings

1 comment:

  1. Hello
    From Irrlicht forum I found you working on developing a racing game using Newton. It seems you had great success in this matter. I am trying to implement a simple driving simulation. I don't need any sophisticated features just having a simple car physics is enough for me. I tried to use IPhysics (a Newton wrapper for Irrlicht) but it is very old and I had problem to modify it to work with new Irrlicht. Then I tried IrrOde wrapper, I have encountered so many error I couldn't solve even from forum. I tried IrrBP and IrrBullet, again I failed. Finally I came back to Newton by using IrrNewt. Again it is pretty old and I have so many problems converting it to be compatible with new Irrlicht. I am just asking for a very simple working-sample-code using Newton vehicle under Irrlicht. Thanks, newleon@gmail.com

    ReplyDelete