Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by appMobiTony

In the if of the escape clause inside the for loop at the beginning of the function, 'e' should be 'entity' ('e' is just the index of the for loop):

			if(
				e.type == ig.Entity.TYPE.NONE &&
				e.checkAgainst == ig.Entity.TYPE.NONE &&
				e.collides == ig.Entity.COLLIDES.NEVER
			) {
				continue;
			}

should be


			if(
				entity.type == ig.Entity.TYPE.NONE &&
				entity.checkAgainst == ig.Entity.TYPE.NONE &&
				entity.collides == ig.Entity.COLLIDES.NEVER
			) {
				continue;
			}

1 decade ago by dominic

Oh wow, good catch!

This if construct is there to "early out" when the entity does not collide or check against other entities. As it is now, it&039;s always #false and thus the function always takes the "slow path". Fixing this should increase the performance for particle entities and such.

Thank you so much for letting me know!
Page 1 of 1
« first « previous next › last »