The Kid from IWBTG -style character. This requires a lot of things so it should be a nice guide for stuff to implement next.
We'll need:
[x] Lock rotation of a rigid body
projection solution that feels kind of hacky but is actually equivalent to an angle constraint in XPBD
maybe setting moment of inertia to infinite would be a better way to do this?
[x] Move with keyboard
[x] Jump
[ ] only when on the ground
requires events (#23) or some way to query this from the physics system on demand
[ ] with customizable curve
Exempt from world gravity or adding forces on top of it? Probably the latter because it allows to create environmental gravity effects that affect the player
[x] Shoot bullets
Bullets should move linearly. Many ways to do this - kinematic body, dynamic body that doesn't respond to gravity, dynamic body restricted to a curve?
Would be interesting if some gravity sources like point gravities in the world affected the bullets though, maybe a bitmask to decide which forcefields apply?
[x] Bullets disappear on contact with things
See comment on jumping only when on the ground
[ ] Die on contact with specific objects
Again, requires reacting to collisions, but also more associated information from the other thing (does it have component/tag x?)
A great deal more logic is required to handle respawning; this can be worked out later when making an actual game
Closing this as I'm now working on an actual game which is a more natural place to solve these problems. Will probably copy some stuff from the game's player controller back to the test game when it's done.
The Kid from IWBTG -style character. This requires a lot of things so it should be a nice guide for stuff to implement next.
We'll need: