Local tweeningInformation = TweenInfo.new(0.6, ,) = :ToWorldSpace(offset)Īiming function: function fpsHandler:aim(toAim) Local offset = .Value:lerp(.Value,self.aimLerp) :shove(Vector3.new(((1 - self.aimLerp) / ADS_AIMDOWNDIVIDER),0,0) * deltaTime * scalar) If math.clamp(self.aimLerp,1,1) ~= self.aimLerp and self.aiming then Self.aimLerp = self.aimLerp + :update(deltaTime).X RenderStepped function: -lerping adjustment both the adjustment and initial push have custom values. This output is pushed when clicking RMB and adjusted in the renderstepped function itself. Every frame 2 offsets (holding and aiming) are lerped between each other based on a spring’s X output. :shove(workBobble * deltaTime * scalar)Īiming itself is a bit more complex than that. Local workBobble = Vector3.new(math.sin(tick()*5*speed)*modifier, math.sin(tick()*10*speed)*modifier, 0)- Vector3.new(Bobble_X,Bobble_Y,0) I don’t have any other solutions to try since i’m pretty clueless about this.īobbing is calculated every frame, like this: (but mutliple times with multiple springs for other movements like sway) local speed = 2 Second try was limiting deltaTime to 1/60 deltaTime = math.max(1/60,deltaTime) This “seems” to have fixed most of bobbing issues but i’m still left with ADS not working. I checked up on framerate independent motion and added * deltaTime * 60 to any instances of the springs being shoved inside RenderStepped. While game:GetService("RunService").RenderStepped:Wait() do i threw it in here in case someone wants to check if it's correct Note: I’ve implemented an FPS counter to help with diagnostics. Everything is/was acting as if it’s being done twice, and ADS being massively broken. Hello! I’m in the middle of making a weapon framework and have been testing everything just fine so far Only when i used my FPS unlocker i’ve noticed really bad results.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |