How to throw a ball right on crosshair ?

Hello, i’m a 17 french dev (sorry for my bad english) and i start on Unreal Engine. I saw some tutorials but i’m new and i started my first game wich is a DodgeBall style game. So it’s a 1 vs 1 game where we need to pick up the ball in the middle of the map and we have to throw it on the other player to win. I did grab blueprint and it works perfectly but I can’t do the throwing blueprint. I did the beginning where the ball is detaching my hand but I can’t throw it perfectly on the crosshair. I am using the Add Impulse Node but the ball goes away every throw. So I need tips to do this correctly.

318947-throwscreen3.png

Thx guys !

My suggestion would be to use projectile movement component for the ball once detached from the hand. Destroy the simple ball actor and spawn a projectile version.

For crosshair accuracy you need to triangulate the rotation from ball location to intersect the camera forward vector.

Projectile camera is the current used camera (3pp/fpp/ads etc).
Replace the gun mesh socket location with your detached ball location.

When you detach the ball call the above function. it’ll return the spawn transform for the projectile variant. Next destroy the detached ball (destroy actor), then spawn the projectile version.

https://docs.unrealengine.com/en-US/Engine/Components/Movement/index.html#projectilemovementcomponent