Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

It sounds like you are describing a transformation matrix. If you are using a specific engine or could share how you currently handle your FPS camera in code, I'm sure that someone might be able to be more helpful.

If I understand correctly, you want to build a "transformation matrix" from your "down" vector, which you will then apply to your camera's rotations. You might also need to look into "interpolation" to avoid sharp changes in your cameras rotations.
If you are actually using rotations to get your "down" vector, you might already have the matrix you need, since it's being applied to your "down" vector. Otherwise you might need to build the transformation matrix yourself.
 If you need to build your own transformation matrix, you might have to look up how to use "the cross product" of two vectors to create a transformation matrix.
If you are handling your player camera's pitch, yaw and roll rotations each frame, you would then multiply the camera's current rotation matrix with this transformation matrix, or the interpolated matrix (to avoid confusion if the gravity ever inverts itself too quickly).

I'm hoping someone else comes to help with your question, but if not; I hope some of the terms I've used can help point you in the right direction.