Class ObjectPositioner
Moves an object next to the nearest collider. Can be used to fix bad classic game-data positions.
Implements
Namespace: DaggerfallWorkshop.Utility.AssetInjection
Assembly: Assembly-CSharp.dll
Syntax
[HelpURL("http://www.dfworkshop.net/projects/daggerfall-unity/modding/models-flats/#ObjectPositioner")]
public class ObjectPositioner : MonoBehaviour, IObjectPositioner
Fields
| Improve this Doc View SourceDirection
The direction in which the object is moved.
Declaration
[Tooltip("The direction in which the object is moved.")]
public Direction Direction
Field Value
Type | Description |
---|---|
Direction |
maxDistance
Declaration
protected const float maxDistance = 1F
Field Value
Type | Description |
---|---|
Single |
Renderer
The renderer that defines object bounds.
Declaration
[Tooltip("The renderer that defines object bounds.")]
public Renderer Renderer
Field Value
Type | Description |
---|---|
Renderer |
Properties
| Improve this Doc View SourceAllowFlatRotation
Always true because this component doesn't affect object rotation.
Declaration
public virtual bool AllowFlatRotation { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
| Improve this Doc View SourceMove(Vector3)
Moves the object next the nearest collider in the given direction or away from it if clipping.
Declaration
protected void Move(Vector3 direction)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | direction | A normalized direction in local space. |
PerformPositioning(Vector3)
Performs all positioning operations.
Declaration
protected virtual void PerformPositioning(Vector3 direction)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | direction | A normalized direction in local space. |