Godot Version
4.4.1
Question
Hey!
I have a problem with LookAtModifier transformations applied to my animated model.
Basically I want it (spine bone) to look at the specific direction but at the same time to play an animation, so those transformations are mixed with each other, but modifier rotates the bone so its local forward vector looks at the target (there is no keep / add current rotation/position/scale as a checkbox).
I looked at the source code and there is a single method exposed which does the processing, but I dont need to override the whole thing I just need to mix transformations so I did this (screenshot 2) - that did it even worse
Cant you use the “influence” property?
I need the influence to be 1
Well if the influence is 1 then you cant mix it with an animation, can you? To mix it with animation you need to reduce the influence i believe
1 Like
I just need to summ lookat rotatation (before any other transformation is applied) with the animation bone transformation. thats it.
But when U add lookat modifer it totally overrides the animation transformations.
I’m unsure what you’re trying to say/achieve, but the script looks wrong to me. You should look into how transform multiplication works, because before * after
sounds like a disaster to me.
Wow, if the previous messages and screenshots didnt make it clear I dont know what will.
From what you’re saying it sounds like dropping the modifier influence should solve the issue, but apparently it doesn’t or that’s not what you’re looking for - that’s where the confusion comes from.
1 Like
I need to apply both the standard lookAtModifier transformation and the currently running animation’s bone transformation (rotation) at the same time.
Right now, the lookAtModifier overrides the rotation.
Ah, I see, you need to modify the forward direction of the LookAtModifier. I’ll look into if that is feasible with the built-in class when I have the time (or someone else does it before me), meanwhile I’ll direct you to the guide on how to create your own skeleton modifiers, since that is possibly something you’ll have to do:
1 Like
Did you manage to write up your own skeleton modifier for your case? Because there is a way to do this with the built-in LookAtModifier, but it’s a roundabout approach which is also potentially bug-prone.