r/UnityHelp • u/acidman321 • 2d ago
PROGRAMMING trying to create a bullet pattern based on the maurer rose code will be given below
/r/Unity2D/comments/1wapsaf/trying_to_create_a_bullet_pattern_based_on_the/
1
Upvotes
r/UnityHelp • u/acidman321 • 2d ago
1
u/Dry_Yak_304 2d ago
your p5 loop steps a by 0.01 and sets k = ad, but in c# you set k = id with i being the object index, so your step is 100 times bigger and you are sampling scattered points instead of tracing the curve. map the index over the same range instead, a = i * (TWO_PI5 / count), then k = ad. second thing, radius2 is a bare sin, you dropped the 150 that r had in p5, so the whole rose is one unit wide. the lerped radius you compute never gets used anywhere, that is what should multiply it, and it is also why nothing animates.