Setting velocity?


Quick question, but I can’t find the answer :

I can set actor’s location with “Set Actor Location”.
I can set actor’s rotation with “Set Actor Rotation”.

Where is something like “Set Actor Velocity”?

What is the fastest way of launching an object along a given vactor (object is simulating physics)?

you need to get the relevant component of the actor, and then apply velocity to that

for static mesh you want the static mesh component

for character you want the Character Movement component

If this is for a spawned projectile you can also give it a ‘Projectile Movement’ component so it automatically shoots when spawned.

It can be achieved: Actor->GetRootComponent()->ComponentVelocity = Velocity;

Every Actor has a variable Velocity, you can edit it. BUt it will only affect the velocity if your actor has a movement Component.

Trying to set my velocity to 0,0,0 before I respawn (tried after also but same results)
This is on my player_BP (vehicle) , the respawn works but if player is moving at all it follows through. I want them dead still (but alive, they don’t die :wink: ) on respawn.

Any ideas?

I have added a disable input, stop movement, stop pathfinding chain. That helps if player hits respawn as they are driving. But if they are in mid air the velocity carries through.