playMaker

Author Topic: Align car with terrain?  (Read 1345 times)

evmo

  • Playmaker Newbie
  • *
  • Posts: 21
Align car with terrain?
« on: March 15, 2018, 05:25:26 PM »
Hello all.

I'm starting to prototype an idea I have that involves moving vehicles across a large map on set roads.  The vehicles move from place to place very well with all the pathfinding I've set up and I have a pretty good idea of how the logic for the game is going to work.

My problem is I can't get the cars to align properly to either the terrain mesh or roads I've created with EasyRoads3d. The cars will always look in the proper direction on the y axis but I can't get them to match the angle of the terrain when going up and down hills.  I've tried a few things, including getting the normal by raycasting and trying to align the car to that as well as a few other methods but have had no real success so far.

I'd rather not implement a full on vehicle rig because these cars are very small, the entire game takes place from a birds eye view like Age of Empires and Starcraft.

Is there a cheap, easy solution to this?

evmo

  • Playmaker Newbie
  • *
  • Posts: 21
Re: Align car with terrain?
« Reply #1 on: March 19, 2018, 10:00:40 PM »
Anyone?