Is this Bezier Curves?

Hello developers, I was wondering how to achieve and effect similar to this: https://gfycat.com/freeclearbuck

Like the title, I believe bezier curves are involved. I tried looking them up on the dev hub (https://developer.roblox.com/en-us/articles/Bezier-curves) but the tutorial was confusing to me. Any help would be appreciated!

2 Likes

It can be any curve.

A Bezier Curve is just a form of a cubic parametric curve. Keep in mind, you don’t “need” to even explicitly define a curve to achieve that same effect. You could simply fire a projectile in a ring, then have the projectiles simply have a force which directs them towards a center. This will give you the converging curvey effect.

I would recommend you just use a physics based approach rather than trying to explicitly define your curves, as this is a much simpler method that will yield the same/better results.

Tip: You can use RocketPropulsion | Documentation - Roblox Creator Hub to achieve a force which “curves” towards a target. However, you need to initially fire your rockets/missiles/bombs in a spread out fashion before having them close in.

2 Likes

It probably fires the projectiles with some randomized spread, and then they adjust their direction while in flight to seek the target (using lerps). Pre-calculated curves would not converge on moving targets.

A basic parabola graph would work for this. Bezier curves are typically for more complex things and would be overkill imo for something like this.

1 Like

A spring would work extremely well for this. Setting the target and the velocity. Set the velocity to the outward angle, and it will converge on the target.

1 Like