TopDown Engine  v3.6
MoreMountains.TopDownEngine.WeaponIKDisabler Class Reference

You can add this class next to a WeaponIK component (so usually on a Character's Animator), and it'll let you disable IK and optionally reparent the WeaponAttachment during certain animations More...

Inheritance diagram for MoreMountains.TopDownEngine.WeaponIKDisabler:
MoreMountains.TopDownEngine.TopDownMonoBehaviour MoreMountains.Tools.MMMonoBehaviour

Public Attributes

List< string > AnimationParametersPreventingIK
 a list of animation parameter names which, if true, should cause IK to be disabled More...
 
Transform WeaponAttachment
 the WeaponAttachment transform to reparent More...
 
Transform WeaponAttachmentParentNoIK
 the transform the WeaponAttachment will be reparented to when certain animation parameters are true More...
 
bool FollowParentPosition = false
 whether or not to match parent position when disabling IK More...
 
bool ControlWeaponAim = false
 whether or not to disable weapon aim when disabling IK More...
 

Protected Member Functions

virtual void Start ()
 On Start we initialize our component More...
 
virtual void Initialization ()
 Grabs animator, weaponIK, hashes the animation parameter names, and stores initial positions More...
 
virtual void OnAnimatorIK (int layerIndex)
 On animator IK, we turn IK on or off if needed More...
 
virtual void PreventIK (bool status)
 Enables or disables IK More...
 
virtual void EnableWeaponAim (bool status)
 Enables or disables weapon aim based on the specified status More...
 

Protected Attributes

Transform _initialParent
 
Vector3 _initialLocalPosition
 
Vector3 _initialLocalScale
 
Quaternion _initialRotation
 
WeaponIK _weaponIK
 
WeaponAim _weaponAim
 
Animator _animator
 
List< int > _animationParametersHashes
 
bool _shouldSetIKLast = true
 

Detailed Description

You can add this class next to a WeaponIK component (so usually on a Character's Animator), and it'll let you disable IK and optionally reparent the WeaponAttachment during certain animations

Member Function Documentation

◆ EnableWeaponAim()

virtual void MoreMountains.TopDownEngine.WeaponIKDisabler.EnableWeaponAim ( bool  status)
protectedvirtual

Enables or disables weapon aim based on the specified status

Parameters
status

◆ Initialization()

virtual void MoreMountains.TopDownEngine.WeaponIKDisabler.Initialization ( )
protectedvirtual

Grabs animator, weaponIK, hashes the animation parameter names, and stores initial positions

◆ OnAnimatorIK()

virtual void MoreMountains.TopDownEngine.WeaponIKDisabler.OnAnimatorIK ( int  layerIndex)
protectedvirtual

On animator IK, we turn IK on or off if needed

Parameters
layerIndex

◆ PreventIK()

virtual void MoreMountains.TopDownEngine.WeaponIKDisabler.PreventIK ( bool  status)
protectedvirtual

Enables or disables IK

Parameters
status

◆ Start()

virtual void MoreMountains.TopDownEngine.WeaponIKDisabler.Start ( )
protectedvirtual

On Start we initialize our component

Member Data Documentation

◆ _animationParametersHashes

List<int> MoreMountains.TopDownEngine.WeaponIKDisabler._animationParametersHashes
protected

◆ _animator

Animator MoreMountains.TopDownEngine.WeaponIKDisabler._animator
protected

◆ _initialLocalPosition

Vector3 MoreMountains.TopDownEngine.WeaponIKDisabler._initialLocalPosition
protected

◆ _initialLocalScale

Vector3 MoreMountains.TopDownEngine.WeaponIKDisabler._initialLocalScale
protected

◆ _initialParent

Transform MoreMountains.TopDownEngine.WeaponIKDisabler._initialParent
protected

◆ _initialRotation

Quaternion MoreMountains.TopDownEngine.WeaponIKDisabler._initialRotation
protected

◆ _shouldSetIKLast

bool MoreMountains.TopDownEngine.WeaponIKDisabler._shouldSetIKLast = true
protected

◆ _weaponAim

WeaponAim MoreMountains.TopDownEngine.WeaponIKDisabler._weaponAim
protected

◆ _weaponIK

WeaponIK MoreMountains.TopDownEngine.WeaponIKDisabler._weaponIK
protected

◆ AnimationParametersPreventingIK

List<string> MoreMountains.TopDownEngine.WeaponIKDisabler.AnimationParametersPreventingIK

a list of animation parameter names which, if true, should cause IK to be disabled

◆ ControlWeaponAim

bool MoreMountains.TopDownEngine.WeaponIKDisabler.ControlWeaponAim = false

whether or not to disable weapon aim when disabling IK

◆ FollowParentPosition

bool MoreMountains.TopDownEngine.WeaponIKDisabler.FollowParentPosition = false

whether or not to match parent position when disabling IK

◆ WeaponAttachment

Transform MoreMountains.TopDownEngine.WeaponIKDisabler.WeaponAttachment

the WeaponAttachment transform to reparent

◆ WeaponAttachmentParentNoIK

Transform MoreMountains.TopDownEngine.WeaponIKDisabler.WeaponAttachmentParentNoIK

the transform the WeaponAttachment will be reparented to when certain animation parameters are true


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