@@ -515,10 +515,33 @@ public void drawDebug(
515515 double originY ) {
516516 buffer .push ();
517517 buffer .translate ((float ) x , (float ) -y );
518- buffer .fill (Window .DEBUG_COLOR [0 ], Window .DEBUG_COLOR [1 ], Window .DEBUG_COLOR [1 ]);
518+ buffer .fill (Window .DEBUG_COLOR [0 ], Window .DEBUG_COLOR [1 ], Window .DEBUG_COLOR [2 ]);
519519 buffer .textAlign (PConstants .CENTER );
520520 buffer .text ("Direction: " + Math .round ((degrees ) * 100 ) / 100.0 , 0 , -this .height / 2.0f - 10 );
521521 buffer .text ("(" + Math .round (x * 100 ) / 100.0 + ", " + Math .round (y * 100 ) / 100.0 + ")" , 0 , 0 );
522+
523+ // Draw origin marker and offset visualization
524+ if (originX != 0 || originY != 0 ) {
525+ // Draw text showing origin offset
526+ buffer .text (
527+ "Origin: (" + Math .round (originX * 100 ) / 100.0 + ", " + Math .round (originY * 100 ) / 100.0
528+ + ")" ,
529+ 0 ,
530+ this .height / 2.0f + 20 );
531+
532+ // Draw a line from the sprite position to where the image center is drawn
533+ buffer .stroke (Window .DEBUG_COLOR [0 ], Window .DEBUG_COLOR [1 ], Window .DEBUG_COLOR [2 ]);
534+ buffer .strokeWeight (1 );
535+ buffer .line (0 , 0 , (float ) -originX , (float ) originY );
536+
537+ // Draw a small cross at the origin point (sprite position)
538+ buffer .line (-5 , 0 , 5 , 0 );
539+ buffer .line (0 , -5 , 0 , 5 );
540+
541+ // Draw a small circle at the image center
542+ buffer .noFill ();
543+ buffer .ellipse ((float ) -originX , (float ) originY , 8 , 8 );
544+ }
522545 buffer .pop ();
523546 }
524547
0 commit comments