I’m creating a riding game, i will be awarding the player with 10 points when they change land and check their blind spot. how should i write my script so that i know they have check their left and right blind spot. with the use of trigger.
var camera = Camera.main;
var pointWhereThePlayerIsLookingAt = camera.transform.position + camera.transform.forward;
var anglePlayerIsLookingAt = Helpers.GetUpAxisRotateAngle(this.Player.transform, pointWhereThePlayerIsLookingAt);
if (anglePlayerIsLookingAt >= 90 && anglePlayerIsLookingAt <= 180)
{
this.Scores[RidingGameState.Score_BlindSpotTrigger] += 10;
}
Debug.Log("Sphere angle from player facing dir: " + anglePlayerIsLookingAt);