Welcome to c4dplugin answers.
Here you can ask questions about CINEMA 4D plug-in software by heyne and receive answers from the support team and other users.

Before Asking
Have you tried finding the answer to your question using the search?

How to Ask
Please ask questions that can be answered, not just discussed. For discussion, go to one of the popular Cinema 4D forums

Provide details. Write clearly and simply. See guideline for writing good questions.

Remember to come back and select the best answer as accepted if it is useful to you.

0 votes
Hi,

I am really enjoying this pliugin so far, and also the fact that you can output data.
Outputting or bringing the km/h data to a text object to display it on the dashboard of my driving car was easy, but I can't figure out the best to output the driven distance. Is there a way to fetch the length of the driven route at a certain point?
I am using a spline as a route, so getting the length of this one is easy in xpresso, but knowing how much of it was driven already is unclear to me.
How would you do this?

Thanks a lot!
CINEMA 4D version R25
in DRIVE! :: Car Simulation by (190 points)

1 Answer

0 votes
This would be a nice feature to be built in! :-)

Since the car not always drives on the route like on rails, the spline length would not be exact and I currently don't see any possibility to get the percentual position of the car on the spline.

My approach would be using the rotation angle of the driven wheels. The P-angle has to be multiplied by the radius of the wheel. This results in the driven distance in meters. (2*PI*radius = circumference of the wheel). Be sure to use radians not degree!
by (2.7k points)
Thanks for your answer!
I tried something along those lines, and it works!
Used both the Front Right Wheel and the Front Left Wheel to find a median distance, compared it to the length of the route - it matches with the route length approximation.
Here is an xpresso screenshot: https://ibb.co/GHZNSLs
Thanks again.
...