Game Development Community

T2DStaticSprite.CopyTo MaterialRegionIndex ???

by Ezra · in Torque X 2D · 12/18/2008 (5:50 pm) · 0 replies

I'm getting this message when trying to copy a static sprite template which uses something other than frame 0 of an image map.. I'm using a bullet image map with 16 cells of different bullet types.

T2DStaticSprite.CopyTo(TorqueObject obj) needs the following lines of code:

T2DStaticSprite obj2 = (T2DStaticSprite)obj;
obj2.MaterialRegionIndex = MaterialRegionIndex;


Is this a bug/missing in the 2.0 source code? It works fine if the frame number is set to 0 on the template...

*edit*
same results with all components removed from the template