Show / Hide Table of Contents

Class DaggerfallStaticDoors

Stores an array of static doors. Exposes helpers to check doors in correct world space.

Inheritance
Object
Object
Component
Behaviour
MonoBehaviour
DaggerfallStaticDoors
Namespace: DaggerfallWorkshop
Assembly: Assembly-CSharp.dll
Syntax
[Serializable]
public class DaggerfallStaticDoors : MonoBehaviour

Fields

| Improve this Doc View Source

Doors

Declaration
public StaticDoor[] Doors
Field Value
Type Description
StaticDoor[]

Methods

| Improve this Doc View Source

FindClosestDoor(Vector3, StaticDoor[], out StaticDoor)

Finds closest door in any array of static doors. Owner position and rotation must be set.

Declaration
public static Vector3 FindClosestDoor(Vector3 position, StaticDoor[] doors, out StaticDoor closestDoorOut)
Parameters
Type Name Description
Vector3 position

Position to find closest door to.

StaticDoor[] doors

Door array.

StaticDoor closestDoorOut
Returns
Type Description
Vector3

Position of closest door in world space.

| Improve this Doc View Source

FindClosestDoorToPlayer(Vector3, StaticDoor[], out Vector3, out Int32)

Find closest door to player position in world space. Owner position and rotation must be set.

Declaration
public static bool FindClosestDoorToPlayer(Vector3 playerPos, StaticDoor[] doors, out Vector3 doorPosOut, out int doorIndexOut)
Parameters
Type Name Description
Vector3 playerPos

Player position in world space.

StaticDoor[] doors
Vector3 doorPosOut

Position of closest door in world space.

Int32 doorIndexOut

Door index in Doors array of closest door.

Returns
Type Description
Boolean
| Improve this Doc View Source

FindClosestDoorToPlayer(Vector3, Int32, out Vector3, out Int32, DoorTypes)

Find closest door to player position in world space.

Declaration
public bool FindClosestDoorToPlayer(Vector3 playerPos, int record, out Vector3 doorPosOut, out int doorIndexOut, DoorTypes requiredDoorType = DoorTypes.None)
Parameters
Type Name Description
Vector3 playerPos

Player position in world space.

Int32 record

Door record index.

Vector3 doorPosOut

Position of closest door in world space.

Int32 doorIndexOut

Door index in Doors array of closest door.

DoorTypes requiredDoorType
Returns
Type Description
Boolean
| Improve this Doc View Source

FindDoorsInCollections(DaggerfallStaticDoors[], DoorTypes)

Finds all doors of type across multiple door collections.

Declaration
public static StaticDoor[] FindDoorsInCollections(DaggerfallStaticDoors[] doorCollections, DoorTypes type)
Parameters
Type Name Description
DaggerfallStaticDoors[] doorCollections

Door collections.

DoorTypes type

Type of door to search for.

Returns
Type Description
StaticDoor[]

Array of matching doors.

| Improve this Doc View Source

FindLowestOutermostDoor(Int32, out Vector3, out Int32)

Find the lowest, farthest from building origin door position in world space.

Declaration
public bool FindLowestOutermostDoor(int record, out Vector3 doorPosOut, out int doorIndexOut)
Parameters
Type Name Description
Int32 record

Door record index.

Vector3 doorPosOut

Position of closest door in world space.

Int32 doorIndexOut

Door index in Doors array of closest door.

Returns
Type Description
Boolean

Whether or not we found a door

| Improve this Doc View Source

GetDoorNormal(StaticDoor)

Gets door normal in world space. Owner position and rotation must be set.

Declaration
public static Vector3 GetDoorNormal(StaticDoor door)
Parameters
Type Name Description
StaticDoor door

Door to calculate normal for.

Returns
Type Description
Vector3

Normal pointing away from door in world.

| Improve this Doc View Source

GetDoorNormal(Int32)

Gets world transformed normal of door at index.

Declaration
public Vector3 GetDoorNormal(int index)
Parameters
Type Name Description
Int32 index

Door index.

Returns
Type Description
Vector3

Normal pointing away from door in world.

| Improve this Doc View Source

GetDoorPosition(StaticDoor)

Gets door position in world space. Owner position and rotation must be set.

Declaration
public static Vector3 GetDoorPosition(StaticDoor door)
Parameters
Type Name Description
StaticDoor door
Returns
Type Description
Vector3

Door position in world space.

| Improve this Doc View Source

GetDoorPosition(Int32)

Gets door position in world space.

Declaration
public Vector3 GetDoorPosition(int index)
Parameters
Type Name Description
Int32 index

Door index.

Returns
Type Description
Vector3

Door position in world space.

| Improve this Doc View Source

GetParentRMBBlock()

Gets the first parent RMB block of this door component.

Declaration
public DaggerfallRMBBlock GetParentRMBBlock()
Returns
Type Description
DaggerfallRMBBlock
| Improve this Doc View Source

HasHit(Vector3, out StaticDoor)

Check for a door hit in world space.

Declaration
public bool HasHit(Vector3 point, out StaticDoor doorOut)
Parameters
Type Name Description
Vector3 point

Hit point from ray test in world space.

StaticDoor doorOut

StaticDoor out if hit found.

Returns
Type Description
Boolean

True if point hits a static door.

Extension Methods

MBExtensions.Invoke(MonoBehaviour, Action, Single)
MBExtensions.Invoke<T>(MonoBehaviour, Action<T>, T, Single)
MBExtensions.Invoke<T1, T2>(MonoBehaviour, Action<T1, T2>, T1, T2, Single)
MBExtensions.Invoke<T1, T2, T3>(MonoBehaviour, Action<T1, T2, T3>, T1, T2, T3, Single)
MBExtensions.Invoke<T1, T2, T3, T4>(MonoBehaviour, Action<T1, T2, T3, T4>, T1, T2, T3, T4, Single)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX