Download

Global Variables / Accessing a Variable outside the original BP

Hey, i have just started with the UE4 and struggle to figure this one out.

1: In my Character BP i detect mouse movement and store it in a vector-variable “Mouse_Pos”.

2: In my Character BP i spawn a proectile.

  1. In the Projectile BP i want to replace the default Velocity of the projectile by using “Set Physics linear velocity”.

However i can not acces the Variable “Mouse_Pos” in the Projectile BP. **How do i get the value of that variable? ** Maybe there is a better, and completely different way to do this. Thanks for your answers.

Hello,
Or you get it from your character : “get player character” / “cast to” your character blueprint / drag a wire and type " Get Mouse_Pos" to have it.
Or you set it on spawn : Create a variable “Mouse_Pos” in your projectile blueprint. On spawn drag a wire from “return value” and type “Set Mouse_Pos” to set it with you character blueprint value.