forked from Wireline-Studios/JourneyProject
Update GunThrown.cs
GUN TURN IN AIR
This commit is contained in:
@@ -26,7 +26,7 @@ public class GunThrown : MonoBehaviour
|
||||
{
|
||||
playerDistance = playerDistance * 1.2f;
|
||||
}
|
||||
if (playerDistance > 16)
|
||||
if (playerDistance > 17)
|
||||
{
|
||||
playerDistance = playerDistance / 1.4f;
|
||||
}
|
||||
@@ -41,7 +41,8 @@ public class GunThrown : MonoBehaviour
|
||||
void Update()
|
||||
{
|
||||
//transform.position = Vector3.MoveTowards(transform.position, TargetPosition, 10 * Time.deltaTime);
|
||||
|
||||
targetRotation = Quaternion.Euler (-20f, currentRotation.y, currentRotation.z);
|
||||
transform.rotation = Quaternion.RotateTowards(transform.rotation, targetRotation , -1);
|
||||
|
||||
if (transform.position == TargetPosition)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user