YouGroove Posted February 20, 2014 Share Posted February 20, 2014 Well strange i got character controller that worked fine. And now i have jittering ? Does anyone happened same problem ? How can i make the character controller to move smooth ? Some command or special variable ? Quote Stop toying and make games Link to comment Share on other sites More sharing options...
DudeAwesome Posted February 20, 2014 Share Posted February 20, 2014 SetInput() works fine Quote It doesn´t work... why? mhmmm It works... why? Link to comment Share on other sites More sharing options...
YouGroove Posted February 20, 2014 Author Share Posted February 20, 2014 Thanks. Strange in my side. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
diedir Posted February 20, 2014 Share Posted February 20, 2014 i saw that from Aggror : Script.target = "" --entity "Target waypoint" Script.offset = Vec3(0,1,-2) --Vec3 "Offset" Script.smoothen = Vec3(5,5,5) --Vec3 Smoothen Script.enabled = true --bool Enabled function Script:Start() if self.target == nil then Debug:Error("The follow script does not have a target.") end end function Script:UpdateWorld() if self.enabled then local x = Math:Curve((self.target:GetPosition(true).x + self.offset.x), self.entity:GetPosition(true).x, self.smoothen.x / Time:GetSpeed()) local y = Math:Curve((self.target:GetPosition(true).y + self.offset.y), self.entity:GetPosition(true).y, self.smoothen.y / Time:GetSpeed()) local z = Math:Curve((self.target:GetPosition(true).z + self.offset.z), self.entity:GetPosition(true).z, self.smoothen.z / Time:GetSpeed()) self.entity:SetPosition(Vec3(x,y,z)) end end not tried but sure it will work Quote AMD Ryzen 5900HX - Nvidia RTX 3070 - 32 Go - 1To SSD - W11 Link to comment Share on other sites More sharing options...
YouGroove Posted February 20, 2014 Author Share Posted February 20, 2014 Thanks Diedir. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
YouGroove Posted February 20, 2014 Author Share Posted February 20, 2014 Something going super wrong, don't knwo what ? All physic settings are good for character controller, and SetInput has good parameters ? Tested with simple physic cylinder and PhysicSetPosition with different values as last parameter, but well the jittering is still present ? Super strange as other aliens call Goto navigation function without jittering problem ? ----------- Deleting most of the stuff on level, keeping BSP only, re adding player, map re worked, but well , all level work is lost. Using SetInput the character is still jittering a little ? even setting friction to low has no effect Perhaps it's more perceptible because i put all animation paused even during walk/run. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
YouGroove Posted February 20, 2014 Author Share Posted February 20, 2014 Seems the map has a problem. I add character player with original size, added char controller and script, launching game just terminated. I removed character and it's script, all the rest is just level no more entities i got no Exception, but runing the map in debug or run mode, it just crashes : program terminated. Well another strange stuff going on with the map file or some cache code or some problem to clean objects references in the map file perhaps Quote Stop toying and make games Link to comment Share on other sites More sharing options...
YouGroove Posted February 21, 2014 Author Share Posted February 21, 2014 ok, it seems it's some character controller friction problem , even trying SetFriction do not changed that. In FPS view it's not very perceptible and occurs specialy when turning on some direction. In TPS , but camera far from camera it's not perceptible, and if you add character animation it will be more hard to see. So character controller is a physic cylinder really sliding on surfaces. How to avoid that visible jittering if TPS camera near character ? I think i have some solution : 1 ) Put some small cube model for character attach Physic character controller. 2 ) Then calculate at each frame a smooth move between last position and actual character controller position 3) Place your animated player model at the position of the smooth move calculated. It won't be a big delat between real char controller position and the calculated smooth move, something very tiny, but at least smooth move should totally hide the light jittering problem. 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.