World rotation acting as local

Trying to get my moon to rotate around the world but it’s just rotating in place. The local rotation works fine but the world rotation is still rotating the bp around it’s own axis not the world one.

Code

Any help appreciated.
Thanc

You can’t increment “delta seconds”. You need an actual float variable there. This would give you the exact same number (depending on frame rate) each time, delta seconds + 1.

Without playing around with it I can’t explain your results off the top of my head. But I can tell you, “increment” adds 1 and “sets” a variable. You aren’t setting a variable so it always gives the same value.

But it’s “add” So shouldn’t that just be added to it every time?

And it is incrementing it. It’s just rotating along the wrong axis and the local rotation is set up the exact same way and working fine.

It’s a component of the bp

Is the moon on a different blueprint or are they on the same blueprint?

You are rotating the moon in both spaces but the thing is they are both using the pivot point of the moon to rotate, so they are the same. You need to set the moon as the child of a scene component or another actor(like earth) and rotate that parent instead.

Here when you rotate the moon in local space it will revolve around itself, when you rotate the actor itself(or the scene component the moon is the child of) the moon will revolve around the earth, considering the earth is where the scene component is.

Where is the child located at relative to the parent though? Can you post a screenshot of your BP please?

It is a child of the default scene root though. If I rotate the parent or child they only rotate around its own axis not the world one.

just a thought… if you’d like to ignore the parent and use World Rotation on a Scene Component, you might consider using the Set Absolute node (can be applied on Child Components to Location, Rotation and Scale)

How would I use that? Cause I don’t think set absolute is what I need, I want the rotation to keep happening so an “add” world rotation node sis what I’m trying.

no… as I understand it… the Set Rotation node is specifically used to allow components to override inherited rotations using world rotation… if youd like to use Word Rotation… to get your rotating effect, I’d use it once in BeginPlay and combine it with Add World Rotation on Tick

That’s not what i had asked but anyway… Here is an example project for you: Muun.rar - Google Drive

Literally asked to see the bp, there it is.