Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I manipulate joints to make an FPS camera?

Asked by 6 years ago

I'm making my own FPS camera, so basically just setting the CoordinateFrame of the camera to the heads position and rotating the head and body with mousemovement. All that works fine, but adding a gun to it is just such a pain.

So what the issue is, I want to make it so you look right onto the gun so it feels like you're really aiming with it(so no crosshair, like phantom forces basically). The problem here is that in order to do that, I have to keep manually changing the joints using CFrame in the command bar and then print out the correct coordinates for those joints. And even then it doesn't even come out exactly like I placed them, the angles are always slightly off and the gun is hanging way higher than I did when determining the angles.

Briefly, how would I do this conveniently, in a userfriendly and correct way, how do I manipulate the joints in studio without breaking them and still being able to print out the correct CFrames?(for exemple the animation editor doesn't work, it somehow doesn't actually change the C0 and C1 from the joints, it always prints out the same)

0
Have you seen EgoMoose's recent SH blog post? It explains the basic structure of an FPS system. https://scriptinghelpers.org/blog/the-first-person-element-of-a-first-person-shooter xPolarium 1388 — 6y
0
I have not checked it out, thanks for pointing it out! It didn't really have an answer to my question, but it did give me a good idea on how I can possibly avoid all this manual stuff. HarrySnotte 7 — 6y

Answer this question