updating inertia and lighting