Global Variables / Referencing a Variable from another BP (Manipulating projectile velocity)

Hey, i am trying to understand how i can access variables from other BPs. Here is what i am trying to do:

  1. Inside the character BP i store mouse movement inside a vaector variable “Mouse_Pos”

  2. Inside the character BP i spawn a projectile.

  3. Inside the Projectile BP i want to override “Set Physics linear velocity” with my variable “Mouse_Pos” from the character BP. So i can control the direction the projectie is going with my mouse.

However i cannot access the variable “Mouse_Pos” inside the Projectile BP. How do i do that / Is there a better way to manipulate the projectile velocity.

Simply drag off an output pin of the BP type you need to access functions and properties of.

If you are receiving a generic reference from something such as “Projectile” instead of your “MyAwesomeProjectile” you will need to cast the reference to your type first. Just drag out the reference and pick “Cast as MyAwesomeProjectile” then you can follow the example above.