Why is a projectile only firing from player start?
I have a ball player I can move it around perfect. However, when I add a projectile to fire from it, it only wants to fire from the player start.
When I access the Get actor location and Get Actor Rotation Functions they don't ever seem to change values from the player start. I can use world location and that will fire from the location of my ball..
Is there something that updates the ACTOR position or did I build my playerCharecter incorrectly?
Hi, I've done something similar to this, if I understand what you want.
Firstly, in you Projectile Blueprint, you have to create some variables :
Look, I've created a Speed variable which is Vector, a Projectile Owner variable which is an Actor. (You don't need the others). So, create an Event tick node and a Add Actor LocalOffset node. Then you need to add a Vector*Float where you link the Even tick Delta seconds and the Speed variable. Do not add any value to the Speed variable yet. We'll give it a value in the PlayerController Blueprint.
Secondly, in your PlayerController Blueprint, link a "SpawnActor Form class" node to your Fire event. Select you Projectile BP as "Class". For the Spawn Transform, just link this : Get Player Character > Get Actor Transform > Spawn Transform
You'll notice that the Speed variable and the Projectile Owner variable from the Projectile BP appear in this node. If not, try to update and compile.
For the Speed, just create a "Make Vector" node and add the values that you want for Yaw, pitch and roll. You can link these to inputs like a gamepad stick if you want.
And finally, you have to create a reference to Self that you link to Projectile Owner.
You should have something like that :
(You don't need the Make Color 'cause you don't need the Projectile Color variable ;) )
So, I hope this could be helpful
answered May 03 '14 at 03:08 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here