[SOLVED] Peculiar null pointer exception

What I meant is:
Bullet does that check when you create an object ( mass == 0), however it doesn’t when you call setMass which simply changes the mass without re-initing everything then.

Alright, I found the problem.

See enemy ships were using the playership’s center of mass as their point to shoot at. I have, cleverly, made the calculations for the cog only from modules (so JBullet’s mass doesn’t mean anything here), therfore no modules, zero mass, and cog becomes NaN.

Enemy ship’s lookAt then takes that NaN and ruins their rotation. Everything downhill from there.

An easy fix thankfully :relieved:

Thanks for all the help guys :smiley: