I created 8 direction movement event for compensation the diagonal movement speed.
However, the object will trembling when moving diagonal direction.
How I do to smooth diagonal movement keep compensation diagonal movement speed?
![]()
I created 8 direction movement event for compensation the diagonal movement speed.
However, the object will trembling when moving diagonal direction.
How I do to smooth diagonal movement keep compensation diagonal movement speed?
![]()
Are you using your own createdmovement, or are you modifying the built in one?
EDIT: nevermind
You really should be using fastloops for accurate movement. Also you are setting the x and y positions a LOT during your events but at the bottom you have an Always event that is setting the x and y position to alterable A and B anyway, so it's overriding all of those other set positions... To me it just seems like a lot of unneeded actions.
@Konidias Could you send me example?
Are fast loops realy nessesary for this?
Couldnt one just use built in 8 directional, and modify the speed for the diagonal directions?

Nope (to the first question) - the only reason for using fastloops in a custom movement would be if you needed to check for collisions after each step. Otherwise it's just pointless and inefficient.
I could be wrong, but I think built-in movements only support integer speeds, and anyway they suck.
Anyway, the cause of the problem is very hard to explain, (it's to do with the fact that you're using sub-pixel positioning so the line doesn't pass through the centre of each pixel, and since you don't draw every pixel the line passes through, you end up with a jagged line).
jitter.jpg
The simplest fix I can think of right now, is to lock the object's position to the nearest pixel (integer) whenever it changes direction.
eg. http://sdrv.ms/14sZAHk
MuddyMole, I wouldn't dismiss fastloops so quickly. they are far more accurate and result in the best possible movement/collision that you're going to get. It's hard to argue otherwise. Also I don't like the stigma that all fastloops are inefficient... You are not going to see frame drops with less than 30 simple fastloop events per tick.

Here's a fixed up version that uses trigonometry for the movement.
The jittery line issue will appear if you press more than 2 directional arrows at once, but otherwise, it works fine.diagonal_movement2.mfa
@Pineapple Nice example! But, I'm making game using Joystick 2 extension. It not have immediate condition (I can't make line no.4 event in your file.).
Can you modify the event without immediate condition?