On Dec 19, 2007 10:17 AM, Kai Sterker <[EMAIL PROTECTED]> wrote:

> There needs to be some glue that aligns the sprite with the object
> model during rendering. Looking at the examples here
> http://lists.nongnu.org/archive/html/adonthell-devel/2007-08/jpg4iqxtf0Ec4.jpg,
> it appears that this alignment cannot be computed by the engine, but
> must be specified explicitly for each individual object model. (Of
> course, an object editor will be able to do that automatically.)

After looking more at the code, I figured that alignment of 3D models
and sprites was already pretty much built in :-). All it took was
changing the origin of the cube-shapes from 0,0,0 to whatever offset
fitted best. A little extra code was required to get it working, but
the result looks good to me (see attachment).

With the synchronization out of the way, I can continue with other
remaining issues. For that, I made some more improvements to the
collision debugging code (also shown on the image below). This doesn't
completely eliminate the need to use gdb to track down issues, but it
helps a lot :-).

Get the code from CVS and have a look yourself, if you want. Help is
also welcome, of course, but I can understand that it is quite hard to
get into the current code without much documentation around it.
Something I should change soon ... at least I would like to get some
sketches up on the wiki that demonstrate the placement of objects on
the map and the alignment between the images and underlying models.

Kai

<<attachment: collision-demo.jpg>>

_______________________________________________
Adonthell-devel mailing list
Adonthell-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/adonthell-devel

Reply via email to