A tank that follows the terran

Blitz3D Forums/Blitz3D Beginners Area/A tank that follows the terran

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

After loading the terrain, use EntityPickMode land, 2.
Then, instead of using TerrainY, first call
LinePick ex, 2000, ez, 0, -4000, 0
And use PickedY() + 1.5 as the y-coordinate of the tank.
To align the tank to the terrain, use
AlignToVector player, PickedNX(), PickedNY(), PickedNZ(), 2, 0.1
after the linepick.
"0.1" means that the Align should be gradually applied. It should be a value between 0.0 and 1.0