diff --git a/src/web/js/kaiopua/core/Character.js b/src/web/js/kaiopua/core/Character.js index 22b34607..c91b9cba 100644 --- a/src/web/js/kaiopua/core/Character.js +++ b/src/web/js/kaiopua/core/Character.js @@ -518,7 +518,6 @@ rotate = movement.rotate, rotateFacingDirection = rotate.facingDirection, forwardBack; - // handle state property if ( state.hasOwnProperty( propertyName ) ) { @@ -715,7 +714,7 @@ state.moving = false; } - + // update movement moveDir.z = state.movingHorizontal ? 1 : 0; @@ -724,7 +723,6 @@ rotateTurnAngleDelta = ( state.right === 1 ? -state.right : state.left ) * rotate.turnSpeed; rotateFacingAngleDelta = _VectorHelper.signed_angle_between_coplanar_vectors( rotateFacingDirectionLast, rotateFacingDirection, rotateAxis ) * rotateLerpDelta; - // if moving if ( state.movingHorizontal === true ) { @@ -747,7 +745,10 @@ // rotate by direction angle change if ( rotateFacingAngleDelta !== 0 ) { - + + //maybe need to convert to degrees.. + rotateFacingAngleDelta = rotateFacingAngleDelta * Math.PI /180; + rotateFacingAngleTarget = _MathHelper.degree_between_180( rotate.facingAngle + rotateFacingAngleDelta ); rotateFacingAngleDeltaShortest = _MathHelper.shortest_rotation_between_angles( rotate.facingAngle, rotateFacingAngleTarget ); rotateDelta.setFromAxisAngle( rotateAxis, rotateFacingAngleDeltaShortest ); @@ -1000,4 +1001,4 @@ } -} ( KAIOPUA ) ); \ No newline at end of file +} ( KAIOPUA ) ); diff --git a/src/web/js/kaiopua/sections/Launcher.js b/src/web/js/kaiopua/sections/Launcher.js index 4d9b3e4a..9fee6054 100644 --- a/src/web/js/kaiopua/sections/Launcher.js +++ b/src/web/js/kaiopua/sections/Launcher.js @@ -64,7 +64,7 @@ "js/kaiopua/env/Skybox.js", "js/kaiopua/env/Water.js", "js/kaiopua/utils/ObjectHelper.js", - { path: shared.pathToAsset + "hero.js", type: 'model' }, + { path: shared.pathToAsset + "Hero.js", type: 'model' }, shared.pathToAsset + "skybox_world_posx.jpg", shared.pathToAsset + "skybox_world_negx.jpg", shared.pathToAsset + "skybox_world_posy.jpg", @@ -355,4 +355,4 @@ } -} ( KAIOPUA ) ); \ No newline at end of file +} ( KAIOPUA ) );