Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit)

Hi. i trying to use your scripts, it's work, but only if player move on 90 or 45 degree

if i trying to move like ~10-20 degrees, player start shaking so much.

Video:https://streamable.com/mdab2h

Is this any way to fix it? I really hope you can help me.

This may be more related to your camera code than my code.
Likely you need to round your camera's position to match your sub pixel ratio.

Add this script to your project and use it instead of camera_set_view_pos().  I think it'll help.

https://www.dropbox.com/s/v3h86tf2oey6aiu/camera_set_view_pos_subpixel.gml?dl=0

can you please check this project?

https://drive.google.com/open?id=1mmftbs2B8tP3fi35SttBYkO5P-9WuRAr

script for camera does work. I need to free move on X-Y. 

I think it's shaking of player, not camera.

So, sorry, that script was not correct.  There should be a newer version that actually works.  I don't get any problems in your project with or without that script, however.  So there must be more going on.  Can you explain how to reproduce the jitteryness in more detail?

Just repeat like in this video https://streamable.com/mdab2h

You must go in corner and move player(watch for joystick on video!!). Player start shaking if angle of move != 45 or 90.

(+3)

Ah!  Okay!  I think I see the problem.

...you aren't using the script.

You call it in your step event, yes, but you aren't USING it.  You never set movement_direction or move_speed.  And then you have a whole bunch of your own place_meeting calls down below and you set your x and y position manually.

You should almost never be setting your object's x and y position while using this script.  The clamp to keep it in the room is okay, but there should be no need to do additional place_meeting calls for world collision.