# Random point in rotated bounding box

**URL:** <https://forums.unrealengine.com/t/random-point-in-rotated-bounding-box/372740>\
**Category:** Blueprint\
**Tags:** bounding-box, unreal-engine, Blueprint, question\
**Created:** [October 7, 2016, 5:25pm UTC](https://forums.unrealengine.com/t/random-point-in-rotated-bounding-box/372740 "2016-10-07T17:25:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_bcb29c4f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_bcb29c4f](https://forums.unrealengine.com/u/anonymous_user_bcb29c4f)\
**Post date:** [October 7, 2016, 5:25pm UTC](https://forums.unrealengine.com/t/random-point-in-rotated-bounding-box/372740/1 "2016-10-07T17:25:23Z")

</div>

I’ve rotated a bounding box (which represents a descent from a hill in my game). Now i want to spawn a tree in the random point inside that box. But if i use the “Random point in bounding box” function, tree spawns in the air above the hill, or below the hill (it’s acting like i didn’t rotate the box). I think it’s a pretty stupid basic question, by I didn’t find an answer anywhere.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_4030fea0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4030fea0](https://forums.unrealengine.com/u/anonymous_user_4030fea0)\
**Post date:** [October 8, 2016, 12:32pm UTC](https://forums.unrealengine.com/t/random-point-in-rotated-bounding-box/372740/2 "2016-10-08T12:32:28Z")

</div>

Grab the random point you get and adjust the Z axis until it’s on the ground.  
Alternately you can use Random Point in Navigable Radius. That’s always going to be on the ground
