Wednesday, June 30, 2010

Correcting Z-Sorting in Away3DLite: Away3D AS3 Tutorial

Away3DLite Tutorial (Feb 18th 2010)

I have a model of an indoor space and the characters feet are showing under the floor at time so I tried my hand at resolving the issue and this was it:

Here in AS3 we change the sort type using the relevant class which has recently changed names from MeshSortType.

Ex: stadium.sortType = SortType.BACK;

This was enough to correct the Z-sorting of the indoor model in Away3DLite. It may very well be the same thing you need to do in the Away3D library. I'm not sure. Unless you are using the new BSP tree in Away3D you will probably need this line.

Either this information was hard to get to or I'm just not very good at finding it but it took some time and trial.

Good luck on your games!

1 comment:

Give me your best comment. *_*