Track Map Display

Apps Track Map Display 1.16

Login or Register an account to download this content
EDIT:
Also, would it be possible to fetch the camera position and draw that on the map (either via button to toggle it or whenever the camera mode is F7)?
Camera position can be fetched as is done in AccExtHelper.py.
I don't understand a thing of Classes in Python, or I would have tried to implement it myself, but yeah.. :p

For anyone that wants this, insert this at the bottom of "def render_cars(self):":

Code:
            #Camera Position
            camx,camy,camz = ac.ext_getCameraPos()
            cam_dx = camx*self.scale+self.offsetx
            cam_dy = camz*self.scale+self.offsety
            ac.glColor4f(*color)
            self.glQuad(cam_dx-3*self.arrow_size, cam_dy-3*self.arrow_size, 7*self.arrow_size, 7*self.arrow_size)
 

Attachments

  • Untitled.png
    Untitled.png
    12.6 KB · Views: 67
Last edited:
omg, I am so gonna test this later. Now that you have the python editor open, can you make a way to ignore certain cars? We use 2 cars for streaming our races and they are parked in the pits during the race so they show up on track map display. It would be very nice if it was possible to get the app to ignore those and not draw them.
 
omg, I am so gonna test this later. Now that you have the python editor open, can you make a way to ignore certain cars? We use 2 cars for streaming our races and they are parked in the pits during the race so they show up on track map display. It would be very nice if it was possible to get the app to ignore those and not draw them.
In the lines (line ~828) above what I posted there is an "if v > 0.1:" (so, if the speed is larger than 0.1 unit), it will draw triangles. Then it says "else:" (so, if the speed is not larger than 0.1 unit) it draws a quad.
You could do:
Code:
else:
    pass
to stop drawing rectangles for stationary cars.
You could also include a timer, so if a car is stationary for more than x seconds, it doesn't draw a rectangle, etc. etc. But I'm unsure how that works in this case, as I'm not too familiar with the "def" functions and such.

I am unclear where the bottom of that section is. Is it at line 776?
I may have altered the .py file before, so I didn't want to mention any line numbers. The picture I posted shows line 849. So probably somewhere close :)
 
In the lines (line ~828) above what I posted there is an "if v > 0.1:" (so, if the speed is larger than 0.1 unit), it will draw triangles. Then it says "else:" (so, if the speed is not larger than 0.1 unit) it draws a quad.
You could do:
Code:
else:
    pass
to stop drawing rectangles for stationary cars.
You could also include a timer, so if a car is stationary for more than x seconds, it doesn't draw a rectangle, etc. etc. But I'm unsure how that works in this case, as I'm not too familiar with the "def" functions and such.


I may have altered the .py file before, so I didn't want to mention any line numbers. The picture I posted shows line 849. So probably somewhere close :)
So your tip above works fine, except it will also stop rendering cars that have wrecked and are parked on the side of the track and cars that are in the pits.

If you have made any nice changes to the app, I would love to try it out.
 
So your tip above works fine, except it will also stop rendering cars that have wrecked and are parked on the side of the track and cars that are in the pits.
Yep. I think a timer would be your best bet. I know how they work, but I have no idea if and how they work inside a "def", so I can't be of much help there.


If you have made any nice changes to the app, I would love to try it out.
Definately not apart from the camera indicator, but I've used MapDisplay to try and learn to do Python, so I used it to try some things out and never cared to make a backup. So there might be residual lines left :whistling:
Here's a new bit by the way, where it doesn't render the camera indicator if you're close to the car (it would render the square on top of the car when driving which was annoying).
Code:
            specx,specy,specz = ac.getCarState(specId, acsys.CS.WorldPosition)
            camx,camy,camz = ac.ext_getCameraPos()
            cam_dx = camx*self.scale+self.offsetx
            cam_dy = camz*self.scale+self.offsety
            if abs(camx-specx)>5 or abs(camz-specz)>5 or abs(camy-specy)>5:
                ac.glColor4f(1,0,0,1)
                self.glQuad(cam_dx-3*self.arrow_size, cam_dy-3*self.arrow_size, 5*self.arrow_size, 5*self.arrow_size)
 
Hi @Neys and many thanks for this essential mod! Just a quick question... it will be possible to have an improvement where there will be the possibility to choose between arrows, circles, squares and so on... I mean the car indicators on the map...

Thanks in advance.
 
Hello, is there a way to change the way the cars are viewed on the map? I was trying to see if I could make the arrows a dot (like in GT4) but I wasn't able to find a way.
 
Hello, I have installed the file using CM and enabled it in the APP section but the Map Display icon does not show in the race options on the right side. What am i doing wrong? Thanks
 
Hello, I have installed the file using CM and enabled it in the APP section but the Map Display icon does not show in the race options on the right side. What am i doing wrong? Thanks
same problem for me, check install files all is there except config file (map_display) which is blank idk if its supposed to be?
can anyone tell me the solution? btw latest drivers, win 10, cm also updated
loved this app till 2022 idk why stopped working
 
Last edited:

Latest News

Online or Offline racing?

  • 100% online racing

    Votes: 74 7.4%
  • 75% online 25% offline

    Votes: 103 10.3%
  • 50% online 50% offline

    Votes: 145 14.5%
  • 25% online 75% offline

    Votes: 274 27.3%
  • 100% offline racing

    Votes: 402 40.1%
  • Something else, explain in comment

    Votes: 4 0.4%
Back
Top