Sorry for asking so many questions, but lack of specifications in Internal Plugins is killing me mPos, which contains x, y and z properties apparently indicate the world position in meters. My question is how to translate these values to draw them on the screen. I think they must be relative to something and I need to create some formula. Also, are the track maps provided by ISI or I need to make them? Thanks!!! Example values of one snap-shot:
There is no easy way of getting the ISI track map details, so you need to create a map yourself. Basically you collect a set of co-ordinates for a lap then you can save them to be used for every lap on that circuit. You can then plot the car position over the same co-ordinates. View attachment 7164
Your concept worked perfectly I threw 20 AI on Sebring track and they drew the map for me I still need to polish it but its great for a first run. Was done in minutes really. Cheers mate for your tip!
Can your drivers draw for me too?lol I have been searching info for weeks in how to draw coordinates to get the track drawned and can't get it....any help please?
Yes, for sure mate! I have the tool ready (demo: http://rfactor.stefanmizzi.com/DrawTrack.aspx) Let me know how can I help you
oh mate, great job what i have seen on that link!...i have a particular hotlaps system for our website and i want to know how to draw the x, y and z coordinates to get a track layout (like you have said before)...i have search a lot of in "saint google", but the tree doesn let me see the forest :-( can you help me with this mate? if you dont understand something that i have wrote, please ask me! thx in advance!
Thanks Yes, I'll help you no problem mate. I am not sure if my way is the best way, but it works Here it goes. So I have defined some variables for each track and save them in the database (or wherever you want) zoom_factor_x //this variable zooms in/out the x position. I use 0.3 to 0.4 roughly with 600px zoom_factor_y //this variable zooms in/out the y position. I use 0.3 to 0.4 roughly with 600px screen_height //map image height in pixels. eg 600px screen_width //map image width in pixels. eg 600px offsetX //this value moves the x co-ordinate to the left or right of the image. It can be +ve or -ve in pixels. usually is 0 offsetY //this value moves the y co-ordinate up or down of the image. It can be +ve or -ve in pixels. I try some different values for each map as shown on my link. Then the formula to draw pixel on image/canvas is: //Posx is the value from the plugin //Posz is the value from the plugin screenX = zoom_factor_x * (Posx) + screen_width / 2 + offsetX; screenY = zoom_factor_y * (-.Posz) + screen_height / 2 + offsetY; NOTE! I am using Posz and not Posy from the plugin file. Hope this helps you. Let me know if you need more info
many thanks...now i must have to translate to my php to get the path draw correctly but this info is very worthy for me...thank you very much and ask me if you need something mate... again...thanks!
If you want try to charge suzuka with cross problem. If you want another view, here you have one map create with js rFCutDetection: http://www.campeonatopdlr.com/rFCutDetection/index.php?logfile=Estoril1985_2012-09-20_22-18.txt