Hi All Guys, I’m very new to UE4 so please be patient.
I’m building a little 2d platform game.
I’m generating a Grid of actors (GRID) dynamically. All this Actors inherits from a Type that I created, that has a property called OffsetRotation. When I click on the actor (during play) the actor rotates by 90 degrees, updating OffsetRotation.
Now, if I inspect the values within the class itself, the values are set correctly (and the objects rotates perfectly).
The rotation triggers a custom event on the Grid blueprint, that cycles all the grid to do stuff… But from the references in the Grid Blueprint (I’m saving every piece of the grid inside an Array using the Array.Add mehod) the OffsetRotation has always the same value for the specific Actor I’m rotating.
The code is very messy (a lot of stuff to generate the grid) but everything is working fine on the Generation side.
Is there something I should be aware of? Why I’m not getting the right value from the Blueprint reference?
that rotates the actor and set the RotationOffset property (and after that i print it).
this method triggers an event on the blueprint that contains the Grid (first image) that calls a function that iterate recursively the elements of the grid:
when I try to print the value from there, it doesn’t change after Rotations (always the first value after the first rotation after the spawn) but the print statement inside the Rotate method of the actor prints the correct value.
Why s this happening? what I’m missing? How to fix this?