Path: chuka.playstation.co.uk!news From: Tom Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: OT sorting Date: Fri, 19 Mar 1999 13:14:01 +0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 18 Message-ID: <36F24D99.11D1@bristol.ac.uk> References: <36F0DBE6.5561@bristol.ac.uk> <7cqnf5$fu915@chuka.playstation.co.uk> <36F0EE52.1E69@bristol.ac.uk> <36F219C1.3132C523@scee.sony.co.uk> NNTP-Posting-Host: m04.fen.bris.ac.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01 (WinNT; I) Thanks for all the handy hints, it helped a lot. Here's what I ended up doing... Take the average y value of each tile and put it in an array. When drawing each tile, check the mech's height against the tile's average height and: if the mech's above the tile, sort the tile below it if the mech's below the tile, sort the tile above it Sort the mech and there you have it. This works fairly well, although there a few sorting errors occur. Check out Arena2 at http://www.netyaroze-europe.com/~topcats/