Returns the reference data frame with added vectors over time.

add_vector2target2(ref_movement, target_movement, join_by = "time")

Arguments

ref_movement

A data frame with reference movement, e.g. the head or the waist movement. Movement file should have `pos_x`, `pos_y`, `pos_z`, `rot_x`, `rot_y`, `rot_z` columns. Eye-tracker file should have `gaze_origin_x`, `gaze_origin_y`,`gaze_origin_z`columns

target_movement

Movement of point of interest (e.g threat movement)

join_by

= "time" Column by which to join the two data frames (character)

Value

`ref_movement` with columns `time`, `vector_to_target_x` `vector2target_y` `vector2target_z` (raw vector relative to the moving target) added