You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -417,14 +417,14 @@ var ArcadePhysics = new Class({
417
417
},
418
418
419
419
/**
420
-
* Given the angle (in degrees) and speed calculate the velocity and return it as a Point object, or set it to the given point object.
421
-
* One way to use this is: velocityFromAngle(angle, 200, sprite.velocity) which will set the values directly to the sprites velocity and not create a new Point object.
420
+
* Given the angle (in degrees) and speed calculate the velocity and return it as a vector, or set it to the given vector object.
421
+
* One way to use this is: velocityFromAngle(angle, 200, sprite.body.velocity) which will set the values directly to the sprite's velocity and not create a new vector object.
* @param {number} angle - The angle in degrees calculated in clockwise positive direction (down = 90 degrees positive, right = 0 degrees positive, up = 90 degrees negative)
427
-
* @param {number} [speed=60] - The speed it will move, in pixels per second sq.
427
+
* @param {number} [speed=60] - The speed it will move, in pixels per second squared.
428
428
* @param {Phaser.Math.Vector2} [vec2] - The Vector2 in which the x and y properties will be set to the calculated velocity.
429
429
*
430
430
* @return {Phaser.Math.Vector2} The Vector2 that stores the velocity.
@@ -438,14 +438,14 @@ var ArcadePhysics = new Class({
438
438
},
439
439
440
440
/**
441
-
* Given the rotation (in radians) and speed calculate the velocity and return it as a Point object, or set it to the given point object.
442
-
* One way to use this is: velocityFromRotation(rotation, 200, sprite.velocity) which will set the values directly to the sprites velocity and not create a new Point object.
441
+
* Given the rotation (in radians) and speed calculate the velocity and return it as a vector, or set it to the given vector object.
442
+
* One way to use this is: velocityFromRotation(rotation, 200, sprite.body.velocity) which will set the values directly to the sprite's velocity and not create a new vector object.
0 commit comments