Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: ShazBang on June 02, 2016, 03:52:39 AM

Title: Off track timer
Post by: ShazBang on June 02, 2016, 03:52:39 AM
Hey, making a simple racing game for a project and I'm having some trouble adding a timer that counts down whenever the player's car leaves the track... once the timer hits zero then the player loses the game and has to restart.

How should I go about checking that the player has left the track? I've tried using triggers but they take a very long time to set up and my track is huge! I'm using EasyRoads3D for the track by the way. I have some ideas on doing the timer but I mainly need help the player leaving the track

Thanks
Title: Re: Off track timer
Post by: ShazBang on June 02, 2016, 03:56:03 AM
I've found that the EasyRoads road object has a collider built into it, but it isn't able to be a trigger unless I make the collider convex, which screws the road up completely... is there another way to create a trigger on the road object?
Title: Re: Off track timer
Post by: 600 on June 02, 2016, 04:00:56 AM
Hello,
you could check ground layer for the road so if it's offroad for x seconds, it counts as off track.
Check it with grounded if wheel colliders or raycast from the car, like every second or so.
Title: Re: Off track timer
Post by: djaydino on June 02, 2016, 05:04:34 AM
Hi,
Maybe you can duplicate the collider and make that as trigger?