Palette Reference – 31 – Thrower – Part 27 – Target-Based Throwing – *thrower notecard

Posted by:

|

On:

|

,

Target-Based Throwing – *thrower notecard

 

Introducing Target-Based throwing, useful for easier targeting, although the flight-path is  not respondent to mass/gravity like Impulse-based throwing.  It is a trade-off.

Below are some workable values to get you started:

*thrower nc

Motion: SetMoveToTarget,on
Motion: MoveToTargetTau,2.0
Rotation
: SetTargetOmega,on
Rotation: TargetOmega,<1,0,0>,6.283185,2.0
Termination: RangePostActions,on
Termination: AtRange,0.5
Termination: AttachOnRange,off,6
Termination: SetMatchPosAtTarget,off
Termination: SetMatchRotAtTarget,off
Termination: SetStopSpinAtTarget,on
Termination: SetNonPhysAtTarget,on

The MoveToTargetTau affects the speed and can NOT BE ZERO or the process will silently fail.  It is more of a damping/easing-in effect than pure speed.  The smaller this value, the faster will be the move towards the target.

SetTargetOmega will acknowledge a client-side-based rotation using TargetOmega that is constant and does not decay.  This is not good if you need universally seen precisions, but is good for performance.

TargetOmega takes 3 values:

1 – The axis(es) of the rotation
2 – the rate-of-rotation in radians
3 – the gain or multiplier of the rate-of-rotation

AtTarget specifies the range within which the post-targeting will trigger post actions.