- Home /
How to add score with no trigger
Hello! I have a game where logs go towards a player and the player jumps over them, though I'm not sure how to add score when the player does jump over them successfully. I tried adding a trigger but since the logs rotate, it is sometimes on the bottom of the log. Can anyone help? Thanks.
If the logs always come from the same direction, you can have score increment when each log's position.x (or .y, .z, as appropriate) becomes less than the player's position.x (y, z). Otherwise, you can add a capsule collider around the entire log that acts as a trigger, thus not caring about rotation. A third option is having the logs be the child of another object, have that parent object do the moving and have a trigger on it (so it doesn't rotate), and have the child log object only rotate (since its movement is taken care of by the parent object.
Your answer
Follow this Question
Related Questions
collison scoring 1 Answer
Can't click gameobject when over another trigger? 1 Answer
Translate Jump Trigger Collision Issue 1 Answer
Detecting another object collision from another object script (2D) 0 Answers
How to make a Score GUI. 0 Answers