More finetuning of hair positioning

This commit is contained in:
2024-12-15 14:40:47 +01:00
parent e3e40dd083
commit d58cfa668d
4 changed files with 16 additions and 18 deletions

View File

@ -155,7 +155,7 @@ onMounted(() => {
// #146 : Set camera position to character, need to be improved still
scene.cameras.main.startFollow(charContainer.value as Phaser.GameObjects.Container)
scene.cameras.main.stopFollow()
// scene.cameras.main.stopFollow()
}
updatePosition(props.zoneCharacter.character.positionX, props.zoneCharacter.character.positionY, props.zoneCharacter.character.rotation)

View File

@ -29,10 +29,8 @@ const texture = computed(() => {
const isFlippedX = computed(() => [6, 4].includes(props.zoneCharacter.character.rotation ?? 0))
const imageProps = computed(() => ({
depth: 1,
originY: [0, 6].includes(props.zoneCharacter.character.rotation ?? 0) ? 4.35 : 5.35,
originY: [0, 6].includes(props.zoneCharacter.character.rotation ?? 0) ? 4.30 : 5.25,
flipX: isFlippedX.value,
y: props.zoneCharacter.isMoving ? (scene.time.now % 500 < 250 ? 0 : 2) : 2, // Add this line
x: props.zoneCharacter.isMoving ? (scene.time.now % 500 < 250 ? 0 : -2) : -1, // Add this line
texture: texture.value
}))