Initialize body facing for a player based on opponent position
Calculates initial facing angle to point toward opponent.
Player's position
Opponent's position
Initial BodyFacing state
몸향하기초기화
const player = { ...basePlayer, bodyFacing: initializeBodyFacing( { x: 300, y: 400 }, { x: 500, y: 400 } ),}; Copy
const player = { ...basePlayer, bodyFacing: initializeBodyFacing( { x: 300, y: 400 }, { x: 500, y: 400 } ),};
Initialize body facing for a player based on opponent position
Calculates initial facing angle to point toward opponent.