For some reason I thought you were using Bmax with no native 3D and that's why I suggested using raycasting. Just ignore me lol
Lol.
Well, actually, my Quaternion stuff i had just written was all in Blitzmax, and i was using scaled sprites to represent the 3d.
It looked pretty cool and retro.
I did consider using Blitzmax with 3rd party 3d support, ( Blitzmax even supports the Blitz3d 3d engine ), but decided against it, as i know they all have issues of one sort or another.
So, i went back to the system i know works and is stable, albeit quite out of date these days with Blitz3d.
Anyways, the good news is i've cracked my terrain issues.
I ended up using a seperate quad ( 2 triangles ) for each terrain square, with terrain square verticies sharing the same world space. Ie, overlapping.
This allows any texture to be mapped to the terrain quad as it's independant from anything else.
And i don't get the gaps in the seams where i thought i might. Even at low resolutions.
I first tried using a multi texture. ie, putting several textures into one image and then calculating the uv's for the texture i wanted within that image, but this showed up some seams where one texture bled into another. Not good.
But the solution was really simple.
Just use single images as textures.
This also means the uv's are all in the range 0 - 1. Which makes things very easy.
Last night i ported across my collision routines and can now walk all over my terrain, even with slight camera bob.
It meant rewriting the system to use terrain quads instead of terrain verticies but it's a much better system for it.
I'm really pleased with the terrain system. It's easily the best i've written to date.
Now i can have huge landscapes to define my world.
As all thats needed to define the landscape is a 2d heightmap array.
And i can seamlessly traverse the world. Walking from one end to the other continuously.
The next things i want to add are some mods to the controls.
I want to implement the World Of Warcraft system.
This has 2 modes.
Mode 1 is your standard fps controls.
Mode 2, is when a mouse button is held down, and the player has free look, but his direction of travel doesnt change.
Combine this with auto run and you can glance around at the scenry as you carry on in the same direction.
It sounds quite trvial, but i found it to be an awsome game mechanic.
Very easy and intuitive to use.
I also need to implement jumping too.
I suppose i ought to start another thread for this.

TMC