Godot Version
Godot 4.6 stable
Question
I’ve been trying to figure this out for a while, and I feel like I’m missing a really obvious and easy way to do this.
basicaly, I have this book, that opens by rotating two nodes acording to the animation instructions. my issue is that if I give each page its own collision then they fall apart from each other, and if i put the collision further up the family it cant properly represent the shape of the book as it changes through animations (ie when book is open, collision would still be the same as when it was closed).
extends Node3D
var State = 0
@onready var AnimationPlayerInst = $AnimationPlayer
func _input(event: InputEvent):
if event.is_action_pressed("use"):
if State == 0:
open()
State = 1
else:
close()
State = 0
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta) -> void:
pass
func _physics_process(_delta) -> void:
pass
func open():
AnimationPlayerInst.play("Open")
func close():
AnimationPlayerInst.play("Close")
