fix: Trajectory prediction is BACK !::

This commit is contained in:
Laureηt 2021-04-09 16:58:32 +02:00
parent 1d887cad5c
commit 59a3cfe85b
2 changed files with 6 additions and 18 deletions

View file

@ -104,13 +104,6 @@ public class Arrow extends Actor {
this.velocity.y += dt * ( this.acceleration.y + this.force.y ) / 2; this.velocity.y += dt * ( this.acceleration.y + this.force.y ) / 2;
} }
// ---------- GRAPHICAL METHODs ----------
public void render(ShapeRenderer shapeRenderer) {
// Vector2 tail = new Vector2(-this.length, 0).rotateDeg(this.getRotation()).add(this.position);
// shapeRenderer.line(this.getX(), this.getY(), tail.x, tail.y);
}
@Override @Override
public void draw(Batch batch, float parentAlpha) { public void draw(Batch batch, float parentAlpha) {
super.draw(batch, parentAlpha); super.draw(batch, parentAlpha);

View file

@ -74,18 +74,13 @@ class Bow extends Actor {
super.drawDebug(shapes); super.drawDebug(shapes);
if (pressed) { if (pressed) {
shapes.line(this.anchor, GameScreen.worldCursor); shapes.line(this.anchor, GameScreen.worldCursor);
if (aimAssist) {
float[] traj = Arrow.traj(angle, power, shooter, 400, 0.05f);
if (traj.length > 2) {
shapes.polyline(traj);
}
}
} }
} }
// void render(ShapeRenderer shapeRenderer) {
// if (pressed) {
// if (aimAssist) {
// float[] traj = Arrow.traj(angle, power, shooter, 400, 0.05f);
// if (traj.length > 2) {
// shapeRenderer.polyline(traj);
// }
// }
// }
// })
} }