KMHoldable - Qkrisi/ktanemodkit GitHub Wiki

KMHoldable

[DisallowMultipleComponent]
public class KMHoldable : MonoBehaviour

A holdable object (like the bomb binder, dossier)


public Vector3 targetPosition = new Vector3(0.3f, 1.25f, -1.25f);

Position to hold object when picked up


public Vector3 targetRotation = new Vector3(13.5f, 0f, 0f);

Default rotation of object when held


public HoldableAvailabilityEnum HoldableAvailability = HoldableAvailabilityEnum.NONE;

Indicates in which room the holdable will be available


public float GetAxisValue(AxisEnum axis, int controller = 0)

Get a specified axis value for the controller holding this object


public bool GetButton(ButtonEnum button)

Get whether a specified button is currently held for the controller holding this object


public Transform GetAnchorTransform()

Gets the transform for the anchor on the controller holding this object

Enumerations

public enum ButtonEnum

Represents the controller buttons

Values: BUTTON1, BUTTON2, TOUCHPAD


public enum AxisEnum

Represents the conroller axes

Values: X, Y, TRIGGER, GRIP


public enum HoldableAvailabilityEnum

Represents the rooms the holdable can be available in

Values: SETUP, GAMEPLAY, ALL, NONE