Labels

September 12, 2012

//status update 03 & RGP day 6

it`s been a while, but no worries - the racing game project and BGE Candy is progressing. Slowly though as the spare time passes with friends and grasping the last summer days before I go back to France next week. After that aside from the job I am fully focusing again on RGP and BGE Candy.

RGP day 6

After a few days of intensive tinkering with vector math, I finally found a perfect solution to get barycentric coordinates of the track (I explained about this coordinate concept in the previous post)

I found rayCast() function in Blender`s Python API which also fetches UV coordinates of the ray intersection point. So now all I need is to UV map the race track, shoot a ray from vehicle down to track`s vertical tangent and voila we get vehicles relative position on the track.

I also made a simple racetrack trajectory recording system that records position and speed of the car at current segment. When it is recorded it saves it to a list and AI linearly interpolates between the points.

That`s it for now.