Centering an Image using DrawTexturePro

Поділитися
Вставка
  • Опубліковано 26 сер 2024

КОМЕНТАРІ • 15

  • @mbattlecoder
    @mbattlecoder 4 місяці тому

    Thank you! I was doing all kinds of math to try to compensate for rotating from the corner but this is much better!

  • @Warmatx68
    @Warmatx68 3 місяці тому

    Nice thank you

  • @bejn5619
    @bejn5619 8 місяців тому

    Thank you, love your raylib tutorials.

  • @yrds96
    @yrds96 10 місяців тому

    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.

  • @rik0904
    @rik0904 Рік тому

    thx for this video, it was what i needed in my controls

  • @dryoldcrabman6890
    @dryoldcrabman6890 5 місяців тому

    this was good! Thank you!

  • @KanjiCoder_RTFM
    @KanjiCoder_RTFM 25 днів тому

    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 ?

  • @lEpIvIaKl
    @lEpIvIaKl 5 місяців тому

    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. =(

  • @gym5959
    @gym5959 8 місяців тому

    amazing video

  • @vn1446
    @vn1446 Рік тому

    thanks, super useful

  • @shinystick241
    @shinystick241 2 роки тому

    Thanks a lot!

  • @noob-killer
    @noob-killer Рік тому

    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?

    • @gamedevtutorials2935
      @gamedevtutorials2935  Рік тому

      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.

  • @manuelcipriano9195
    @manuelcipriano9195 2 роки тому

    How can I flip horizontally an image with drawtexturepro?