mirror of
https://github.com/DerTyp7/defrain-shooter-unity.git
synced 2025-10-29 20:52:10 +01:00
Little fix on player, added trigger collider on usp
@juliuse98 needs to fix when looking up the weapon gets to far away an the hands look strange. Tried to fix it a bit. Its no a little better but NOT completely fixed. USP has now a collider that is a trigger. When the weapon is clipping through the wall (befor that the collider should trigger and the player puts the weapon upright) ITS NOT WORKING but the structure is there... (All collider gets disabled when you pick up a weapon)
This commit is contained in:
@@ -259,6 +259,8 @@ public class ProcedualAnimationController : NetworkBehaviour
|
||||
{
|
||||
if (positionMod[i] != null)
|
||||
totalPosition += positionMod[i];
|
||||
//if (i == 3)
|
||||
//Debug.Log(positionMod[i]);
|
||||
}
|
||||
|
||||
/*-----Apply Gun Rotation-----*/
|
||||
@@ -302,18 +304,21 @@ public class ProcedualAnimationController : NetworkBehaviour
|
||||
aimVal = gravityValue(aimVal, aimSpeed, 1, 0, isAiming);
|
||||
positionMod[2] = Vector3.Lerp(HoldPoint.transform.localPosition, AimPoint.transform.localPosition, Mathf.Pow(aimVal, 1.3f));
|
||||
}
|
||||
|
||||
public void weaponToCloseToWall(bool state) {
|
||||
int lineNumber = (new System.Diagnostics.StackFrame(0, true)).GetFileLineNumber(); // Only for debugging
|
||||
//Debug.Log("PAC.cs (function at line:" + (lineNumber-1) + "): Weapon is to close to wall: Weapon should get upright or to normal position now depending on state!");
|
||||
}
|
||||
public void changePistole(bool isSwitching) { // Moves hands doooown ;) and up again NOT WORKING
|
||||
//aimVal = gravityValue(aimVal, aimSpeed, 1, 0, isSwitching);
|
||||
Vector3 b = new Vector3(HoldPoint.transform.localPosition.x, 1, HoldPoint.transform.localPosition.z);
|
||||
//Debug.Log("HALLO: " + positionMod[3]);
|
||||
//Debug.Log("PositionMod[3]: " + positionMod[3]);
|
||||
positionMod[3] = Vector3.Lerp(HoldPoint.transform.localPosition, b, 0.5f);
|
||||
//Debug.Log("HALLO: " + positionMod[3]);
|
||||
//Debug.Log("PositionMod[3]: " + positionMod[3]);
|
||||
}
|
||||
public void changeRifle(bool isSwitching) { // Moves hands up and doooown again ;)
|
||||
//aimVal = gravityValue(aimVal, aimSpeed, 1, 0, isSwitching);
|
||||
Vector3 b = new Vector3(HoldPoint.transform.localPosition.x, HoldPoint.transform.localPosition.y + 1, HoldPoint.transform.localPosition.z);
|
||||
positionMod[3] = Vector3.Lerp(HoldPoint.transform.localPosition, b, 0);
|
||||
//Vector3 b = new Vector3(HoldPoint.transform.localPosition.x, HoldPoint.transform.localPosition.y + 1, HoldPoint.transform.localPosition.z);
|
||||
//positionMod[3] = Vector3.Lerp(HoldPoint.transform.localPosition, b, 0);
|
||||
//Debug.Log("HALLO2");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user