• News

• Industries

• Learning & Support

• Community

• Marketplace

# Set Velocity with Get Velocity not working right.

Very simple thing: I want to Get the velocity of my projectile and then Set that value to the projectile velocity. Logically it would then change nothing but instead it goes in a different direction. Which I guess is because Set is always local and Get always world. What would be easiest way to get it working right with all in local preferred? If you are wondering why I need it, I basically want to slow down the bullet and then speed it up again. These are the available nodes I tried and all make it go in a different direction:

I’m not 100% sure this will solve your problem since I’m not 100% sure if sets and gets for velocity are local space or not, but you can get local direction by using “rotate vector” with the projectile’s forward vector. Unrotate will do the opposite - it should convert a local direction to world space.

I use the “get linear velocity” and “set linear velocity” to achieve similar things, and I’d use a “vector * float” with the float driven by a timeline or whatever to get the effect you wanted.
Or store the original velocity as a variable so it was always referencing what it was starting.

Still can’t get it to work right. In Kismet you could just make get velocity and set velocity and be done with it and now there are 100 of nodes that do similiar things while it is not clear to me what they are all needed for.

Rotate Vector requires a vector and a rotator. Forward Vector requires a rotator. So first I need Get Value As Rotator? Or is Forward Vector also just the local velocity? Kind of confusing. Problem is also that I have only Set Velocity In Local Space under Projectiles nodes.

There is only Set Physics Linear Velocity and that seems to do nothing, atleast with a projectile. The only Set Velocity node under Projectiles is Set Velocity In Local Space.

Oh man, my mistake! I answered while sleepy. Here, try this: