Fix start scene Player Height

This commit is contained in:
r.nikolin 2023-10-30 11:47:51 +03:00
parent 748a2af8a1
commit 1384fbaace
3 changed files with 204 additions and 202 deletions

View File

@ -27,7 +27,7 @@ namespace BNG {
private float _initialOffset = 0; private float _initialOffset = 0;
void Start() { private IEnumerator Start() {
if(CalibrateHeightAction != null) { if(CalibrateHeightAction != null) {
CalibrateHeightAction.Enable(); CalibrateHeightAction.Enable();
@ -38,6 +38,8 @@ namespace BNG {
PlayerController = GetComponentInChildren<BNGPlayerController>(); PlayerController = GetComponentInChildren<BNGPlayerController>();
} }
yield return new WaitForSeconds(1);
if(CalibrateOnStart) { if(CalibrateOnStart) {
StartCoroutine(setupInitialOffset()); StartCoroutine(setupInitialOffset());
} }

View File

@ -23314,7 +23314,7 @@ PrefabInstance:
- target: {fileID: 148239936597742439, guid: 9069c86c178f3fa4eaf02c85a5a52483, - target: {fileID: 148239936597742439, guid: 9069c86c178f3fa4eaf02c85a5a52483,
type: 3} type: 3}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: -0.000030517578 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 331558439186688178, guid: 9069c86c178f3fa4eaf02c85a5a52483, - target: {fileID: 331558439186688178, guid: 9069c86c178f3fa4eaf02c85a5a52483,
type: 3} type: 3}
@ -23339,7 +23339,7 @@ PrefabInstance:
- target: {fileID: 1095097892851625415, guid: 9069c86c178f3fa4eaf02c85a5a52483, - target: {fileID: 1095097892851625415, guid: 9069c86c178f3fa4eaf02c85a5a52483,
type: 3} type: 3}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: -0.000030517578 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1367119015998025816, guid: 9069c86c178f3fa4eaf02c85a5a52483, - target: {fileID: 1367119015998025816, guid: 9069c86c178f3fa4eaf02c85a5a52483,
type: 3} type: 3}

File diff suppressed because one or more lines are too long