Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/web/js/kaiopua/core/Character.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,6 @@
rotate = movement.rotate,
rotateFacingDirection = rotate.facingDirection,
forwardBack;

// handle state property

if ( state.hasOwnProperty( propertyName ) ) {
Expand Down Expand Up @@ -715,7 +714,7 @@
state.moving = false;

}

// update movement

moveDir.z = state.movingHorizontal ? 1 : 0;
Expand All @@ -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 ) {
Expand All @@ -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 );
Expand Down Expand Up @@ -1000,4 +1001,4 @@

}

} ( KAIOPUA ) );
} ( KAIOPUA ) );
4 changes: 2 additions & 2 deletions src/web/js/kaiopua/sections/Launcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -355,4 +355,4 @@

}

} ( KAIOPUA ) );
} ( KAIOPUA ) );