Custom code like this can be created by unlinking the KINARMHandInTarget block from the TDK and modifying the underlying code. An example of this can be found in the Visuomotor rotation task, which is one of the sample tasks in our Sample Custom Task forum in which the hand feedback is transformed from the true position to a rotated position. Another example can be found in the Bimanual task which includes a hand feedback object that is the mean of the two hand/finger-tip positions. Please download either of these tasks and look at the code.