public void SetParachuteTarget(FlightStatistics target, Parachute parachute) { _target = target; _targetType = AvatarType.Parachute; _parachuteConfig.MinOrbitDistance = UnityParachuteFactory.OrbitDistance(parachute); _transitionStartTime = _clock.CurrentTime; }
void CreateEditorChute(ParachuteConfig config, ImmutableTransform transform) { if (_editorParachute != null) { _editorParachute.DetachPilot(); GameObject.Destroy(_editorParachute.Root.gameObject); } _editorParachute = _data.EditorSpawner.Create(config, transform, "EditorParachute"); _environment.Pilot.SetKinematic(); _environment.Pilot.OnDespawn(); _environment.Pilot.transform.position = transform.Position; _environment.Pilot.transform.rotation = transform.Rotation; _environment.Pilot.OnSpawn(); _environment.Pilot.SetKinematic(); _editorParachute.AttachToPilot(_environment.Pilot, Parachute.DefaultUnfoldOrientation, _data.GameSettingsProvider); UnityParachuteFactory.SetKinematic(_editorParachute); _data.EditorCamera.SetTarget(_editorParachute); _editorParachuteChanges.OnNext(_editorParachute); }