Godot Version
Godot 4.6
Question
I am using looking_at to turn cards toward the camera. The code is really simple :
var cur_scale = scale
var transform_card = global_transform.looking_at(
lookat.global_position,
Vector3.UP,
true)
global_transform = global_transform.interpolate_with(transform_card, delta * MOVE_SPEED);
scale = cur_scale
Now this does exactly what it should but it is a bit too correct for the cards to feel like they are handled like you would in real life.
I need to soften the rotation (have a certain % less rotation) for the Z and Y axis.
Of course the current transform is done in global and I need to have it in local space so that I can easily touch up the Z and Y rotation.
How can I : Prepare the global_transform (simply with looking_at), convert it into a local transform and then decompose the transform so I can modify the angle before applying it ?
Is that a terrible why to handle it ?
I could write myself an updated looking_at function, would not be hard to do so but why not use what the engine gives me ?