S.A.P.S V0.4.0
A virtual reality stealth action game
 
Loading...
Searching...
No Matches
CharacterModel.Feature Class Reference

An object that is on (or worn by) a character body. More...

Classes

struct  PlacementRange
 Sets the boundaries within which a feature's PlacementSetting is allowed to exist. Also includes default values. More...
 
struct  PlacementSetting
 angle in radians, clockwise, around the body.height fraction (from 0 to 1) between base of the body and the topmirroring when mirroring, a clone of the feature is placed at the inverted angleprotruding when protruding, the local Y direction will point directly away from the surface of the body (works great for hats)Note: mirroring and protruding do not mix!! (mirrored object does not protrude) More...
 

Public Member Functions

 Feature (CharacterModel model, GameObject featurePrefab, PlacementSetting placement)
 Constructs a new feature on a given character model, based on angle and height.
 
void DestroyFeatureObject ()
 Destroys the GameObject attached to this feature.
 
void SetPositionFromPlacement ()
 Converts angle and height from Feature.Placement to local position and rotation, as a child of the capsule body.
 

Properties

GameObject FeaturePrefab [get, set]
 Setting this will instantiate the prefab and destroy the previous.
 
PlacementSetting Placement [get, set]
 Sets the position and rotation of feature based on angle and height.
 

Detailed Description

An object that is on (or worn by) a character body.

Constructor & Destructor Documentation

◆ Feature()

CharacterModel.Feature.Feature ( CharacterModel model,
GameObject featurePrefab,
PlacementSetting placement )

Constructs a new feature on a given character model, based on angle and height.

Parameters
model

Member Function Documentation

◆ DestroyFeatureObject()

void CharacterModel.Feature.DestroyFeatureObject ( )

Destroys the GameObject attached to this feature.

◆ SetPositionFromPlacement()

void CharacterModel.Feature.SetPositionFromPlacement ( )

Converts angle and height from Feature.Placement to local position and rotation, as a child of the capsule body.

Property Documentation

◆ FeaturePrefab

GameObject CharacterModel.Feature.FeaturePrefab
getset

Setting this will instantiate the prefab and destroy the previous.

◆ Placement

PlacementSetting CharacterModel.Feature.Placement
getset

Sets the position and rotation of feature based on angle and height.


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