Game Development Community

TX2D: 3.1.5 Beta: Bad layering - Resolved

by Will O-Reagan · in Torque X 2D · 06/07/2010 (9:58 pm) · 4 replies

Build: 3.1.5 Beta.

Platform: Windows or Xbox 360

Target: In Game, Windows or Xbox 360

Issues: After traveling a short distance in game with the platformer, I noticed some objects which which were on layers 20,19,18 were swapping positions.

Steps to Repeat:
1. Start new "PlatformerDemo" Project
2. Right Click on starter demo solution, add project, Add 3.15 Pro, no GUI
3. Change references to from TXCore and TX2D, to the 3.15 core and TX2D
4. Travel a short distance and you'll soon find objects not staying on the appropriate layer.


Suggested Fix: Solution mentioned below

About the author

I have a degree in dramatic art, and literature, from UC Santa Barbara. I've worked for a few studios, also at Animax Ent in 2008, and some smaller studios. Currently studying Computer Science at CSU Channel Islands.


#1
06/14/2010 (5:07 pm)
Found it...

Fix is T2DSceneGraph.cs, line 371.

Change from:
_containerQueryResults.Sort(start, end - start + 1, comparer);
To:
_containerQueryResults.Sort(start, end - start, comparer);

The + 1 was added in 3.1.5 but it is incorrect.
#3
06/25/2010 (10:07 am)
This is has been fixed in the new beta.
#4
06/25/2010 (3:17 pm)
Logged as TQA-427.