I am trying to mak a small Hexagon strategy game but I have a problem.
I am using the 2d sidescroller setup and created a widget where when you clicked on a button the sprite of the 2D Object should change.
But I have no clue how to cast to an object. I tried it but I failed.
I hope you guys could help me somehow.
Maybe I have somthing wrong with the GameMode or Player character because I use the 2D Sidescroller Setup, but I have no idea.
In order to cast to something you need an Object to cast from. Your Object input is empty, that won’t work. What is P1? Your player class? Then use the Get Player Pawn (or Get Player Character) node and feed the output into to Object input of Cast to P1 node. In that way you should be able to work with it.