I have just made a quick game in bolt which was originally made in c#. I have written this code to detect when the player has hit a block. If it hits a block it will stop the player movement script and call the end game event inside my game manager which i have also recreated in bolt,
public PlayerMovement movement; // A reference to our PlayerMovement script
void OnCollisionEnter(Collision collisionInfo)
{
// check if the object we collided with has a tag called "Obstacle".
if (collisionInfo.collider.tag == "Obstacle")
{
movement.enabled = false; // Disable the players movement.
FindObjectOfType<GameManager>().EndGame();
}
}
There doesnt seem to be a way to disable flow macros however, there is a way to disable flow machines but I cant seem to set the flow machine to disabled
Am I doing something wrong or is there a better way of doing this?