- Home /
Equipping weapons to photon prefabs
I've been playing around with photon unity networking, and i'm nowhere near the point this question revolves around yet but i want to get a better understanding of how this would work.
I've noticed multiple instances where the person designing the game would create a weapon that is actually a part of the player model, as a seperate object. You can turn the object on and off but i'm curious if you can assign a generic attack animation to the player without a weapon.
The main concern is that if i do get a live game up and running in the near future (being the only developer and artist on my solo team) if i could simply create a new weapon model and just add the new weapon to a list of the previous weapons.
Please review comment below
or... will i need to re-edit and animate each character model to include a new model with animation for each gear-related update?
edit: replacing the prefab's model is quite tedious to do EVERY update. is this the only way?
i'm thinking [female/male] would have different weapon renders for the same weapon, different animations for each weapon etc... if i have 3 classes and 2 genders thats 6 models and animations (minimum) to add 1 new weapon
I'm thinking I should create a bone to animate with the character in blender, and attach a unity prefab to the weapon bone for animation following?
then I can swap weapon models in and out through the prefabs?
is this right? anyone have documentation for this thought process?
Answer by Dracorat · Nov 12, 2013 at 10:57 PM
Most games enforce rules on the creation of things like weapons.
Rules like:
Trigger's must always have a distance of X and the depression of a trigger must move exactly Y distance in Z time.
If there's a difference between the animation scale of one model to another, usually the item model is simply scaled to accomodate.
In this way, you retain some level of sanity with regards to adding new stuff. If they follow the rules, it works with existing animations.
Sorry I'm a bit slow at responding... I understand these rules, and the result is that animations must be the same, and the weapon objects should retain the same respect.
What I'm unsure of is if this task would be more simple to create the items individually... I'm really unsure if my armature needs a bone for the weapon, can I replace the model attatched to the weapon... etc?
I understand the logistics of animation, its more the logistics of components such as multiple weapon models, multiple clothes models, bones involved, etc.