# execute anchored eyes at @s[scores={left=..0,right=..0}] positioned ^ ^ ^ rotated ~ ~ as @e[type=item_display,tag=aj.engineer_rc.root] run tp @s ^-0.1 ^-0.5 ^0.5 ~ ~
# execute anchored eyes at @s[scores={left=1..,right=1..}] positioned ^ ^ ^ rotated ~ ~ as @e[type=item_display,tag=aj.engineer_rc.root] run tp @s ^-0.1 ^-0.5 ^0.5 ~ ~

# execute anchored eyes at @s[scores={left=1..,right=..0}] positioned ^ ^ ^ rotated ~ ~ as @e[type=item_display,tag=aj.engineer_rc.root] run tp @s ^-0.1 ^-0.5 ^0.5 ~ ~
# execute anchored eyes at @s[scores={left=..0,right=1..}] positioned ^ ^ ^ rotated ~ ~ as @e[type=item_display,tag=aj.engineer_rc.root] run tp @s ^-0.35 ^-0.5 ^0.5 ~ ~

# execute anchored eyes at @s[scores={forward=1..}] positioned ^ ^ ^ rotated ~ ~ as @e[type=item_display,tag=aj.engineer_rc.root] run tp @s ^ ^ ^0.75 ~ ~
# execute anchored eyes at @s[scores={backward=1..}] positioned ^ ^ ^ rotated ~ ~ as @e[type=item_display,tag=aj.engineer_rc.root] run tp @s ^ ^ ^0.25 ~ ~
# execute anchored eyes at @s positioned ^ ^ ^ rotated ~ ~ as @e[type=item_display,tag=aj.engineer_rc.root] run tp @s ^-0.1 ^-0.5 ^0.5 ~ ~

# scoreboard players set .x_rc first_person -10
# scoreboard players set .y_rc first_person -50
# scoreboard players set .z_rc first_person 45
# execute as @s[scores={left=1..}] at @s anchored eyes if block ^0.1 ^ ^ air run scoreboard players add .x_rc first_person 50
# execute as @s[scores={right=1..}] at @s anchored eyes if block ^-0.1 ^ ^ air run scoreboard players remove .x_rc first_person 50
# execute as @s[scores={forward=1..}] at @s anchored eyes if block ^ ^ ^0.1 air run scoreboard players add .z_rc first_person 50
# execute as @s[scores={backward=1..}] at @s anchored eyes if block ^ ^ ^-0.1 air run scoreboard players remove .z_rc first_person 35

# execute as @s[scores={backward=1..,left=1..}] at @s anchored eyes if block ^0.1 ^ ^ air run scoreboard players remove .x_rc first_person 20
# execute as @s[scores={backward=1..,right=1..}] at @s anchored eyes if block ^-0.1 ^ ^ air run scoreboard players add .x_rc first_person 20
# execute as @s[scores={forward=1..,left=1..}] at @s anchored eyes if block ^0.1 ^ ^ air run scoreboard players remove .x_rc first_person 20
# execute as @s[scores={forward=1..,right=1..}] at @s anchored eyes if block ^-0.1 ^ ^ air run scoreboard players add .x_rc first_person 20

# execute store result storage first_person animation.engineer.rc.x float 0.01 run scoreboard players get .x_rc first_person
# execute store result storage first_person animation.engineer.rc.y float 0.01 run scoreboard players get .y_rc first_person
# execute store result storage first_person animation.engineer.rc.z float 0.01 run scoreboard players get .z_rc first_person

# execute at @s run function main:characters/engineer/rc/id1/tp with storage first_person animation.engineer.rc

# execute anchored eyes at @s positioned ^ ^ ^ rotated ~ ~ as @e[type=item_display,tag=aj.engineer_rc.root] run tp @s ^-0.1 ^-0.5 ^0.45 ~ ~