Trying to comunicate bp so i can rotate and actor

So i would like to make a cube actor rotate when i press the f key, im using the first person template and this is what i thought of.


Now i dont know if the code for rotating is right because i cat test it until i figure out hot to make the cast to work, i have still yet to know how these cast thing work so any help would be perfect.

Hey man - I sent pics for a more simple setup & also less expensive as it does not require an event tick. Also, your cast in your first pic requires an object input. But try this setup as well…

Ok so i don’t know if im just being dumb or im missing somthing…but it doesn’t let me call the Rotate box unless i cast to rotating cube, and it doesnt let me use tha variables in the other bp, event making then public etc.

This is what i’ve got so far

No Problem I’ll walk you thru it

In your character BP, when you created the variable “Rotating Cube Ref” - initially, it is null/void/empty by default. You’ll notice in my pic btw this variable is not public (has nothing to do with it in this case)

What your missing is this - See pic 989 - Inside the Rotating Cube BP - on eventbeginplay after we cast to the character and store it’s reference… we then “SET” that character’s “Rotating Cube Ref” variable to “SELF”. When this happens successfully, that variable is no longer null/void - it becomes a “Valid Reference” & UE4 will now recognize it as the Rotating BP in the Level.

Hopefully that clarifies things for you. I assume you know how to create the custom event, etc. Let me know if your still having any problems with the setup

I got you pal - open your character BP and delete the rotating cube ref variable inside your character

Then - inside the character BP in the upper right hand corner of the screen, in the details panel - next to variable type - right click the black down arrow and type in the search bar “FtoRotate”. This is where you will create this variable

Then go to your actual FtoRotate BP and try again …and let me know

This is the error i get and cant join them,at the bottom i get the same trying to connect it to FWasPressed, and in the other blueprint it doesnt let me call the custom event i made.

Ok so solved the issue with not being able to call the event, now what do i do so i can connect the the character ref to the set rotatingCubeRef, i think your character ref is a different variable than mine?

yea my character is third person, yours is first person. Therefore your cast is to first person & your reference should be a first person character reference

Next inside FtoRotate BP, See pic 989 - branch node requires the condition F was pressed. Did you get that?

If you got a discord link, I’ll screenshare and show u

Ok finally, everything is working so thank you sooo much

perfect - u got it