Fix straight axes being backwards

This commit is contained in:
RedEnchilada 2016-05-11 23:00:15 -05:00
parent 8d01711da1
commit 7cecaa901b
2 changed files with 5 additions and 5 deletions

View file

@ -34,7 +34,7 @@ LevelDatabase["Test Level"] = {
{
x: 1280, y: 768,
radius: 0,
angle: 270,
angle: 90,
length: 512,
left: [1],
@ -52,7 +52,7 @@ LevelDatabase["Test Level"] = {
{
x: 1024, y: 1280,
radius: 0,
angle: 90,
angle: 270,
length: 512,
left: [3],
@ -125,7 +125,7 @@ LevelDatabase["Intro"] = {
"x": 11744,
"y": 11744,
"radius": 0,
"angle": 90,
"angle": 270,
"length": 8192,
"left": [
1
@ -151,7 +151,7 @@ LevelDatabase["Intro"] = {
"x": 10720,
"y": 2528,
"radius": 0,
"angle": 0,
"angle": 180,
"length": 8192,
"left": [
1

View file

@ -249,7 +249,7 @@ Dolphin = function(level, axis, position, z) {
dolphin.position.x += Math.cos(dolphin.angle) * axis.radius;
dolphin.position.y += Math.sin(dolphin.angle) * axis.radius;
} else {
dolphin.angle = (axis.angle + 90) * Math.PI / 180;
dolphin.angle = (axis.angle - 90) * Math.PI / 180;
dolphin.position.x -= Math.sin(dolphin.angle) * dolphin.axis.position;
dolphin.position.y += Math.cos(dolphin.angle) * dolphin.axis.position;
}