2022-06-23 08:58 AM
I am trying to create a busy circle (such as the one that shows up when a web page is loading). Instead of circle I would like to use a custom image. I used TextureMapper for this. But I don't get continuous and smooth rotation of image. Image makes one rotation, slows down and stops and then restarts. I am attaching the sample project I was using. Also, image appearance distorts as it makes the rotation. Please advice.
Also, please advice if there is a different way to do this.
Solved! Go to Solution.
2022-06-27 01:05 AM
Hello BGuth.1,
About your rotation you can use the handleTickEvent function and then you can set the Z angle of your TextureMapper at each tick. Something like this :
void MainView::handleTickEvent() {
textureMapperImage.setZAngle(textureMapperImage.getZAngle() + 0.03);
textureMapperImage.invalidate();
}
You can get inspiration from the project I put in attachment.
/Osman
2022-06-27 01:05 AM
Hello BGuth.1,
About your rotation you can use the handleTickEvent function and then you can set the Z angle of your TextureMapper at each tick. Something like this :
void MainView::handleTickEvent() {
textureMapperImage.setZAngle(textureMapperImage.getZAngle() + 0.03);
textureMapperImage.invalidate();
}
You can get inspiration from the project I put in attachment.
/Osman
2022-06-27 08:13 AM
Thank you @Osman SOYKURT . I had to use textureMapperImage.updateZAngle() in my version i.e. 4.16.1. But it worked. Thanks for the help.