summaryrefslogtreecommitdiff
path: root/scene/3d
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-10-13 08:56:49 +0200
committerGitHub <noreply@github.com>2019-10-13 08:56:49 +0200
commit3bf3a0abaabd2f7c9da78a0f847b4c9a5a6ad837 (patch)
treeba3ea7b75eb6e14799191b9a0ce662eb96063891 /scene/3d
parenta9fe81efbd748a16a0c01d822d0b08eacea04880 (diff)
parentb27ec4aea736313f3931b7d8019132533febf4a7 (diff)
Merge pull request #32791 from groud/fix_sprite_frame_coords
Fixes Sprite's frame_coords
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/sprite_3d.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp
index a9dacc442c..aec672d2c7 100644
--- a/scene/3d/sprite_3d.cpp
+++ b/scene/3d/sprite_3d.cpp
@@ -593,8 +593,8 @@ int Sprite3D::get_frame() const {
}
void Sprite3D::set_frame_coords(const Vector2 &p_coord) {
- ERR_FAIL_INDEX(int(p_coord.x), vframes);
- ERR_FAIL_INDEX(int(p_coord.y), hframes);
+ ERR_FAIL_INDEX(int(p_coord.x), hframes);
+ ERR_FAIL_INDEX(int(p_coord.y), vframes);
set_frame(int(p_coord.y) * hframes + int(p_coord.x));
}