I am trying to make a coin (just a black cylinder) disappear, change to a new random location within a specific area, and reappear every time I press the right mouse button. My level blueprint successfully makes the coin disappear, change location, and reappear when I click the right mouse key, but it often appears at locations outside of my quadrant 1 box that I want it to stay within. Does anyone know what I might have done wrong in my code to allow the coin to appear anywhere outside of the box that I want it to stay within?
You are adding the random numbers to your actor’s world location, but you have to add those random numbers to the quadrant origin. Your new location mustn’t depend on your previous location, but only on the quadrant’s origin and bounds. Something like this:
Ah, I see. That did the trick perfectly! Thank you!
Glad I could be of help!