When attaching the weapon to the view model with Motor6d, the gun doesn’t align with where the player is facing. Can anybody answer my problem?
I’m pretty new to Motor6d.
When attaching the weapon to the view model with Motor6d, the gun doesn’t align with where the player is facing. Can anybody answer my problem?
I’m pretty new to Motor6d.
It means that the part you’re using to attach the Motor6D with the view model is rotated in a different way.
There are 2 solutions, rotate that part until it aligns with the ViewModel (such as making the forward surface the “Front” one) or just loading an animation onto it.
hey EgoMoose! For some reason whenever i shoot at something it doesnt damage it.
Help is much appreciated, Thanks!
That’s because the tutorial doesn’t include a part about actually making the weapon fire bullets.
There is some sort of new bug with this system. If you move the camera up and down, the torso and head both move up and down, but the arms don’t, if they are playing an animation.
To be clear the arms move with the torso when they are not playing an animation, but if they are then they don’t move at all.
I am also having this issue, it causes some really weird arm movement when I rotate up and down. I am using the BodyPosition method that is being updated by the server.
Have you found a solution to this issue?
No, I have not found a solution to this issue - it’s clearly on Roblox’s end.
I just want to say that I recommend that you stay away from the body position method, that is a bad way of making a viewmodel(I tried almost every single method possible of making a view model, and found that body position is one of the worst looking ways to go about it, and it also comes with many bugs).
I recommend that you use math to position your viewmodels, but just as a warning this is a very complicated thing to program - assuming you want to have weapon sway, realistic recoil, hands in the right position, avoid clipping into walls, and your code being virtually bug free.
So when it comes to client-server replication, are you suggesting to use EgoMoose’s original method with constant signals?
That might not be the best solution because of all the network traffic, and it relies on animations, which don’t seem to be working.
If you want to replicate movement over to the server, then you need to move the torso and neck, like how EgoMoose originally had. Then on top of that you will need to use inverse kinematics to get the arms to touch the weapon, while being connected to the shoulder joint and looking natural. Of course you will also need to interpolate between where you are now and the next frame.
So the frame you just got is where you want to go in 1/10th of a second, and the frame you’re at now is where you start. Once you get to that next frame, which is now the current frame, you wait for the next frame to show up(should have showed up by now) then repeat.
Just to let you know (in case for whatever you’re still interested in it), I accidently fixed the arm rotation problem. I made my previous animation using the Roblox inbuilt animation editor, however switched over to using the Moon Animator Plugin, and remade all my animations.
I only realised when testing that the issue is no longer there. I didn’t change any code for this to happen, so I have to guess the Plugin did something to make it work
I have same problem, if i try to set RightShoulder’s C0, it doesnt rotate correctly, even though neck and waist are rotating perfectly, ive been searching for the solution for days and didnt found anything, i cant belive they didnt fixed it already.
I am having some weird issues with reload animations as well. I am using the open source FPS place engine that was posted which has a lot more mathmatics (including sway, bobbing, and tilting) to make the viewmodel super smooth (On a side note can you please add comments to the code? @EgoMoose)
Here’s what’s happening
Once again, this project was made from the Open Source FPS place link at the bottom of EgoMoose’s post. The only code I changed was adding a reload function in the FPS module and a reload bind in the control local script.
function fps:reload()
-- the reload animation track is inside the script as a temporary place until I can get it to work.
local reloadAnimation = self.viewModel.Humanoid:LoadAnimation(script.ReloadAnim)
reloadAnimation:Play()
reloadAnimation.Ended:Wait()
end
Could someone send me the file of the place he linked? I’m on mac and whenever I hit Edit it just opens my studio.
Thanks buddy, thats a great tutorial
Did you ever manage to figure this out?
Hello devforum, ive got this problem, im using viewmodel that uses characters arms and when i go into first person right arm doesnt move in animation (such as recoil or idle)
how do i fix it?
Anyone know how to get the r6 place file? It doesn’t exist anymore.
Unfortunately I did not. I have started making first person shooters without this engine but I am still not the best at CFrame math which is pretty important for procedural animations XD
Nice tutorial (didn’t try it) cuz it doesn’t include shooting
I really like this tutorial! Coming back to it 6years later after first reading it with a more solid understanding of CFrames is both funny and gives off some nostalgic feeling . This being said, there’s one line I don’t get:
Where exactly are we setting part1’s CFrame to the camera’s?
Because I don’t see it being set here, does anyone know what was originally meant by it?
Or, to be more specific:
joint.Part0.CFrame * joint.C0 == joint.Part1.CFrame * joint.C1
joint.C1 = joint.Part1.CFrame:inverse() * joint.Part0.CFrame * joint.C0
– recall though that joint.Part0.CFrame == camera.CFrame, thus:
joint.C1 = joint.C0
I really struggle to understand the point of all of this
This being said, on an unrelated note:
Title literally says it, the FIRST PERSON ELEMENT of a FPS, meaning only the FP in FPS. if you only came here looking for the shooting part, you should try another tutorial instead. I’ve heard FastCast’s good so maybe you could give it a shot