Skip to main content
added 477 characters in body
Source Link
Superdoggy
  • 527
  • 4
  • 16

I'd say you probably want to trace out the track. Try setting up a script for the camera that adds the current position of the camera to a list every so many steps (AKA don't do it by time, but do it by distance.) Once you're done tracing the track you should probably dump a list of positions to a text file so that you can copy them and use them in-game.

The more positions (aka checkpoints) you have around your race track, the more exact the position bar will be.

Here's a picture for demonstration:

race

Sorry about the bad image quality. :P

EDIT: btw something just occurred to me - if your racing game has walls around the track edges then it won't be possible to cut through a section of grass. So if you're on two bends that come very close to eachother just using the distance formula will result in the game thinking that you are further ahead than you can possibly be. So to fix this, to get marker N, find the closest marker that is not more than 3 or 4 markers ahead of the last marker you were closest to.

Hope this helps!

I'd say you probably want to trace out the track. Try setting up a script for the camera that adds the current position of the camera to a list every so many steps (AKA don't do it by time, but do it by distance.) Once you're done tracing the track you should probably dump a list of positions to a text file so that you can copy them and use them in-game.

The more positions (aka checkpoints) you have around your race track, the more exact the position bar will be.

Here's a picture for demonstration:

race

Sorry about the bad image quality. :P

Hope this helps!

I'd say you probably want to trace out the track. Try setting up a script for the camera that adds the current position of the camera to a list every so many steps (AKA don't do it by time, but do it by distance.) Once you're done tracing the track you should probably dump a list of positions to a text file so that you can copy them and use them in-game.

The more positions (aka checkpoints) you have around your race track, the more exact the position bar will be.

Here's a picture for demonstration:

race

Sorry about the bad image quality. :P

EDIT: btw something just occurred to me - if your racing game has walls around the track edges then it won't be possible to cut through a section of grass. So if you're on two bends that come very close to eachother just using the distance formula will result in the game thinking that you are further ahead than you can possibly be. So to fix this, to get marker N, find the closest marker that is not more than 3 or 4 markers ahead of the last marker you were closest to.

Hope this helps!

Source Link
Superdoggy
  • 527
  • 4
  • 16

I'd say you probably want to trace out the track. Try setting up a script for the camera that adds the current position of the camera to a list every so many steps (AKA don't do it by time, but do it by distance.) Once you're done tracing the track you should probably dump a list of positions to a text file so that you can copy them and use them in-game.

The more positions (aka checkpoints) you have around your race track, the more exact the position bar will be.

Here's a picture for demonstration:

race

Sorry about the bad image quality. :P

Hope this helps!