spawn projectile in the midle of the screen
Hello everyone ,
i have created a weaponin blueprint and i set the projectile to be span in the middle of the screen , so i've used the "get controller rotation" node for it
here is the character BP
the result is that it' doesn't spawn right in the midle i will post a pict later and thnx
asked Sep 07 '14 at 07:38 PM in Blueprint Scripting
The rotation is not the issue. You are spawning it at the socket location. With the camera rotation it will fly straight towards where the camera looks so it will have the offset your socket has in relation to the camera.
What you could do is get a trace from the camera, get the hitlocation, get the rotation from that location and your socket and use it. (It's really easy to do that. There is a "look at" node which takes two locations and provides the rotation).
Or you could put the weapon in the middle having that very slight offset to the bottom with which one could live. Especially if you enable a small gravity effect from the projectile movement component.
answered Sep 08 '14 at 12:36 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here