Let’s say your moving speed is 10 pixels per frame. If your tank has a rotation of 10 degrees, it would move 9.8 -> rounded to 10 pixels to the right and 1.7 -> rounded to 2 pixels down, resulting in a real move with the angle of about 12 degrees.
If you again have a rotation of 10 degrees but only move 1 pixel, the tank will move 0.98 -> rounded to 1 pixel to the right and 0.17 -> rounded to 0 pixels down. In other words, your tank will just move straight, even if you move 1 pixel 10 times.
What smooth moving does is saving the exact location you are theoretically at and displaying the rounded value. So if you move 10 times 1 pixel, it will have the same result like moving 10 pixels once, no matter at what angle.
I don’t mean it to move slower or anything, but if you move like 2 pixels per frame right now, you can only turn in 22.5 degrees steps, even if it looks smooth
You could use SmoothMover to allow movement with small rotations. You can import it by rightclicking onto the background of the class panel in Greenfoot and selecting 'Import'. Then just extend from it and you can use double coordinates.
Cool! Yeah, the actual finding of the packages folder is the main challenge for most people. I always try to tell them in the description a little bit.
Btw I'm also not very "good" at physics (as you can see by objects glitching through each other), but I am happy to see that some people appreciate the work that went into this. Kinda like your AI scenario I'm trying to create basics to acutally use in other games. That's also why I use packages.
2020/9/17
aMAZE
2020/9/14
World of Tanks 2d
2020/9/14
World of Tanks 2d
2020/9/14
Universal Bot for game
2020/9/11
World of Tanks 2d
2020/9/8
World of Tanks 2d
2020/9/6
World of Tanks 2d
2020/9/3
Physics and collision engine
2020/9/2
Physics and collision engine