MW UNITY NAMESPACE








































public static class

Orthographic


Utilities for an Orthographic camera.



public static OrthographicRaycast

Raycast (Camera ReferenceCamera)

Summary:

Fires a ray from ReferenceCamera to mouse position.

Params:

ReferenceCamera:

        The camera to fire a ray from using ScreenPointToRay.

Returns:

OrthographicRaycast



public static Plane

Plane

The Plane to pan a Camera for an Orthographic world.



public static void

Pan (Camera ReferenceCamera, EButton ButtonToActivate, float InterpolateSpeed)

Summary:

Pan ReferenceCamera using ButtonToActivate by linearly interpolating with InterpolateSpeed.

Params:

ReferenceCamera:

        The camera to pan.

ButtonToActivate:

        The mouse button to start activate panning.

InterpolateSpeed:

        The speed to ease the camera's movement.


public struct

OrthographicRaycast


RaycastHit2D information about the Raycast.



public RaycastHit2D

Raycast

The RaycastHit2D information about the ray itself.



public bool

bHit

If raycast hit something.

MSpringArm


A GameObject Orbit Utility class.


bShowArmLine

True to show Debug Lines.


Target

The Transform this SpringArm will track.


ArmRotation

The Rotation of this Spring Arm's orbit around Target.


Offset

The positional Offset this Spring Arm will take.


OrientationAngleOffset

The Angle Offset to apply when this Spring Arm Orients towards Target.


bShouldOrientTowardsTarget

True if this Spring Arm should Orient towards Target.


Distance

The Distance this Spring Arm will try to keep from Target.


PositionalLagStrength

The Strength of Lag to be applied when changing positions.



protected void

Update ()

Summary:

Sets the Rotation and Distance with Collision Checks, and then Orients to Target.



protected void

SetRotationAndDistance (MRotator SpringArmRotation, float SpringArmDistance)

Summary:

Sets the Rotation and Distance of this Spring Arm around and from Target, respectively.

Params:

SpringArmRotation:

        The Rotation of the Spring Arm should take.

SpringArmDistance:

        The Distance the Spring Arm should try to maintain from Target.



public void

SetDeltaRotation (float Pitch, float Yaw, float Roll)

Summary:

Rotates the Spring Arm by Pitch and Yaw.



protected virtual bool

DetermineRotationPriority (RaycastHit Previous, RaycastHit Comparison)

Summary:

Determines which Point this Spring Arm should assume when doing MultiRaycast.

Remarks:

By default, the two Points: Previous and Comparison, are based on altitude (Y-Axis).

Returns:

True if Comparison takes precedence over Previous.



public Vector3

GetTargetPosition (bool bWithOffsets)

Summary:

Gets the Target Position.

Params:

bWithOffsets:

        True to consider Offset.

Returns:

Target's Position, considering Offset.



protected virtual Vector3

GetRotationEndPosition (float AtDistance, MRotator Rotation)

Summary:

Computes the world-space position of Rotation AtDistance.

Params:

AtDistance:

        The distance away from Target.

Rotation:

        The rotation to calculate.

Returns:

The Position from Target relative to a Rotation orbit AtDistance.



protected virtual Vector3

GetArmEndPosition (float AtDistance)

Summary:

Computes the position of this Spring Arm's ArmRotation AtDistance.

Params:

AtDistance:

        The distance away from Target when rotated by ArmRotation.

Returns:

The position of ArmRotation around Target AtDistance .



protected virtual Vector3

GetRotationEndPosition (MRotator Rotation)

Summary:

Computes the position of a given Rotation at this Spring Arm's desired Distance.

Params:

Rotation:

        The rotation to calculate.

Returns:

The position of Rotation around Target at Distance.



protected Vector3

GetArmDirection ()

Summary:

An orientation vector of ArmRotation.



protected Vector3

GetArmDirection (MRotator Rotation)

Summary:

An orientation vector of a given Rotation.



protected MRotator

GetRelativeRotation (MRotator Rotation)

Summary:

Converts Rotation into a world-space rotation, relative to Target.

Params:

Rotation:

        The rotation to convert.

Returns:

A Rotation relative to Target.

MSpringArmCollision


Spring Arm Collision Settings.


CollisionType

The type of Collision to check.


OnlyCollideWith

The Layer that collisions.


CollisionDistanceGap

The buffer distance between the Spring Arm and the point of Collision.


AdvancedCollisionActivationDistance

The distance required to activate Advanced Collision Logic.


AdvancedCollisionAngleDelta

The step angle at which Advanced Collision Logic should search.


AdvancedColisionSearchAngle

The angle at which the Advanced Collision Logic should be spread.


bShowAdvancedDebug

True to show Advanced Collision Logic Debug Lines.

ECollisionCheckType


Spring Arm Collision Types.


NoCollision

Ignore Collisions.


SingleRaycast

Individual Collision Check Type.


MultiRaycast

Advanced Collision Check Type.


public static class

Tracking


Utilities for a Camera following or looking at something.



public static void

CameraFollow (Camera ReferenceCamera, Transform Target)

Summary:

Have the ReferenceCamera follow Target.

Params:

ReferenceCamera:

        The camera to move.

Target:

        The target's transform component.



public static void

CameraFollow (Camera ReferenceCamera, Transform Target, Vector3 Offset)

Summary:

Have the ReferenceCamera to follow Target at an offset.

Params:

ReferenceCamera:

        The camera to move.

Target:

        The target's transform component.

Offset:

        The target's position at an offset.



public static void

CameraFollow (Camera ReferenceCamera, Vector3 Target)

Summary:

Have the ReferenceCamera follow Target.

Params:

ReferenceCamera:

        The camera to move.

Target:

        The target's position to follow.



public static void

CameraFollow (Camera ReferenceCamera, Vector3 Target, Vector3 Offset)

Summary:

Have the ReferenceCamera follow Target at an offset.

Params:

ReferenceCamera:

        The camera to move.

Target:

        The target's position to follow.

Offset:

        The target's position at an offset.



public static void

CameraFollow ()

Summary:

Have the main camera follow Target.



public static void

CameraFollow (Transform Target, Vector3 Offset)

Summary:

Have the main camera follow target's transform at an offset.

Params:

Target:

        The target's transform component.

Offset:

        The target's position at an offset.



public static void

CameraFollow ()

Summary:

Have the main camera follow Target.



public static void

CameraFollow (Vector3 Target, Vector3 Offset)

Summary:

Have the main camera follow Target at an offset.

Params:

Target:

        The target's position.

Offset:

        The target's position at an offset.



public static void

Billboard (Transform Self)

Summary:

Ensures the Self always faces the main camera.

Params:

Self:

        The transform to look towards the main camera.



public static void

Billboard (Transform Self, Camera ReferenceCamera)

Summary:

Ensures the Self always faces ReferenceCamera.

Params:

Self:

        The transform to look towards the camera.

ReferenceCamera:

        The camera to look at.



[Obsolete] public static void

Billboard (Transform Self, Transform Point)

Summary:

Ensures the Self always faces Point.

Params:

Self:

        The transform to look towards the point.

Point:

        The transform of where self needs to look towards



[Obsolete] public static void

Billboard (Transform Self, Vector3 Point)

Summary:

Ensures the Self always faces Point.

Params:

Self:

        The transform to look towards the point.

Point:

        The point in world coordinates.