Maintaining Constant Speed for Spiral Bee Projectiles

Hello everyone,

I’m working on creating a queen bee boss fight in Unreal Engine 5. One of the boss’s attacks involves spawning small bees that move in a spiral pattern around her. I found a helpful solution from SVasilev in this post, which allowed me to set up the spiral motion for the bee projectiles.

The bee projectiles are child components, and they start spinning in a spiral when they spawn. However, I’m facing an issue where the bees’ speed increases as they move further away from the boss. I want the bees to maintain a constant speed throughout their lifespan.

I’ve tried numerous solutions, including experimenting with various settings and parameters (also I tried using GPT for suggestions, but that didn’t help much). Despite my efforts, I can’t seem to achieve the desired constant speed for the projectiles.

Here is the blueprint I’m using: Blueprint Link.

Additionally, here’s a video showing the current behavior of the bees:

As you can see, the bees move faster as they get further away from the boss, instead of keeping a constant speed.

Can anyone provide some guidance or suggestions on how to fix this issue? Any help would be greatly appreciated!

Thanks in advance!

Bump.

No one knows how to maintain a constant speed for a spiral projectile? :frowning:

Isn’t this just:

As the radius increases, speed (angular velocity, really) must decrease accordingly.
Your script does not seem to modify Spiral Speed. Set it here:

Massage the value as needed, judging by the Bee Size you’ll need 50k or thereabout.

1 Like

You can use the archimedean Spiral to calculate this

Though after some testing I may be off with the speed calculation. You would probably need to recalculate the incoming time by a value

OK Got it closer to what I first envisioned it would look like

init

spiral

2 Likes

Thank you so much for your time guys!

As the radius increases, speed (angular velocity, really) must decrease accordingly.

I tried the method you suggested, but now the bees are moving really slowly and they don’t form a spiral anymore; instead, they move in a straight line. After trying a few times, I gave up (maybe I did something wrong, I don’t know). :frowning:

You can use the archimedean Spiral to calculate this

Omg you are awesome, thanks for all the examples!
I pasted the logic you made but for some reason it seems that it always starts slow and then moves faster (even when I change the speed).

But what I noticed is that when I used the Add Offset node because I wanted to move the entire actor, you used the Set Relative Location, and using Add Offset seems to increase the speed in both code snippets (I don’t know, maybe it’s just my impression).

What I want to try is using this information I just learned(the Set Relative Location node) to move the component manually outwards while rotating around the actor root - that might work as a workaround. I’ll keep you guys updated.

The division is set the wrong way around:

image

vs

image

1 Like

Oops, you are right! Unfortunately, even after playing with the values, I still cannot achieve a constant speed as desired. :cry:

Bee uses double team!

At the end of the day, this is what I did to overcome the problem.

Essentially, I rotate the root and move the mesh outwards.

The code is not very elegant or pleasant, but it gets the job done. :slight_smile:

(The bee facing outwards is now a feature, not a bug😂)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.