AggrorJorn Posted January 3, 2010 Share Posted January 3, 2010 I have this animation in the editor which seems to be working fine. However when you fly close towards it, the animation freezes. When I fly away with the camera the animation continues. This also happens when I run the fpscontroller.lua. Anybody have an idea why this is? This is the lua file: require("scripts/class") local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) function object:Render() frame = (AppTime()/32.0) % (60-0) + 1 model:Animate( frame, 1,0, 1 ) end function object:Free(model) self.super:Free() end end Quote Link to comment Share on other sites More sharing options...
Josh Posted January 3, 2010 Share Posted January 3, 2010 Because the model AABB doesn't encompass the whole object, so the render function gets skipped when you are close. BTW, using the Render function like this will result in an enormous speed increase, because you can have tons of offscreen characters that don't have to be animated. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
AggrorJorn Posted January 3, 2010 Author Share Posted January 3, 2010 Is this because of the collision type? Quote Link to comment Share on other sites More sharing options...
Josh Posted January 4, 2010 Share Posted January 4, 2010 No, the model bounding box has nothing to do with the collision type. Add some dummy vertices to make the mesh larger so it will make a bounding box big enough to contain all the mesh when animated. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
AggrorJorn Posted January 4, 2010 Author Share Posted January 4, 2010 perfect. It's working now. Quote Link to comment Share on other sites More sharing options...
VicToMeyeZR Posted January 5, 2010 Share Posted January 5, 2010 I am wondering. Is this a normal way to do this. I have seen most games that do still animate no matter how close you are. Is this because they still do animation weather you see them or not? Quote AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.