Thanks, very useful explanation of DrawTexturePro. I'm making an engine for a game and then I tried to use DrawTexturePro but wasn't understanding very well origin combined with rotation parameters.
I am seeing results that seem to tell me that either : 1. Using a larger destination rectangle size results in a scale factor being applied to destination [x,y] members of dest rectangle . 2. I am losing my mind . So , what I mean is , if your graphic is 2x2 and your destination rectangle is 20x20 , you have to divide the .x and .y by 10 to offset weird translation issues .... Can anyone confirm or deny ?
When the texture is in one place, there is no problem rotating it. But when the texture moves, then when turning, all sorts of distortions, shifts and problems begin. =(
I cant seem to be able to draw a texture for the background. It just doesnt appear at all. I have a rectangle for the screen just like you, but it just doesnt work when i put in the same things into the drawtexturepro. Could i be doing something wrong somewhere?
When you call the texture is important. Look over the examples in raylib and be sure you are drawing the texture after you clear the background. Other than that, nothing more can be said without seeing code.
Thank you! I was doing all kinds of math to try to compensate for rotating from the corner but this is much better!
Nice thank you
Thank you, love your raylib tutorials.
Thanks, very useful explanation of DrawTexturePro. I'm making an engine for a game and then I tried to use DrawTexturePro but wasn't understanding very well origin combined with rotation parameters.
thx for this video, it was what i needed in my controls
this was good! Thank you!
I am seeing results that seem to tell me that either :
1. Using a larger destination rectangle size results in a scale factor being applied to destination [x,y] members of dest rectangle .
2. I am losing my mind .
So , what I mean is , if your graphic is 2x2 and your destination rectangle is 20x20 , you have to divide the .x and .y by 10 to offset weird translation issues ....
Can anyone confirm or deny ?
When the texture is in one place, there is no problem rotating it. But when the texture moves, then when turning, all sorts of distortions, shifts and problems begin. =(
amazing video
thanks, super useful
Thanks a lot!
I cant seem to be able to draw a texture for the background. It just doesnt appear at all. I have a rectangle for the screen just like you, but it just doesnt work when i put in the same things into the drawtexturepro. Could i be doing something wrong somewhere?
When you call the texture is important. Look over the examples in raylib and be sure you are drawing the texture after you clear the background. Other than that, nothing more can be said without seeing code.
How can I flip horizontally an image with drawtexturepro?
Set the width of the source rect to the negative