epic camera fixes

This commit is contained in:
Rapandrasmus 2023-10-04 20:56:12 +02:00
parent 64ca806055
commit 1b55d071fb
2 changed files with 4 additions and 2 deletions

View file

@ -302,7 +302,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
_fullRotRange: 160
_spawnOffset: 10.408
_spawnOffset: 2.6
_holdLength: 4
_ease: 4
_rotateRoot: {fileID: 4208995891253938729}

View file

@ -120,6 +120,7 @@ namespace HeavenStudio.Games
private int _animalCameraIndex = 0;
private float _lastCameraX = 0;
private double _cameraHoldTime = 1;
private bool _lastCameraAnimalWasGiraffe = false;
private void CameraUpdate(Conductor cond)
{
@ -127,7 +128,7 @@ namespace HeavenStudio.Games
var currentAnimal = _queuedAnimals[_animalCameraIndex];
float distance = (_animalCameraIndex == 0) ? _jumpStartCameraDistance : _jumpDistance;
float distance = (_animalCameraIndex == 0) ? _jumpStartCameraDistance : (_lastCameraAnimalWasGiraffe ? _jumpDistanceGiraffe : _jumpDistance);
float normalizedHold = cond.GetPositionFromBeat(currentAnimal.startBeat, currentAnimal.GetHoldLengthFromType());
@ -161,6 +162,7 @@ namespace HeavenStudio.Games
_cameraHoldTime = (currentAnimal.type == AnimalType.Giraffe) ? 4 : 2;
_lastCameraX += distance + currentAnimal.rotationDistance;
_animalCameraIndex++;
_lastCameraAnimalWasGiraffe = currentAnimal.type == AnimalType.Giraffe;
}
private void AnimalPoolUpdate(Conductor cond)