xyz Hi, me again! It was indeed the meshes - everything is nice and smooth now!
I'm running into a slight issue SOMETIMES (I don't know what triggers this, it's seemingly random). I get the following error repeatedly and the character is no longer able to move:
E 0:00:03:0170 Vector3.cs:551 @ Godot.Vector3 Godot.Vector3.Rotated(Godot.Vector3, float): System.ArgumentException: Argument is not normalized. (Parameter 'axis')
<C# Error> System.ArgumentException
<C# Source> /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs:551 @ Godot.Vector3 Godot.Vector3.Rotated(Godot.Vector3, float)
<Stack Trace> Vector3.cs:551 @ Godot.Vector3 Godot.Vector3.Rotated(Godot.Vector3, float)
Vector3.cs:622 @ Godot.Vector3 Godot.Vector3.Slerp(Godot.Vector3, float)
SkateCharacter.cs:108 @ void SkateCharacter._PhysicsProcess(double)...
I do think that the axis argument I'm passing is indeed normalized. See below (the wantedVector line is line 108 that the error mentions):
Vector3 baryNormal = (normals[0] * baryCoords.X) + (normals[1] * baryCoords.Y) + (normals[2] * baryCoords.Z);
baryNormal = baryNormal.Normalized();
Vector3 wantedVector = GlobalTransform.Basis.Y.Slerp(baryNormal, 0.1f);
I also tried normalizing again when passing it over to Slerp(), but I'm not having luck. ALSO, it seems like this happens more often if I increase the Slerp() weight.
To get the mesh normals, I'm using this:
normals[i] = hit.GlobalTransform.Basis * meshData.GetVertexNormal(meshData.GetFaceVertex(normRay.GetCollisionFaceIndex(), i))
Do you see any isuses in this small snippet of code that may trigger this error, especially as far as how I'm normalizing it the bary normal?