YouGroove Posted March 21, 2014 Share Posted March 21, 2014 If i create a solid physic object and play with forces, using low friction , it just slides smooth on surface without any jittering. Why Navmesh functions are so jittering ? even setting friction to (0,0) ? Actually calling GotoPoint or SetInput is not possible to use them for real. Unity proposes a character controller we can call "ready to use" without any jittering or other physic problem used by hundred of games. Could it be possible to have in LE3 "ready to use" Navmesh functions : GotoPoint(), SetInput() with some smooth parameter when calling them ? Would be better for new comers (and i just dropped using Navmesh from some good time now caus of that ----------- Edit : Only SetInput is not ready to use, GotoPoint beeing ok and smooth without jittering at all. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
DudeAwesome Posted March 21, 2014 Share Posted March 21, 2014 mhmm not have used GoToPoint a lot yet but never noticed jittering. also Input stuff works smooth for me. the Leadwerks 3.1 game demo also use that functions and everything is fine. do you have a screen or small video what exactly you mean? Quote It doesn´t work... why? mhmmm It works... why? Link to comment Share on other sites More sharing options...
YouGroove Posted March 21, 2014 Author Share Posted March 21, 2014 LE3 FPS demo just smooth by code camera position and weapon, as in FPS view you don't see the glitches. Just open LE3 FPS demo , in the code change values to have camera behind the visible model player, you'll see the characte r controller it's jittering a lot. That's strange LE3 keeping that controller like that , not ready to use compared to others 3D solutions. It will only make code lot more complicated to have to code : -Character controller on fake object with invisible material -Attach your real character to that fake model - smooth position of your real character I don't see doing that workflow for lot of characters in a game A character controller is meaned to be ok, ready to use without behaviour problems. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
tjheldna Posted March 21, 2014 Share Posted March 21, 2014 Hmm I'm not experiencing any jittering when using GoToPoint. Are you only calling the function once? and not every frame? Quote Link to comment Share on other sites More sharing options...
YouGroove Posted March 21, 2014 Author Share Posted March 21, 2014 You must be right GotoPoint is perhaps free of jittering, just seeing crawlers walk , or aliens in my game running without jittering. The only problem is SetInput function. In fact i use SetInput that is called every frame on physicsUpdate(). Each frame some movement is given to it ,and jittering is super visible , so it can't be used for TPS games or FPS without do the tricks i listed above. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Josh Posted March 22, 2014 Share Posted March 22, 2014 If you are setting physics forces inside the physics callback, do not modulate the input by the timing! This is what was causing your turret bullets to jump around. Just set the input as you want, because the function is called in regular intervals and does not need adjustment. 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...
YouGroove Posted March 22, 2014 Author Share Posted March 22, 2014 For bullet is use SetVelocity, never use functions that will drop frame rate. SetInput has a jittering problem, having it smoothed it would be ready ot use : here is some code example : function Script:Movement() self.prevPos = self.entity:GetPosition() -- handle player movement self.playerMovement.z = ((App.window:KeyDown(Key.W) and 1 or 0) - (App.window:KeyDown(Key.S)and 1 or 0)) * self.moveSpeed -- move the camera to the player and set the yaw from 3rd person view self.Camera:SetPosition(self.entity:GetPosition(true), true) self.Camera:SetRotation(Vec3(self.cameraPitch, self.cameraYaw, 0), true) -- offset the camera up and back self.Camera:Move(0, 3, -5) -- rotate the model along with the camera self.entity:SetRotation(Vec3(0, self.cameraYaw, 0)) -- move the controller in the rotation of the player self.entity:SetInput(self.cameraYaw, self.playerMovement.z, 0 --[[self.playerMovement.x]], 0, false, 1) end I'm annoying but Character controllers in other 3D apps are smoothed , in LE3 not. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Josh Posted March 22, 2014 Share Posted March 22, 2014 I can't tell what you are doing without a full example to run. The example game in Leadwerks works fine AFAIK. 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...
YouGroove Posted March 22, 2014 Author Share Posted March 22, 2014 Yes the example works fine , caus camera movement is smoothed by code. I'll post some example. Quote Stop toying and make games 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.