D
DustyHill
Guest
Hey guys, I have a problem with my camera. I created the "between player and cursor" object, using "mean()" function:
Step Event (object between player and cursor):
Ok?
So, the problem is speed of the camera...
If speed of the camera is equal to speed of the player (I mean, I use x+=PLAYERSPEED (Step Event) to move the player, not hspeed), then if, for example, player go to right, I can't move camera to the same direction. (Obviously, because speeds are equal to each other)
If speed of the camera is faster, than speed of the player, then view starts twitch.
And if speed of the camera is slower, than speed of the player, camera can't "catch" the player and player is getting away from view.
May be, this way to do it is completely wrong...
Step Event (object between player and cursor):
Code:
meanX = mean(PLAYEROBJ.x, mouse_x)
meanY = mean(PLAYEROBJ.y, mouse_y)
x = meanX
y = meanY
So, the problem is speed of the camera...
If speed of the camera is equal to speed of the player (I mean, I use x+=PLAYERSPEED (Step Event) to move the player, not hspeed), then if, for example, player go to right, I can't move camera to the same direction. (Obviously, because speeds are equal to each other)
If speed of the camera is faster, than speed of the player, then view starts twitch.
And if speed of the camera is slower, than speed of the player, camera can't "catch" the player and player is getting away from view.
May be, this way to do it is completely wrong...