Is there any way to make 3d head bobbing?

i’m making a horror game and i need to know if this is possible, please help me out, if you do you’ll be in the credits of the game if you want to. i’m thinking of ps1 style head bobbing, like the one you would see in night of the consumers. plz help

There are a number of ways. A simple method, assuming movement is along the XY plane, and head bobbing is along the Z axis, is to take the distance from player to a set point (say the origin) and set the Z height to the sine value of that distance.

So something like this pseudo code : z height = sin(ToRad(player.DistanceTo(0,0))).

1 Like

thanks for that! i figured it was something to do with the z axis, thanks for the help!