Hello there,
Everything is working as intended so far However, there are a few things that I would like to add to this.
I would like the speed boost to go away after some time has passed as I would not want the car to go fast indefinitely. The speed boost should also overwrite any slows during its active time. How can I achieve this?
I do not wish to slow the car at every collision as the level may at times be crowded with objects and constantly being slowed would be frustrating. Particularly because colliding with something is inevitable. Instead, I would like to make the movement speed slower on places that are not roads.
For this I created a Road tag and assigned it to the parent object that all roads were under. Then I did the following:
if(other.tag != “Road”)
{
moveSpeed = slowSpeed;
}
This caused the car to slow down when hitting something that is not a road. It also caused a slow down when hitting packages. How can I include multiple tags in this statement? How can I get the speed back to normal when the car gets back on the road? I assume there ought to be a good old else statement here somewhere that ends with moveSpeed = moveSpeed or something like that
Thanks for your help