Ran into a problems incorporating tutorials into a cohesive project

Godot Version

First Problem

if direction:
velocity.x = direction.x * SPEED
velocity.z = direction.z * SPEED

	armature.look_at(direction + position)


First problem:

The first three lines are the auto generated movement code for a Character 3D body, more included to help show where the code is than anything else.

The last line is the problem. This line worked perfectly fine in the tutorial, and was easily produced in an isolated scene. But doesn’t function right. Instead, the model is now oriented looking towards the sky, with everything else working fine. The line is meant to turn the model in the direction of the key I am pressing, meaning I hit A and the model turns left not just strafes.

From what I’ve been able to figure out, it’s because the Z axis in blender is different from the z axis in godot, but IDK what to do about it.

You probably want to use direction + global_position. By the sound of armature it’s imported and probably has a parent (or two) that will have it’s own position changed. If the model is up-right in the editor, but now facing backwards then you want to enable ‘use_model_front’

armature.look_at(direction + global_position, Vector3.UP, true)

yes the armature is indeed imported, it has a parent which is my charactermodel3d.

And yes, the bones have their z axis pointed down, and then I had to make a rotation to turn the model, from the bones or the mesh doesn’t stick, to make it walk correctly forwards and back.

I’m trying your solution now.

EDIT: That line did not work, I still end up with my back literally on the ground, not sure if this means its moving the model down or what, and then I’m also looking at the sky, which is technically the opposite of what it should be if it just rotated the model towards its front.

what do you mean by use_model_front? do I use that instead of look at? Sorry, super new to godot.

use_model_front is the third argument, I set to true. You might be able to rotate the parent of the armature to get them walking up right. Editing the armature’s rotation could be frivolous with animations that reset rotation/position, try using look_at on the armature’s parent instead.

Had a bunch here, but I finally found what you were talking about it the documentation, and inserted it in the code correctly. And that at least had a coherent affect.

If I could now rotate the model 90 degrees in the Y axis it would be correct, IDK if that is a start but it feels like it.

I did have a bit here about wanting to do mouse targeting anyway, and since I will have to check for the mouse and stuff in that, would it be better to just solve this that way?