An open source Danmaku development kit for Unity3D.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix #32: Correct circle creation logic

authored by

James Liu and committed by
GitHub
58018431 46ab51de

+3 -2
+3 -2
Assets/DanmakU/Runtime/Fireables/Shapes/Circle.cs
··· 20 20 float radius = Radius.GetValue(); 21 21 int count = Mathf.RoundToInt(Count.GetValue()); 22 22 var rotation = state.Rotation.GetValue(); 23 + var origin = state.Position; 24 + state.Rotation = rotation; 23 25 for (int i = 0; i < count; i++) { 24 26 var angle = rotation + i * (Mathf.PI * 2 / count); 25 - state.Position = state.Position + (radius * RotationUtiliity.ToUnitVector(angle)); 26 - state.Rotation = rotation; 27 + state.Position = origin + (radius * RotationUtiliity.ToUnitVector(angle)); 27 28 Subfire(state); 28 29 } 29 30 }