Movement is now much smoother for the easing functions and I can pan around better, but it's hard coded to only do pan at the moment.

This commit is contained in:
Zed A. Shaw 2025-11-09 01:40:15 -05:00
parent 2ebefcce05
commit 0d326089f7
8 changed files with 37 additions and 47 deletions

View file

@ -40,8 +40,15 @@ namespace cinematic {
anim = MGR.animations.at(name);
}
void Camera::position(float x, float y) {
anim.min_x = x;
anim.min_y = y;
}
void Camera::move(sf::RenderTexture& target, sf::Vector2f pos) {
sf::View zoom;
anim.max_x = pos.x;
anim.max_y = pos.y;
anim.apply(zoom, pos, size);
target.setView(zoom);
}