Skip to content

Commit

Permalink
fix push force_along having wrong velocity
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Mar 3, 2021
1 parent cc11b7a commit e7ae5f8
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -242,7 +242,7 @@ public void run() {
Vector v1 = lastEntity.getLocation().toVector();
Vector v3 = v2.clone().subtract(v1).normalize();
if (forceAlong) {
Vector newDest = v2.clone().subtract(Origin).normalize().multiply(runs * speed / 20).add(Origin);
Vector newDest = v2.clone().subtract(Origin).normalize().multiply(runs * speed).add(Origin);
lastEntity.teleport(new Location(lastEntity.getLocation().getWorld(),
newDest.getX(), newDest.getY(), newDest.getZ(),
lastEntity.getLocation().getYaw(), lastEntity.getLocation().getPitch()));
Expand Down

0 comments on commit e7ae5f8

Please sign in to comment.