How can I set the initial velocity of a projectile in c++? I tried to use the "SetVelocityInLocalSpace()" function but I get an error saying identifier undefined

I see people using this function in blueprint successfully all the time but I don’t know how I would implement it in c++ where would I declare this function?

I did include the necessary header file too, so it’s not that.

I solved the problem. All I had to do was define the velocity in the constructor. It was a very simple problem I’m just very new lol.

The method is from UProjectileMovementComponent

Your projectile class must instantiate such a component

You can also set a world space velocity by setting its Velocity member variable

But if it is only the initial velocity you want to set, you can do it in your projectile constructor by setting UProjectileMovementComponent::InitialSpeed