|Volumes Of Fun
|Page 1 of 1|
|Author:||Sandidro [ Tue May 02, 2017 7:50 pm ]|
|Post subject:||Randow spawn|
Hello! In my game I want to randomly spawn monsters on map, like in Minecraft.
How to get size of volume, or its bounds? I need to choose random coordinates inside it to spawn enemies
|Author:||David Williams [ Wed May 03, 2017 7:10 am ]|
|Post subject:||Re: Randow spawn|
How to get size of volume, or its bounds?
Hi, the Volume class (and subclasses) have a 'data' member which returns the underlying VolumeData (or in your case, ColoredCubesVolumeData) object. This in turn has an 'enclosingRegion()' method you can use to get the information you need.
|Page 1 of 1||All times are UTC|
|Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group