Project Update: Collision Detection – I really am stupid…


Well the narrow phase works now, a really useful tip: when iterating through an array in a for loop don’t forget to put the counter variable in the square brackets (anyone know what that’s called? – I’ve gone blank)

Good:

for (int i =0 ; i < array.length() ; i++)
{
       array[i]++;
}

Bad:

for (int i =0 ; i < array.length() ; i++)
{
       array[0]++;
}

Sometimes I wonder why I don’t fall over more often.

Anyway I’ll work on cleaning it up and post it here soon.

Advertisements

Author: Stuart

Crazy Person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s