Applied scale to sprite rotation point

This commit is contained in:
n00b
2025-05-01 15:05:46 -04:00
parent 51c64fa857
commit daac85c26a
3 changed files with 30 additions and 30 deletions

View File

@@ -1315,11 +1315,11 @@ void drawSprites(int canvas_id)
//position.set(x, y);
rotationPoint.set(x + (src_size.Width/2), y + (src_size.Height/2)); //TODO: need to account for offset once that is implemented
rotation = -1 * (sprite->physics.body->GetAngle() * RAD_TO_DEG); //convert Box2D radians to degrees
scale.set(sprite->scale.X, sprite->scale.Y);
rotationPoint.set(x + (src_size.Width/2)*scale.X, y + (src_size.Height/2)*scale.Y); //TODO: need to account for offset once that is implemented
rotation = -1 * (sprite->physics.body->GetAngle() * RAD_TO_DEG); //convert Box2D radians to degrees
color.set(sprite->alpha,
sprite->color_mod.getRed(),
sprite->color_mod.getGreen(),

View File

@@ -1248,7 +1248,7 @@
1734372058 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/RealisticWater.h
<irrlicht.h>
1744470508 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_gfx.h
1745698805 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_gfx.h
"SDL.h"
<SDL2/SDL.h>
<irrlicht.h>
@@ -2492,7 +2492,7 @@
<cmath>
<cstdint>
1744672115 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_spritelib.h
1746124624 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_spritelib.h
"SDL.h"
<SDL2/SDL.h>
"rc_sprite2D.h"