Skip to content

Commit

Permalink
Fixed issue of player being able to walk tbrough monsters
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaozs committed Aug 17, 2019
1 parent ea6edcc commit 9d4651c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 3 additions & 3 deletions TPK/Assets/Resources/Player Avatars/Player.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -2729,13 +2729,13 @@ Rigidbody:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1389239392925404}
serializedVersion: 2
m_Mass: 1000
m_Mass: 100
m_Drag: 0
m_AngularDrag: 0.5
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 112
m_Constraints: 116
m_CollisionDetection: 0
--- !u!81 &81270934823258956
AudioListener:
Expand Down Expand Up @@ -3365,7 +3365,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_TransformSyncMode: 3
m_SendInterval: 0.04761905
m_SyncRotationAxis: 2
m_SyncRotationAxis: 7
m_RotationSyncCompression: 0
m_SyncSpin: 0
m_MovementTheshold: 0.001
Expand Down
5 changes: 1 addition & 4 deletions TPK/Assets/Scripts/Hero/HeroController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,7 @@ void Update()
bool leftPressed = unityService.GetKey(CustomKeyBinding.GetLeftKey());
bool rightPressed = unityService.GetKey(CustomKeyBinding.GetRightKey());
tempVelocity = heroModel.GetCharacterMovement().Calculate(forwardPressed, backPressed, leftPressed, rightPressed);
if(heroRigidbody.velocity.y > 0)
tempVelocity.y = 0;
else
tempVelocity.y = heroRigidbody.velocity.y;
tempVelocity.y = heroRigidbody.velocity.y;
heroRigidbody.velocity = tempVelocity;
PerformRotation();

Expand Down

0 comments on commit 9d4651c

Please sign in to comment.