If you put what before the render? Entity:Attach() only needs to be called once.
I tried producing this error but even at 60 meters per second, there is only some small floating point fluttering, nothing like you showed in your video on Discord:
#include "Leadwerks.h"
using namespace Leadwerks;
int main(int argc, const char* argv[])
{
//Get the displays
auto displays = GetDisplays();
//Create a window
auto window = CreateWindow("Leadwerks", 0, 0, 1280 * displays[0]->scale, 720 * displays[0]->scale, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR);
//Create a framebuffer
auto framebuffer = CreateFramebuffer(window);
//Create a world
auto world = CreateWorld();
//Create a camera
auto camera = CreateCamera(world);
camera->SetClearColor(0.125);
camera->SetFov(70);
camera->Move(0, 2, -8);
//Create light
auto light = CreateBoxLight(world);
light->SetRotation(45, 35, 0);
light->SetRange(-10, 10);
//Model by PixelMannen
//https://opengameart.org/content/fox-and-shiba
auto model = LoadModel(world, "https://github.com/Leadwerks/Documentation/raw/master/Assets/Models/Characters/Fox.glb");
model->SetScale(0.05);
model->Animate(1);
model->SetRotation(0, -90, 0);
auto neck = model->skeleton->FindBone("b_Neck_04");
auto head = model->skeleton->FindBone("b_Head_05");
Vec3 rotation;
//Model by alissvetlana
//https://sketchfab.com/3d-models/hat-a7f54e87bea94730b4a1827ec1f770df
auto hat = LoadModel(world, "https://github.com/Leadwerks/Documentation/raw/master/Assets/Models/Characters/hat.glb");
hat->SetScale(0.025);
hat->SetPosition(-0.3, 0.4, 0);
hat->Attach(model, head);
//Main loop
while (window->Closed() == false and window->KeyHit(KEY_ESCAPE) == false)
{
model->Translate(10, 0, 0);
camera->Translate(10, 0, 0);
world->Update();
rotation.y = Cos(float(Millisecs()) / 10.0f) * 65.0f;
neck->SetRotation(rotation);
world->Render(framebuffer);
}
return 0;
}