Need help with rotating actor

Hi Shedels

It should be pretty simple to implement.

  1. Add a scene component to the bot and position it to be at the center of the bots back

  2. Add three-sphere components (or mesh components) as children to the scene component you previously created

  3. Move the position of each sphere so they look roughly like the shape you showed.

  4. Add some logic to rotate the scene component to created in step one on the appropriate axis (probably yaw).

Now all the spheres will move with the bot (as they are apart of the actor. When the you rotate the scene component all the spheres will rotate keeping the set relative distance.

Hope this helps.

Alex

Hey a can’t solve a problem
One of my bot’s must have 3 sphere’s on his back. It moving with hin and rotating like on the picture.
Can you give an example of code, because i have no idea now.

thanks! but i’m in trouble with this rotation logic(
I haven’t idea about rotation around point. Maybe i should use rotation movement component?

It depends, if its continuous then a rotation component should suffice. Add it as a child to the scene component.

If you want more controlled rotation logic you can use a timeline to start, stop, pause and loop.

It depends, if its continuous then a
rotation component should suffice. Add
it as a child to the scene component.

One can’t have a Rotating Movement Component as a child of another Scene Component per se, these affect root only - that’s unless I misunderstood the intentions here. But this definitely one way to do it:

  • an actor with the spheres and a Rotating Movement Component:

  • the target entity hosts a Child Actor Component with Absolute Rotation

Image from Gyazo

Now any actor can have the orbiters as a child component. This will also allow you to handle any relevant code independently - adding / removing spheres, their effects and even inheritance further down the line if things ever get complex.

One can’t have a Rotating Movement
Component as a child of another Scene
Component per se, these affect root
only - that’s unless I misunderstood
the intentions here. But this
definitely one way to do it:

Whoops, nope not a misunderstanding, that was a mistake on my part. I have only used the rotating component twice in my UE4 career ha! I believed it just affected the parent it was attached to. However, now I recall I have used a workaround by attaching it to an arbitrary actor in the scene and then combining the rotators with the target component.

Thanks for pointing that out :slight_smile: