Add fixed custom camera positions
This commit is contained in:
parent
02697dae1f
commit
2bcb973020
2 changed files with 58 additions and 3 deletions
24
set-camera-position.sh
Executable file
24
set-camera-position.sh
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
AZIMUTH_FILE=/tmp/skeledance-camera-azimuth
|
||||
ROTATION_FILE=/tmp/skeledance-camera-rotation
|
||||
POSITION=${1:-leste}
|
||||
|
||||
case "$POSITION" in
|
||||
norte|north) AZIMUTH=0 ;;
|
||||
leste|east) AZIMUTH=90 ;;
|
||||
sul|south) AZIMUTH=180 ;;
|
||||
oeste|west) AZIMUTH=270 ;;
|
||||
*)
|
||||
if [[ "$POSITION" =~ ^-?[0-9]+([.][0-9]+)?$ ]]; then
|
||||
AZIMUTH=$POSITION
|
||||
else
|
||||
printf 'Uso: %s norte|leste|sul|oeste|GRAUS\n' "$0" >&2
|
||||
exit 2
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
printf '%s\n' "$AZIMUTH" > "$AZIMUTH_FILE"
|
||||
printf '0\n' > "$ROTATION_FILE"
|
||||
printf 'Câmera fixa em %s°\n' "$AZIMUTH"
|
||||
Loading…
Add table
Add a link
Reference in a new issue