Wraping Help
by Phillip "Renolc" Gibson · in Torque Game Builder · 07/09/2005 (6:20 pm) · 3 replies
I'm having a bit of trouble getting my .map to wrap. Probably some stupid coding mistake on my part ( >.< ).
function createWorld()
{
%world = new fxTileMap2D() { SceneGraph = t2dscenegraph; };
%world.loadTileMapDatablock(test);
%world.setPosition( "-50 -35" );
%layer = %world.getTileLayer( 0 );
%layer.setPosition( "0 0" );
%layer.setWrap( true, true );
}
#2
-Peter
07/11/2005 (11:15 pm)
I think for it to wrap you have to move it with setAutoPan(). If you're moving the camera then it probably wouldn't wrap. I don't use wrapping so I'm not really sure, but that's what my instincts tell me. Try it out. Keep the camera in one place and set the auto pan. It should just wrap.-Peter
#3
07/12/2005 (5:57 am)
Your suggestion worked out perfectly. Thank you! =)
Torque Owner Phillip "Renolc" Gibson
2 days later and I still can't seem to get this to work right (although, I admit, I haven't been trying as hard as I could be).
Has anyone successfully made a neverending, repeating world from wrapping tilemaps? If so, then please share. =)