- Code: Select all
view.x+=10;
view.x+=10;
angle=direction(x, y, event.x, event.y);
directional_velocity=distance(x, y, event.x, event.y)/2;
arcreamer wrote:I like how it adjusting the last digit can change the speed of the view following the actor, but for some reason when I hit play, the view drops to the bottom right and i can barely even see my charactor's feet on top left corner of the screen
angle=direction(x, y, event.x - width * 0.5, event.y - height * 0.5);
directional_velocity=distance(x, y, event.x - width * 0.5, event.y - height * 0.5)/2;
x=min(max(x, -320), 5680); // This limits the the views "x" coordinates so they cant go any further left than -320, or no further right than 5680.
y=min(max(y, -240), -240); // This limits the views "y" coordinates so they cant go any further up than -240, or any lower than -240. So it locks it in place.
Users browsing this forum: No registered users and 1 guest