I want to add force to items inside of a chest so they pop out in front. How do I get a random direction in front of the chest?
Is your chest sideways or something?
if yes then probably this is your best bet:
randomDirection = chestGameobject.transform.forward
RandomDirection += new Vector3(randomnumber, randomnumber, randomnumber)
RandomDirection = RandomDirection.Normalize()
This should get you a unitvector that depending on the max and min values of the random numbers is in a random direction