Shooting functions - Line Tracing

Shoot Projectile



Create a BP actor called BP_Projectile
Add Sphere mesh and Projectile Movement components
Set pojectile speeds as follow:
image.png

Go to 3rd person BP, viewport add arrow called projectile spawn post
adjust its arrow height to chest level, a bit in front of character
image.png
Event graph
image.png

Back to Projectile BP, make the sphere as the scene root,
in projectile movement, tick Should Boune (to let bullet interact with object)
The setting above will make scale has no effect on bullet size
image.png

To change bullet size, go to 3rd person event graph
break the Spawn Transform, and R click, split struct Pin
Repeat on World transfrom node
image.png
change scale as below
image.png

Optional (not work for me):

Create projectile damage/destroy:
Back to Projectile BP, sphere component
Add on component hit
image.png
image.png
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.