Rotation, angle on actor
skott
Member Posts: 172
I'm making a car drift game and would like a score to count up every time my car is like +/-10 degrees from it's current angle. I got the car movement and score setup, but how to determine the angle problem?
I'm also thinking that the car must have a certain speed before the score counts up - So that it's angle and speed that sets the score...
I'm also thinking that the car must have a certain speed before the score counts up - So that it's angle and speed that sets the score...
Comments
Actually, instead of using X/Y position zones of the track, maybe add some large, invisible actors at the drift regions that when overlapping/colliding with the car, they set game level attribute(s) with the desired drift value(s)/range(s). Then the car can (also upon overlap/collide with those invisible actors) wait a fraction of a second and then read those game level attribute(s). Using those values and the car's speed, calculate if scoring should occur.
Each area may need multiple invisible actors to define the curve.
Also, you may want to place a debug "Display Text" of the car's angular velocity while sliding around corners to see if there is any value there that you can use.