Hey all I have a moon bp that is a physical object and i am trying to get it to orbit the level like the sun. I have it set up to constantly face the 0,0 of the level but when I orbit it in the event graph the entire thing wants to orbit with it.
Is there a way to just set a timer add a rotation to make it rise above the horizon and dip down? adding a rotation to just the moon component makes it spin in place, and doing the entire moon bp makes the glow plane and light rotate as well, despite the lock to point towards 0,0.
Add another component to the BP, a massive sphere. You can make it a collision component, but then set it to ‘no collision’, because we’re not interested in that.
Then connect your moon to the sphere ( in the top left pane, drag it onto the sphere ). Then you can rotate the sphere and the moon will go with it, but not the glow and light…
Hmm for some reason it only wants to rotate in a small circle around the collision. And nothing else is following.
I need it to orbit around an object while the glow, light and moon would still be turned towards 0,0,0. But when it is rotated it seems to ignore the construction script?
You can’t put any of the rotation in the construction script, that only gets run when you drop the actor in the level. Can you show me the structure of your BP now?..
It’s a custom event setup to increment a float with a timer.
I need a way for the moon to orbit the level’s 0,0,0 while the glow plane and light stay behind it. They can’t be children of the moon though cause I have a simple function exactly like the one above that makes it slowly rotate on it’s z-axis.
So I guess I’d need to rotate all 3 at the same time? Around the 0,0,0
Is there a way to have the sphere go to 0,0,0 without having to move the entire bp? And I don’t think that would work anyways since the construction script won’t keep the other components locked to face 0,0,0.
Logically, th esphere should go to 0,0,0, but you can position the BP and the sphere and other components in any way you want.
There sphere can go at 0,0,0 and not affect the other components, as long as they are not connected to it.
If you move the components within the BP ( drag ), you will see them move in the world. So you can actually have the BP anywhere you want, and the components also.
It’s all to do with whether or not they are connected to each other…
Well the glow plane should always be behind the moon and the light should always be infront. They aren’t conencted together as the moon needs to spin around it’s own z while rotating around the world.
So any world rotation needs to be translated to the other 2 components as well.