Ridge Batty Posted October 16, 2017 Share Posted October 16, 2017 Looks like animations stop updating when they go outside the frustum... this is quite annoying when trying to render stuff which is close to camera, like avatar's body in first person view. When your hands go outside the view, they never come back I tried attaching invisible meshes in animations but it has it's drawbacks and it feels like i'm fighting (a losing battle) against the system. Any suggestions how to force the animations to keep running even when they go outside the view? Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted October 16, 2017 Share Posted October 16, 2017 If you are using a mesh before renderer, to do the animating then switch to a scene level before renderer. The mesh one only runs when the mesh is going to be drawn, Also, if there are multiple cameras, eg. webVR, then it is run twice per frame. A scene render is run once per frame. Quote Link to comment Share on other sites More sharing options...
Ridge Batty Posted October 16, 2017 Author Share Posted October 16, 2017 I'm not sure if you mean this: _this.scene.registerBeforeRender(function(){ _this.playerControls(); _this.playerAnimations(); }); but that's how i'm doing it. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted October 16, 2017 Share Posted October 16, 2017 That is a scene level beforeRender, and it should run every frame, just once. FYI, the mesh version would be: myMesh. registerBeforeRender (function()... What is "_this", a mesh? If so, other than a PG, you could add a line to function to write to console , if not visible. "if (!_this.isVisible) console.log('still running')". Make it not visible at some point, and see if tons of messages get logged. If they do, then there is a problem with your playerAnimations(). Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 16, 2017 Share Posted October 16, 2017 You can also force the mesh to stay active with mesh.alwaysSelectAsActiveMesh = true adam 1 Quote Link to comment Share on other sites More sharing options...
Ridge Batty Posted October 16, 2017 Author Share Posted October 16, 2017 Ok, thanks, I'll work with this and see how it goes! Btw, the "_this" refers to my game object so it's nothing but a container in this context. Quote 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.