Weapon Pickup Prefabs

Pedro

Member
I just started using this ecosystem yesterday and it seems very powerful so far.

I followed the videos to create pickup weapons and that worked.

However since there were so many steps including aligning the weapons to the hands, etc I thought there might be a shortcut and I could just use the prefabs from the demo and pickup those weapons. Of course that didn't work, and I see that the character is also missing many parts of the rig if weapons aren't set up exactly as per the videos.

I'm wondering if there might be a more automated solution possible with prefabs where weapons are already setup for the default character and that can just be dragged into a scene?

If scripting is required to set things up, maybe a script that automatically recognises characters and weapons in the scene and sets up the relevant linkage?

I like that everything can be configured in such fine detail, but sometimes it's nice to set up a quick prototype of a scene without having to make so many adjustments. That would allow things like having weapons that could be bought in a pack and dragged directly into a game.

Is this possible already (from what I understood in the documentation it's only possible once each of the weapons has been created in that scene using the interface), or is it something that is being worked on?

Thanks
 
I just saw you'll be releasing a new inventory system soon so maybe this is something that is planned for that new system. If so, looking forward to it.
 
Unfortunately I do not know of a quicker way to configure the weapons. If you have any ideas I'm all ears :)

The problem is that the weapon models and character rigs are all different so unless you position the Items GameObject in exactly the right transform location and also adjust the pivot position of the weapon's model to be exactly the same offset compared to the other weapons you are going to have to go through the manual config process.
 
I can definitely see where the rotation/scaling/transform of the weapon relative to each character rig could get tricky.

For 1 handed weapons it might not be too tricky if you set a rotation/location that is relative to the hand position and angle of the arm. For a sword/knife it would be pretty standard as well as for a pistol.

For 2 handed weapons it might be trickier if the arms could be at different distances from each other in different character rigs. If they are the same distance, perhaps it can be computed based on the hand holding it in a similar way to the 1 handed idea above. If the distances between hands vary only by the size of the character then scaling up the weapon might work, if not it might get complicated.

Again, it's only my second day looking at this so perhaps these ideas won't work because of things I have yet to discover.

My main "pain" point if you could call it that, is that for each weapon I can't just take a prefab with the muzzle flash, bullets, pickup actions, etc and just place it on a map and get it picked up. Instead, each of the functions of that weapon needs to be re-mapped for the character/scene. Coming from a programming background it seems to me like rewriting rather than reusing code (or object creation in this case).

This makes me think that even if the weapon itself needs manual rotating/positioning/scaling, perhaps all the other linkage steps between Item Type (multiple types if they have bullets, projectiles, etc), Item, Object (pickup and drop) and dynamic pickup could be saved in a Prefab that could just be dragged onto scene. It could even have a standard rotation based on the character it was made for and then that could be rotated/adjusted if necessary without having to "rebuild" each weapon and its effects each time.

Not sure if that makes with how everything works together, but if it is possible I think it would lower the learning curve and time to build a MVP prototype substantially, as well as allowing you to sell weapons packs that are pre-made and can just be dropped into a game.
 
Just to clarify, what I mean is once the weapon and its linkage are created through the interface it would persist in a Prefab. I understand that to create an entirely new weapon based on a 3d mesh, etc all the steps of the creation tool are necessary.
 
It sounds like you are referring to runtime pickups. Most of the weapons in the demo scene are attached to the character, but the bow and katana are setup using a runtime pickup so you can make a prefab with everything included:

 
I was referring to both runtime pickups and weapons that can be assigned to characters when the game starts depending on code - runtime, without a pickup.

The tutorial you linked to is the one I mentioned that I could do without a problem, but I was just trying to find a faster way to add weapons that had already been configured as pickup prefabs.

In the demo I saw prefabs such as AssultRiflePickup.prefab, PistolPickup.prefab, etc but I couldn't get them to work in a new scene without going through the whole process in the linked tutorial. I just tried with the ThirdPersonControllerBowPickup.prefab and the ThirdPersonControllerKatanaPickup.prefab from the demo but when dragging them into a scene with nolan from the demo the character doesn't pick up the items.

He does however pickup other items in that scene which I've set up from scratch. Is this the expected behaviour? That a pickup object needs to be setup from scratch for each scene?
 
Top