Time trial ghost racer

Well, I’m making a sort of racing game at the moment. I’d like to have a sort of time trial mode in which you race against a ghost of yourself. It records how you race during the first lap and then plays that during the second lap as a transparent ghost while you try to do better. It then records my second lap and plays it for its third.

To achieve this sort of effect, my plan would be to have a semitransparent ghost physics copy of you, which is slow parented to you. If the slow parent value is equal to the time it took you to complete the lap, I think this might work.

Unfortunately, I do not know how to adjust the slow-parent time each lap to match this. I could create a timer on the player that records its value and then resets itself when the lap is completed, but I do not know how I would set this value to the slow parent time.

If this cannot be done, or slow parent works differently such that this would not work, or there is a better solution, just tell me so and that would be appreciated. (Is slow parent an exact copy of movement a number of frames earlier, or does it average this movement out somehow over time?)

I believe slow parent is smoothed, not following the path exactly. I’m pretty sure there is a way to play things back using Record Physics to IPO from the Game menu, but I don’t personally know how.

‘object.timeOffset = float’ changes the slow parent value. I’m not sure if it works in the GE though, you might have to do a test.

Well, that does set the slowParaent value, but slowParent doesn’t wor kas I hoped it might, as Magnum Opus pointed out. I’m doing a bit of experimenting now, although I’m pretty sure it won’t work.

Also, large slow parent values seem to have the ability to deform a mesh…