angle to vector2 code example Example: angle to vector2 var direction = Vector2(cos(angle), sin(angle))