How do you make a viewmodel arms system?
I want to create a system for first-person viewmodel arms. I want to keep it organized with components and controllers, but I don't know how. Should the arms be part of the object that I'm holding or can they be separate? Should the arms be a component? Any examples or advice on how to build this properly with Flamework would be great.
Solution:Jump to solution
I'd make a controller that controls arms enables and disables, without components.
You could add what type of hands to do, animation set to use and prob what weapon to hold...
29 Replies
Solution
I'd make a controller that controls arms enables and disables, without components.
You could add what type of hands to do, animation set to use and prob what weapon to hold
should the hands be part of the object, or can it be separate?
^ imo it's better to do the item in viewport hard just cosmetic and to hide a real item
Separate ig, or wdym by object?
just any tool ig
something that is being held
I also want to be able to switch modes (first, second person). Do you know what can be done so that the object is visible in both cases? I assume that I need to hide/show real/viewmodel arms when I change person modes
^ I think if the arms are purely visual they better not impact anything, so they can exist independently of everything
Oh, what about just enabling and disabling viewport hands when you toggle the view?
the item that I'm holding
I'm not sure what would happen to it
Nothing? Can you avoid using the same item in hands and for the character? - cause it's can overcomplicate things imo
I probably can, but... What if, for example, I have some kind of
ParticleEmitter
in the item? What if the player switches the person when it emits?Can you prepare hands for every object? - it sounds as hardcoding but imo it will be the best and least complex
Maybe I can make it so that when something happens, it affects both, the real and viewmodel item
But just parenting one of them to
undefined
so that the other one is not visible
do you think that works?:0 yeah great idea
Ic, thanks
I have to think how to setup it now..
ugh.
Btw, I think it's better to avoid the viewport frame and just parent them probably to workspace
yeah I will parent it to workspace, It's just being called viewport arms by some people
Replicated storage/
/Assets
/Weapons
/Tools
/Hands
I think...
^ then separate hands could be separated in class apparently
With animator class that has registered animations for those specific hands
wdym?
Uhhhh
Class for hands
And class inside for animator of hands
I think
And class inside for animator of handsI don't quite get this one animator of hands?
So it's a wrapper of normal animator instance to load animations and can play preprogrammed svfx on top ig
ah
Yezz
animator instance as roblox's
AnimationController
?I think it's better to just make it a class and not a controller or component
hm
But at the same time I think it needs guard. Hmmmm
Probably some validator?
¯\_(ツ)_/¯
I'll think about it
I'll write here if I come up with something if you don't mind, just for feedback
maybe a class, that is a part of the
CharacterComponent
composition, that accepts the character component itself as an argument? It would have methods like addItem<T extends BasePart>(item: T, offset: CFrame): T
and loadAnimation(animation: Animation): void
.
ig I'll just start doing something, I'll change it if it doesn't fit
thanks for the helpOki
Gl