The command did not null check for components it needed access to. As such it would throw for flyers. The checks themselves wouldn't make it functional for flyers, which require turning off collisions from the entity's collider directly and modifying the rigid body's velocity in a similar manner to the character motor.
Incidentally, by checking for collidableLayers != 0 fixes another bug where the imp overlord and merc would have their layers rebuilt after blinking/dashing. For that reason it's also cleaner to not cache the layers but allow the game to rebuild them, since the entity states related to the aforementioned skills change the character's layer for both entering and exiting the state.
The gravity bug blindly turned gravity off when noclip was disabled instead of checking whether gravity should be on/off based on environmental context.
Fixes #160
The command did not null check for components it needed access to. As such it would throw for flyers. The checks themselves wouldn't make it functional for flyers, which require turning off collisions from the entity's collider directly and modifying the rigid body's velocity in a similar manner to the character motor.
Incidentally, by checking for
collidableLayers != 0
fixes another bug where the imp overlord and merc would have their layers rebuilt after blinking/dashing. For that reason it's also cleaner to not cache the layers but allow the game to rebuild them, since the entity states related to the aforementioned skills change the character's layer for both entering and exiting the state.The gravity bug blindly turned gravity off when noclip was disabled instead of checking whether gravity should be on/off based on environmental context.