podfish [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=12003 Approach maths <p>Hey guys thought I would post this here as I think the answer will help other too:)<br /> Basically I want to make a function that approaches any number in as big chunks as possible. Like this:</p> <p>Speed = approach (target number, amount to move by)<br /> So speed = approach(0, 0.5)<br /> If speed was 0.4 before I want it to hit 0 and not -0.1 </p> <p>So if speed was a higher number like 7 every frame till it hits the target 0 it would take 0.5</p> <p>Really useful for making velocity and stuff feel good :)<br /> Any help very much appreciated :)</p> https://www.lexaloffle.com/bbs/?tid=3670 https://www.lexaloffle.com/bbs/?tid=3670 Tue, 21 Jun 2016 19:14:32 UTC