Make player shoot a projectile that collides with objects?
Exactly as the title says, I'm making a duel grapple hook that needs to be fired, one from each side of the hip. I them to fire toward the middle of the screen, where the crosshair would be :) (I have the third person layout, with the camera inside the characters head).
asked Apr 13 '16 at 07:37 AM in Blueprint Scripting
Sorry for the delay but here's what I've got for you. This is the first part added into your player character.
Part 2 for the player character.
And here is the "hook" you need to add a projectile movement component to the mesh for the hook. Then change a couple things about it, first the initial speed needs to be a pretty high number and then set gravity scale to 0 so that it doesn't fall in the middle of flight.
For the collision sphere you add to the hook you need to change the collision preset to ignoreOnlyPawn, this makes it so you won't hit players including yourself. This happened to me on spawn and the hooks never left the launch point. Also make sure this setting for your mesh is set to noCollision so that only the sphere is stopping it when it hits something.
It's not perfect but I think it'll help. I tried to comment all the code but please ask if anything is confusing or unclear so I can explain further.
answered Apr 18 '16 at 08:49 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here