Throwable weapons with physics?

Hi,

I am making a horror/survival game with a group of people.
I have to make weapons that you can pick up (which up to there is going very well). They can be axes, daggers, etc. These weapons are supposed to be able to be thrown at the enemies either to attack or distract them. You can only hold one weapon at a time. We wanted to simulate physics when these weapons are thrown. Right now I am using a template from which these weapons are inheriting which contains a static mesh and a trigger collider for overlap events. I am not quite sure which way to go now though. The chain of thought I am using until now is:

1 - Detect overlap with weapon.
2 - Press a key when overlapping with the trigger to equip it.
3 - Click to throw it.

I was wondering what was the correct way to go through with the throwing part. I thought maybe I could use simulate physics but I was doing some research on projectiles and found out that there is actually a projectile component. Im having issues with simulate physics with the static mesh. Can anyone suggest me or perhaps give me an example on how I could achieve this.

Thank you in advance.

I’d suggest you load up a separate project… brand new. Use the FPS template. Once it loads, migrate only the projectile blueprint (the yellow ball) from it to your current project.

Then go back to your current project and play with the “projectile” settings in the projectile blue print til you get the throw you want. Then when thats all working how you like. Use the same set up for your mesh or replace that one with your mesh.

If you dont want to use the stock projectile component you’ll have to write an entire ballistics system which could be as simple as spawning it just infront of the player and then adding force like

SpawnActorFromClass(myWeapon) at vector location GetActorLocation(getplayercharacter) → Get Forward Vector * float (50) then AddLocalOffset in that forward vector

Something like that will “shoot” a BP.