Java Game Tutorial: Sprite/Object rotation
Channel:
Subscribers:
9,540
Published on ● Video Link: https://www.youtube.com/watch?v=ypFIoPaTwJQ
Here's a good vectors tutorial
http://www.mathsisfun.com/algebra/vectors.html
Note: javafx coordinate space starts at top-left, so we have to take that into account when working with Y values
Note: angle that we calculate is NOT the positive angle between bullet vector and X axis, it's negative because javafx rotate transform is applied clockwise and we want counterclockwise
Note: it is also possible to calculate the angle with atan2 as follows:
double angle = Math.toDegrees(Math.atan2(vector.y, vector.x));
Other Videos By Almas Baim (AlmasB)
2015-04-07 | JavaFX Game Tutorial 20 (FXGL - Geometry Wars Clone) |
2015-04-01 | JavaFX Game Tutorial 19 (FXGL - Flappy Bird) |
2015-03-30 | JavaFX Game Tutorial 18 (FXGL Introduction) |
2015-02-26 | JavaFX Game: Battleship |
2015-02-20 | JavaFX Game: BlackJack |
2015-02-13 | JavaFX Game Tutorial 15 P2 (MVC - FXML) |
2015-02-04 | JavaFX Game Tutorial 15 (Far Cry 4 Loading Screen) |
2015-01-27 | JavaFX Game: Platformer (part2) |
2015-01-23 | JavaFX Game: Platformer (part 1) |
2015-01-19 | JavaFX Game: Hangman |
2015-01-15 | Java Game Tutorial: Sprite/Object rotation |
2015-01-14 | Java Game Tutorial: Collision Detection |
2015-01-08 | JavaFX Game Menu: Call of Duty MW |
2015-01-07 | Java Serialization (Save/Load data) |
2015-01-05 | JavaFX Game Menu: Far Cry 4 Menu |
2014-12-15 | JavaFX Game: Pong |
2014-12-12 | JavaFX Game: Snake Classic |
2014-12-11 | Simple Java Tutorial: Dice Roll |
2014-12-08 | JavaFX Custom Game Menu: Thief |
2014-12-05 | Very simple java game tutorial for beginners 3 Part3 (Final) |
2014-12-04 | Very simple java game tutorial for beginners 3 Part2 |
Tags:
java
java programming tutorial
java game tutorial
game tutorial for beginners
java for beginners
very simple game tutorial
Java (Programming Language)
javafx tutorial
javafx transform
JavaFX (Software)
javafx game tutorial
game tutorial
sprite rotation
object rotation
javafx rotate
vectors