From 8937508dc82ea0e35b2ca3db22fb0aa0a45daa1a Mon Sep 17 00:00:00 2001 From: Neil Kollack Date: Mon, 25 Apr 2022 14:08:29 -0500 Subject: fix: WebGL grapple movement --- Assets/Prefabs/Player.prefab | 4 ++-- Assets/Scenes/Jungle.unity | 8 -------- Assets/Scripts/Actors/Actor.cs | 7 +++---- ProjectSettings/ProjectSettings.asset | 3 ++- 4 files changed, 7 insertions(+), 15 deletions(-) diff --git a/Assets/Prefabs/Player.prefab b/Assets/Prefabs/Player.prefab index d955ce6..fd46928 100644 --- a/Assets/Prefabs/Player.prefab +++ b/Assets/Prefabs/Player.prefab @@ -24,7 +24,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2776418409611166768} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.375, y: -1.5, z: 0} + m_LocalPosition: {x: -0.5, y: -1.5, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -391,7 +391,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 8892911079024906682} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0.375, y: -1.5, z: 0} + m_LocalPosition: {x: 0.5, y: -1.5, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] diff --git a/Assets/Scenes/Jungle.unity b/Assets/Scenes/Jungle.unity index 2f6721b..8537840 100644 --- a/Assets/Scenes/Jungle.unity +++ b/Assets/Scenes/Jungle.unity @@ -438568,10 +438568,6 @@ PrefabInstance: propertyPath: hearts.Array.data[2] value: objectReference: {fileID: 2019698001} - - target: {fileID: 2776418409611166769, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} - propertyPath: m_LocalPosition.x - value: -0.5 - objectReference: {fileID: 0} - target: {fileID: 2776418409999972307, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} propertyPath: m_RootOrder value: 4 @@ -438620,10 +438616,6 @@ PrefabInstance: propertyPath: m_Name value: Player objectReference: {fileID: 0} - - target: {fileID: 5336306221325820075, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} - propertyPath: m_LocalPosition.x - value: 0.5 - objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} --- !u!114 &7434619225285215647 diff --git a/Assets/Scripts/Actors/Actor.cs b/Assets/Scripts/Actors/Actor.cs index d342032..c28abd5 100644 --- a/Assets/Scripts/Actors/Actor.cs +++ b/Assets/Scripts/Actors/Actor.cs @@ -121,16 +121,15 @@ namespace MontanaJohns.Actors } public virtual void MoveY(float inputX, float inputY, float doNotExceed, float maxSpeedModifier = 0f) { - Debug.Log(inputY); if(_rigidBody.position.y <= doNotExceed) { var maxSpeed = stats.maxSpeed + maxSpeedModifier; - _rigidBody.AddForce(new Vector2(0, inputY * stats.speedMultiplier * 10)); + _rigidBody.AddForce(new Vector2(0, inputY * stats.speedMultiplier * 20)); - if (inputY < 0 && Mathf.Abs(_rigidBody.velocity.y) > maxSpeed) + /*if (inputY < 0 && Mathf.Abs(_rigidBody.velocity.y) > maxSpeed) _rigidBody.velocity = new Vector2(_rigidBody.velocity.x, -maxSpeed); else if (inputY > 0 && Mathf.Abs(_rigidBody.velocity.y) > maxSpeed) - _rigidBody.velocity = new Vector2(_rigidBody.velocity.x, maxSpeed); + _rigidBody.velocity = new Vector2(_rigidBody.velocity.x, maxSpeed);*/ } } diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index daf15cd..5dbd477 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -137,6 +137,7 @@ PlayerSettings: bundleVersion: 1.0 preloadedAssets: - {fileID: 0} + - {fileID: 0} metroInputSource: 0 wsaTransparentSwapchain: 0 m_HolographicPauseOnTrackingLoss: 1 @@ -562,7 +563,7 @@ PlayerSettings: webGLTemplate: APPLICATION:Default webGLAnalyzeBuildSize: 0 webGLUseEmbeddedResources: 0 - webGLCompressionFormat: 0 + webGLCompressionFormat: 1 webGLWasmArithmeticExceptions: 0 webGLLinkerTarget: 1 webGLThreadsSupport: 0 -- cgit v1.2.3-70-g09d2