Flame(Flutter game) Angle of a Vector, Anchor(logical center)
taesikmun
1 min read
Table of contents
v1.angleToSigned(v2)
angleA = v1.angleToSigned(v2)
v2
^
/
/
/ angleA
---->v1
How do I rotate at a certain speed?
We use the dt
-delta time, in the update
method.
angleDelta = dt * rotationSpeed;
angle = (angle + angleDelta) % (2 * pi);
0
Subscribe to my newsletter
Read articles from taesikmun directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
taesikmun
taesikmun
Software developer in South Korea