Skip to content

Commit

Permalink
dirty fix but effectiave for worldasset spawning correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
bozmir committed Dec 19, 2024
1 parent 63e98a4 commit e8dc956
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions Assets/Scenes/Main.unity

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Assets/Scripts/KerstSpecial/RaceController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class RaceController : MonoBehaviour
private Vector3 playerMoveVector = Vector3.zero;
private Quaternion cameraStartRotation;
private bool isReadyForStart = false;
private bool isReadyToMove = false;
public static bool isReadyToMove = false;
private Layer maaiveld;
private Layer gebouwen;

Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/KerstSpecial/WorldAsset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public virtual void Start()
// Update is called once per frame
public virtual void Update()
{
if (!grounded)
if (!grounded && RaceController.isReadyToMove)
{
RaycastHit[] hits = new RaycastHit[8];
Physics.RaycastNonAlloc(startCoord.ToUnity() + Vector3.up * 100, Vector3.down, hits, 1000);
Expand Down

0 comments on commit e8dc956

Please sign in to comment.