Thursday, 10 December 2009

Stupid world size error in template (and hence your code)!

There is a calamitous error in the setup code (only just been spotted). This won't effect you until you try to use the collision system.

The lines to adjust are found in the Statup() subroutine found in GeneralLogic.cs

private void Startup()
{
//make sure tracks are defined before using them
CreateTracks();
//engine settings (can be changed)
engineM.ScreenColour = Color.Black;
engineM.WorldHeight = resolutionX;//<- should be resolutionY
engineM.WorldWidth = resolutionY; //<- should be resolutionX

Just make sure the WorldHeight is set to the Y res and the WorldWidth is set to the X res.

Sorry about this and thanks to:

Dan Cotton
Richard Brinkley

for originally spotting this problem.

No comments:

Post a Comment