Quick Question...

BlitzMax Forums/BlitzMax Programming/Quick Question...

FBEpyon(Posted 2013) [#1]
Hello All,

I have been working on a game for me and a friend of mine, we play lots of Warhammer, and we wanted to play epic 40k, but on the computer. So I started to code an engine for it, and I'm to the point where i want to add the units to the terrain(board).

I have it right now reading the current x,y,z of the vertex used to build the terrain when placing the Entity for the units, and I want to be able to have the units work more freely, but when doing that the Entities sink into the terrain when not placed directly on a vertex.

Any suggestions..?

Thanks,


Who was John Galt?(Posted 2013) [#2]
Either interpolate the z position (look up 2D interpolation) or if you're using an engine with collision commands, 'drop' the entities onto the map until they collide.


ima747(Posted 2013) [#3]
or set the render order so they always draw before the terrain. depends on what you're using and how you want to go about it.


ImaginaryHuman(Posted 2013) [#4]
Bilinear interpolation based on 4 vertices?