mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Finished tweaking wakes. Made marker movement smooth.
#implement #story[818]
This commit is contained in:
@@ -18,6 +18,8 @@ public abstract class RaceObject extends Group {
|
||||
protected double pixelVelocityX;
|
||||
protected double pixelVelocityY;
|
||||
|
||||
static double max = 0;
|
||||
|
||||
public Point2D getPosition () {
|
||||
return new Point2D(super.getLayoutX(), getLayoutY());
|
||||
}
|
||||
@@ -40,6 +42,13 @@ public abstract class RaceObject extends Group {
|
||||
} else {
|
||||
this.rotationalVelocity = (rotationalGoal - currentRotation) / expectedUpdateInterval;
|
||||
}
|
||||
//Sometimes the rotation is too large to be realistic. In that case just do it instantly.
|
||||
if (Math.abs(rotationalVelocity) > 1) {
|
||||
rotationalVelocity = 0;
|
||||
rotateTo(rotationalGoal);
|
||||
}
|
||||
// max = Math.max(max, Math.abs(rotationalVelocity));
|
||||
// System.out.println("max = " + max);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user