Inventory Engine v4.2
Loading...
Searching...
No Matches
MoreMountains.Tools.MMSpawnAround Class Reference

This static class is a spawn helper, useful to randomize position, rotation and scale when you need to instantiate objects. More...

Static Public Member Functions

static void ApplySpawnAroundProperties (GameObject instantiatedObj, MMSpawnAroundProperties props, Vector3 origin)
static Vector3 SpawnAroundPosition (MMSpawnAroundProperties props, Vector3 origin)
 Returns the position at which the object should spawn.
static Vector3 PickPositionInsideCube (MMSpawnAroundProperties props)
static Vector3 SpawnAroundScale (MMSpawnAroundProperties props)
 Returns the scale at which the object should spawn.
static Quaternion SpawnAroundRotation (MMSpawnAroundProperties props)
 Returns the rotation at which the object should spawn.
static void DrawGizmos (MMSpawnAroundProperties props, Vector3 origin, int quantity, float size, Color gizmosColor)
 Draws gizmos to show the shape of the spawn area.

Detailed Description

This static class is a spawn helper, useful to randomize position, rotation and scale when you need to instantiate objects.

Member Function Documentation

◆ ApplySpawnAroundProperties()

void MoreMountains.Tools.MMSpawnAround.ApplySpawnAroundProperties ( GameObject instantiatedObj,
MMSpawnAroundProperties props,
Vector3 origin )
static

◆ DrawGizmos()

void MoreMountains.Tools.MMSpawnAround.DrawGizmos ( MMSpawnAroundProperties props,
Vector3 origin,
int quantity,
float size,
Color gizmosColor )
static

Draws gizmos to show the shape of the spawn area.

Parameters
props
origin
quantity
size

◆ PickPositionInsideCube()

Vector3 MoreMountains.Tools.MMSpawnAround.PickPositionInsideCube ( MMSpawnAroundProperties props)
static

◆ SpawnAroundPosition()

Vector3 MoreMountains.Tools.MMSpawnAround.SpawnAroundPosition ( MMSpawnAroundProperties props,
Vector3 origin )
static

Returns the position at which the object should spawn.

Parameters
props
origin
Returns

◆ SpawnAroundRotation()

Quaternion MoreMountains.Tools.MMSpawnAround.SpawnAroundRotation ( MMSpawnAroundProperties props)
static

Returns the rotation at which the object should spawn.

Parameters
props
Returns

◆ SpawnAroundScale()

Vector3 MoreMountains.Tools.MMSpawnAround.SpawnAroundScale ( MMSpawnAroundProperties props)
static

Returns the scale at which the object should spawn.

Parameters
props
Returns

The documentation for this class was generated from the following file: