Gersberps23's Recent Forum Activity

  • Hi - This topic is diseptively complicated.

    Quick Background: I'm trying to make a top down racer. Specifically I want to explore a 'slot car' concept where the car steers itself and the user is really only controlling the throttle. Too much throttle and the car will drift wide of the turn (something called 'understeer').

    General Approach: I have 'markers' throughout the map that have an instance variable called "GateID". Each car has a "GateID" as well. The car will drive toward the marker with GateID = 1, and when it reaches that, it moves on to GateID =2, etc.

    Steering Approach: I've placed a line on the front of the car (which we'll call "Pointer") that points toward the next Marker. The thought, was that I could control the steering by taking the difference between the Car's Angle, and the Pointer's Angle. So if the car is facing 'up', i.e. 90 degrees, and the Pointer is facing 'right', i.e. 0 degrees, then the car needs to turn right. So then if Car > Pointer, turn right ... right? Not exactly. Using the same example, Car = 90 degrees and Pointer = 360 degrees you would then think you need to turn left because 90 < 360 ... but you still do need to turn right.

    I hope all this makes sense. Has anyone had any luck with this? I just can't seem to make sense of the angles! :(

    Thanks

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi -

    I've found this really useful template (apologies as I can't find the website now so I can't give credit, but I found it in the official discord).

    It works perfectly for what I want to do (I think), but I want about 20 cars and can't figure out how to get this to work with more than one.

    Can someone point me in the right direction?

    Lastly, the game I'm trying to make is a top-down, 2D, Race Manager. If you're not familiar with the genre, you can do a google search for Motorsport Manager and see an example. Perhaps there is a better way to have the "cars" move along the path? But, for what I'm building, it isn't necessary that the cars take a different racing line, etc. It is much much simpler than most top-down racing games.

Gersberps23's avatar

Gersberps23

Member since 28 May, 2021

None one is following Gersberps23 yet!

Trophy Case

  • 3-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

5/44
How to earn trophies