ActorBP component rotation doesn't work on spawning

I’m working on a simulation of a solar collector which must rotate facing the sun position thorough the day, controlled by a UI slider.

The actor (BP_Collector) was made with some static meshes, 4 of them grouped by a scene component, which drives the rotation. This is the code for the component rotation:

Inside the widget BP, this is the code for the slider controlling the sun position and the BP_Collector component rotation:

The BP_Collector rotation works pretty well when I put it on the Level, but doesn’t work when it’s spawned. In this video you can see at the right the actor placed in the level (moving), and the other ones are spawned (still).

The BP_Collector grid was made placing individual actors inside another actor BP_Subsection, which is called by the spawner.

This is the code for the spawner:

What I’m doing wrong?

Maybe @ClockworkOcean could give me some advice? Thank you!

Hi :slight_smile:

You have to address all of the blueprints in the BP_subsection, which probably means talking to child actors, pain in the bum.

Tell me if you’re using child actors, and I’ll show you how…

Hi. Sorry for my late response.

I finally realize that I was using Get Actor of Class node, so the engine only executed the rotation change on the first actor found, and then stops looking for more actors.

I’ve changed it for the Get All Actors of Class node + a For Each Loop node. That way, the engine watch for every actor in the level and update the rotation when the slider updates the sun position.

Hope this may help someone else with the same problem.

1 Like