Hey guys! So, I’m currently working on adding in a custom tool/camera system for my game, and when it comes to animating my character I’m incredibly inexperienced.
I just wanted to know, how would one go about animating the arms manually, through code?
I’m assuming there’s a pretty standard technique out there for making the arms hold a gun, and point towards the mouse. I can figure out the math - but how is the actual rotation of the arms done?
Can I edit the existing motor6ds? Or do I have to replace the existing ones with my own? And would it be better to use the animation editor, or should I use my own fancy maths? Could I use both?
Would you be able to expand on what you mean by making the gun point towards the mouse?
This seems pretty unatural to me, I don’t think I’ve seen any games point a player’s gun towards the mouse, except for maybe just tilt up and down movement for looking up and down (is this what you mean)? In most games, like Fortnite for example, the gun just points in the direction the character is facing, but there is no ‘sideways’ movement in how the gun is held.
if you want to make it so the arms point towards the mouse you will need to cframe the arms. Another way you could do this if you still want to animate the gun would be cframing the torso/upper torso towards the direction the camera or mouse is pointing at. But there is no other way of doing that I believe, your best bet is just cframing. There is a video that covers maybe some of what your looking for here.
No, there is no sideways movement. Really the important part to me is just knowing the best method in terms of performance/consistency when it comes to rigging the character. Should I try to attach motor6d’s, Or just CFrame without any attachments?
This question also depends on what kind of rig you’re using (R6 vs R15). One method I would suggest is having an animation for the arms, but then rotating the torso and head with CFrame logic. You don’t need to replace the already existing motors with new ones, the regular motors inside players is fine, all you need to do it have a loop that lerps the C0 of the motors you want to move. A youtuber named okeanskiy made a great tutorial on getting the head to turn based on the camera, maybe this tutorial will help you with your problem: https://www.youtube.com/watch?v=HjfjWySxRRA