Terrain Traversing

Hi all,



I have followed the FlagRush tutorial to create my own game and the problem is briefly describe in the picture (hopefully)

The player is just a box and the terrain is a TerranPage



On the picture

  1. The direction of the box is always the same, this is an example when it goes up the hill
  2. That is what I want, the direction of the box should change like that



    I think the normal vector of the terrain should work but whats next and how  :smiley: ?



    Any help will be much appreciated,






It's part of the Flag Rush tutorial:



http://www.jmonkeyengine.com/wiki/doku.php?id=hugging_the_ground_and_let_s_not_drive_a_box



see the section:



Terrain Normals and Orientation

mojomonk said:

It's part of the Flag Rush tutorial:

http://www.jmonkeyengine.com/wiki/doku.php?id=hugging_the_ground_and_let_s_not_drive_a_box

see the section:

Terrain Normals and Orientation


Ah, my bad, I should have read that last tutorial  :D
All done now ! The tut also told me how to get the shadow up
Thank you very much !