I am making a Squash game in scratch and I want the racket-sprite to always be straight "infront of me" as I move (with the mouse) around the court. This almost work with my code only that the racket is not rotating smoothly as I change direction but rather skipping erratically. It is difficult to see but it appears to skip between increments of 90 degrease (0, 90, 180 etc.) instead of rotating smootly between all the degrees (0, 1, 2, 3, 4 deg etc.) as I change direction. The unsmooth skipping is worse when moving slowly. Please see attched code
When I take away the "set x to (mouse x)
" and "set y to (mouse y)
"-block it rotates nice and smoothly so it is probably something there with the interaction between these two instructions of rotating and following the cursor that causes the problem.
I have also tried for example to add "set rotation style" to all around but no differens.
You don't need the
set rotation style
or thego to
block. Just this will suffice: