How do I get the floating pawn movement component from another actor within my blueprint?
Im trying to manipulate the other actors acceleration within the main actor blueprint but I seem to find no way of getting the other actors floating pawn movement as target for “Set Acceleration”
Hi ExpectedYou,
The idea would be to get a reference to the pawn, and then from the pawn get the movement component to set values on.
Let us know if anything is unclear!
Tells me:
Pawn object reference is not compatible with default pawn object reference
If you’re using ‘Get Player Pawn’ node. you could try feeding that into a ‘Cast to DefaultPawn’ node.
But if you’re creating a reference variable try choosing “‘Default Pawn’ (Object Reference)” as the variable type.
(Using ‘Get Player Pawn’ is probably the cleanest implementation, no need to store a reference)
I got the default pawn reference node now but how do I connect it to the floating pawn movement?
My pawns(actors) only has floating pawn movement as movement components
It is leading me to player movement but I need floating pawn movement connections in order to manipulate accelerations unless theres another way to manipulate such things?
Hey there @ExpectedYou! With @Astrotronic’s script you’ll just do a little of this.
Hope this helps!
1 Like
So that’s a ‘Pawn Object Reference’ that you’re dragging from in that Return Value pin.
Take that Return Value and Do a ‘Cast to BP_YourPawnsName’
Then you’ll be able to get the movement component. (Or get/set other variable you’ve created)
Big picture: The ‘Pawn Object’ is the parent class, and the pawn you created is the child class (that has all the base functionality of pawns (like the ability to be possessed) + components and logic that you’ve added)
Should be smooth sailing from here.
2 Likes