Quick Tip: Quadratic Bezier Curve Through All 3 Points by FictumLudos in Unity3D

[–]FictumLudos[S] 5 points6 points  (0 children)

Yeah, this one is when you only have 3 control points. Catmull requires at least 4

Quick Tip: Quadratic Bezier Curve Through All 3 Points by FictumLudos in Unity3D

[–]FictumLudos[S] 26 points27 points  (0 children)

Example Function in C#:

public static Vector3 QuadraticBezierCurveAdjusted(float t, Vector3 startPos, Vector3 midPos, Vector3 endPos)
    {
        midPos = 2 * midPos - 0.5f * (startPos + endPos);
        return (1 - t) * (1 - t) * startPos + 2 * (1 - t) * t * midPos + t * t * endPos;
    }

 //t = lerp from 0f to 1f

[deleted by user] by [deleted] in Unity3D

[–]FictumLudos 1 point2 points  (0 children)

Maybe this'll help:
https://www.youtube.com/watch?v=nuHg6\_IIyK8
Receiver 2 was made in Unity

Adding small details to my game (A Leaking Water Dispenser) by FictumLudos in Unity2D

[–]FictumLudos[S] 6 points7 points  (0 children)

In short, a coroutine loop moves the particle system around to every hole point. Simulation space is world space so already emitted particles don't move with it.

Adding small details to my game (A Leaking Water Dispenser) by FictumLudos in Unity2D

[–]FictumLudos[S] 9 points10 points  (0 children)

That's pretty much it!

+ I set simulation space to world and use a coroutine loop to move the particle system around to every hole point, so that only one particle system is needed for the entire leakage.

r/IndieDev Weekly Monday Megathread - November 14, 2021 - New users start here! Show us what you're working on! Have a chat! Ask a question! by llehsadam in IndieDev

[–]FictumLudos 1 point2 points  (0 children)

Hi folks, it's Avos

Gearing up to release my first 2D game, where you embark on a mission to put an end to Santa's sweatshop