mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-26 12:35:39 +01:00
Fix Cannons, Closes #53
This commit is contained in:
parent
c629fe72e4
commit
06830f4e98
@ -17,10 +17,11 @@ public class CannonDestination implements MVDestination {
|
||||
private double speed;
|
||||
|
||||
public Vector getVelocity() {
|
||||
double x = Math.cos(location.getPitch()) * speed;
|
||||
//double y = Math.sin(location.getPitch()) * speed;
|
||||
double y = 0;
|
||||
double z = Math.sin(location.getYaw()) * speed;
|
||||
double x = Math.sin(Math.toRadians(location.getYaw())) * speed * -1;
|
||||
double y = Math.sin(Math.toRadians(location.getPitch())) * speed * -1;
|
||||
double z = Math.cos(Math.toRadians(location.getYaw())) * speed;
|
||||
x = Math.cos(Math.toRadians(location.getPitch())) * x;
|
||||
z = Math.cos(Math.toRadians(location.getPitch())) * z;
|
||||
return new Vector(x, y, z);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user