Turning the world by a certain degree

Hi,

I am trying to make a world for an fps game, where, on pressing a key, the whole world, every object, the walls, the decoration, tables and chairs and so on, are all turned, and after turning gravity pulls them down again - so basically creating a big mess to walk in.

Something similar is what I have in mind, then in this game:

I would like to achieve this by turning each and every actor (except the player) around a certain pivot point. I have achieved this via this solution:
(Defining a point in the world as “Origin”, then finding the distance to it. In parallel defining a variable in GameInstance to store current location and modifying this whenever the function is called. In the end set this value with the Rotate Around Pivot function, then set the transform. (I am not rotating the mesh itself, thats the next step)

This basically works, whenever I call this function, any object which is based on the BP above rotates around the pivot point, but there certainly is a better way to achieve this - similar to what is seen on the video.

Any hints or any ideas?
Thank you

Parent all the actors to an invisible actor thats located at the pivot point, then rotate the invisible actor? or am i understanding you wrong?

I think you understand it right, and I actually think that is a very good idea, did not occur to me so far.

Do you think then, in the video above his/her solution was also similar, that his pivot point was the player itself, and that is how the effect has been achieved?

For my use case this invisible parent actor (anchor point or so) can be a way easier solution.

Thanks !

1 Like

Glad it could help, please mark the thread as resolved, helps others and keeps the forum tidy!

Thanks