Search found 3 matches

by wongkj12
Sat Nov 24, 2018 2:03 pm
Forum: Support and Development
Topic: Move object to mouse (stuttering)
Replies: 7
Views: 5373

Re: Move object to mouse (stuttering)

While Pgimeno is correct, assuming you are moving at a constant speed, I think the "overshoot" problem could be described in a simpler way: local step = player.speed*dt if step >= distance then -- arrive else -- keep moving end Also, don't forget the formula: time = distance/speed Further...
by wongkj12
Sat Nov 24, 2018 2:25 am
Forum: Support and Development
Topic: Move object to mouse (stuttering)
Replies: 7
Views: 5373

Re: Move object to mouse (stuttering)

Ah, I get it now. Thank you for such a detailed explanation!
by wongkj12
Fri Nov 23, 2018 3:37 pm
Forum: Support and Development
Topic: Move object to mouse (stuttering)
Replies: 7
Views: 5373

Move object to mouse (stuttering)

Hi, am new to this forum & programming in general, would kindly appreciate any help! I'm trying to get an object to move at a constant speed towards the mouse cursor, however whenever my object reaches the cursor it starts stuttering back & forth near the cursor. (Here is a GIF: https://ibb....