How would I make a FPS style camera?

I’ve attempted this a few times, but just can’t get it right. I’m trying to make a first person camera like the one in Phantom Forces, how would I do it correctly and efficiently?

4 Likes

Can you include your code attempt.

All I did was set it to first person and played with camera scripts so the arms were visible when in first person.

Most FPS games don’t use the default Roblox first person camera. Instead they will often use a custom one, whereby you detect the movement delta of the mouse to move the camera (Then update the camera every render-stepped) or something like that.

So an example could be, set the CurrentCamera to scriptable, then connect a function to RenderStepped to set the Camera’s CFrame to the position of the player’s head, then the angle of the camera to where-ever the mouse moves, you can also rotate the character to match the rotation of the camera on the Y axis to help with immersion.

However I believe @EgoMoose did a blog post that is slightly different but could be something you might be interested in here.

22 Likes

Thanks for linking!

I’ll just add you can find the same post on the devforum as well if that suits your fancy.

8 Likes