First of all, a lot depends on how you move your plane. If you do it using a timeline or any other type of interpolation, it seems as if the plane were moving, but its actual velocity value is zero, because interpolation just moves your object from one point to another with every tick, and in this case referring to your plane for velocity is useless.
If the plane is your pawn, getting velocity is not a problem.
Next, you may actually set an actor’s velocity upon spawning, just like this:
I’m trying to make a plane that drops a bomb, but i want the bomb to inherit its speed for the pawn (the plane) and let the projectile movement do the rest. i have not been able to get this to work. So far i’ve tried:
Adding the pawn’s speed to the initial velocity in the actors construction script.
Casting for the pawn to the actor to add its initial speed to the speed of the pawn.
No, its says that my velocity is 0, 0, 0 when i do a quick print to screen of my “Self → Get velocity”. But i do have a current speed variable, is there a way to add this to the velocity?
How do you set the Current Speed variable? Normally you would do that by getting Velocity and getting Vector Length from that, but since your velocity is always 0,0,0, as you say, where does the Current Speed come from?
But I believe you can use that. You can get your Plane’s Forward Vector, multiply it by your Current Speed and you will have your velocity. But that will only work correctly if your Current Speed value actually corresponds to the Plane’s Velocity.
You use Add Offset, that’s why you get 0,0,0 from velocity. But that’s fine; have you tried the thing with the Forward Vector that I suggested? That should do the trick.
Well I don’t know than… try figuring out why this happens. Promote your bomb to a variable and try setting its velocity manually by key after a short time after spawning. Try adding a 0.1 seconds delay before setting its velocity. If any of these works, you’ll know that the problem is not in the bomb itself. If it doesn’t work, then the bomb is the problem, and you’ll know where to dig.
The second line you print — it’s the plane’s forward vector, right? Or is it supposed to be the bomb’s initial velocity?