I’m honestly not sure what’s going on. I’m trying to pick up these weapons (please see video+ images). I’m having trouble spawning items(with skeletal meshes and physics on). I’m new to game dev so I got a weapon system off the asset store works great I’m also following tutorials on YouTube trying to debug and I cant find anything. I can go over the object and “pick it up” ( the object is being destroys so that’s how I know it’s calling the script. Once I go over to the other object to pick that up it spawn the original weapon. But it never shows up in my hand.
hi man,
watched your video ,
I never use systems from the store XD because i dont wanna search on how they works.
But here some stuff.
i think that in the store-system they give you a weapon blueprint ? a droppable ?
that you can customize.
Something like “BP_Weapon_pickup” that you can set as a ak47 or a desert eagle.
thats the mesh , and probably you can pick up a certain number of ammo too.
All these things should be inside your BP .
The system should handle the collision- and the add to your hand and inventory.
Doing this manually is something like this.
Start-game with Gun mesh Physics enable .
when you do this, the Actual actor is not moving , and will remain in place.
What moves is the Mesh ! so you will end up with a mesh position that change
but not the actual Actor position.
When the collision with the actor happen ,
or when the player use the Pick up action.
you have 2 options , (i dont know what the system is doing !)
1 Destroy the Actor with the physics… you dont need it anymore,
Just set an Extra-gun-mesh parented to your hand to be the new gun !
when you want to drop it, Set the Extra_gun-mesh to nothing ,
and spawn an Actor Gun from your hand with physics enabled .
2 ok lets grab this very gun …
We needd to set physics off , you can do it via blueprint too,
Something like Enable physics - false
then you want to reset the position of the mesh to relative 0 0 0 ,
So the gun go bach to the center of the actor.
Now you can attach the actor-Gun to your hand.
- When you want to drop it, you can break the attach and re-enable physics.
Hi and thank you. I think there was some mis communication. I’m using Weapons assets all the blue prints are made by me which is why I knew hot to get the physics enabled mesh to spawn at my players 0,0,0 position. That being said, I’ m very new to this and do appreciate the help. Is their a Tutorial I could watch that talks about enabling and disabling physics in the blueprints that you know of? Or should I be looking for a different solution?
World items that you can interact and pickup should use a static mesh.
On interact → destroy the sm actor, spawn the skeletal mesh actor at the players Actor Transform.
Attach Actor to Component (Target= Spawned Actor, Parent=Pawn mesh)
Your attached actor cannot have any “Blocking” collisions or Physics enabled. If it does it’ll mess up character movement. Usually causes extreme jitter etc.