Freeze a projectile in mid air?

Basically I want to have something similar the secondary fire function of UT’s shock rifle (freezing in mid-air), so I can use it as something to “grapple hook to”.

The way I’ve approached it thus far is use the first person template’s “Spawn projectile” scripting and to try and add a projectile movement component to it to reduce the projectile’s velocity to 0 at a click of a button.

Now I’ve tried to incorporate this both directly into the existing script and have it running separately, but neither has worked, I’ve tried look across the web for what I’m looking for without success.

I apologise if this comes across a rather vague, as I’ve just started to learn blueprint so my terminology is probably lacking.

Cheers :slight_smile:

in your player controller, add an event dispatcher called ‘notifyFreezeProjectile’ or something like that. use whatever input you want to call that event dispatcher function.

in your blueprint for the projectile, on beginplay, get a reference to your player controller, and assign ‘notifyFreezeProjectile’ to this blueprint.

from that event, grab your projectile movement component, and drag out ‘set velocity in local space’ from the pin. also, depending on whether or not your projectile arcs, you’ll want to set your gravity to zero as well.

you’ll need to add some logic that regulates when to shoot vs when to freeze, but generally, thats one way of how you can get the two to communicate.