Godot Recipe: Touchscreen Camera Control

Поділитися
Вставка
  • Опубліковано 16 січ 2025

КОМЕНТАРІ • 33

  • @upyours2707
    @upyours2707 4 роки тому +2

    Uh another topic I havent touched yet. Now I have a reason to try and make a phone game. Thank you! And congratulations to almost 31k subs!

  • @ChupoCro
    @ChupoCro 4 роки тому

    During this lockdown, since the 30th of March when I discovered your channel I watched every video starting from "Learning to Code with Python: Lesson 1.9 - Rock Paper Scissors Game". I was usually watching the videos from around 2 am until around 9 - 11 am and on 15th of April @ 9:10 am I finished watching this very video which is the most recent one at the time I am writing this comment. I was programming similar algorithms in C/C++ and some other languages without using the engine but it was interesting to watch how it could be done using Godot and your videos have good auto-generated subtitles which makes them suitable for watching on very low volume not to disturb anyone during the night. You explained everything very well and here you are a few of my suggestions about what you could do next.
    1. An overview about how to recreate some real building + its surroundings as 3D level for using in FPS/TPS examples. I am sure a lot of people would like to recreate their house + their backyard, their school building or some other building they know - for using in FPS. Next step could be making destructible windows and making the bullets could damage the walls.
    2. Series of videos about recreating some interesting algorithms from old 8 bit and arcade games. For example, the phisycs from ZX Spectrum's game Thrust II (1986. by Firebird) where the goal was to lift a heavy mass and transport it to the target place by flying in the gravity field. When the space ship was in the close range to the mass, the mass was attached to the ship by a tractor beam which acted as a rod. It would be interesting to show how to simulate the difference between simulating the rod and the rope (which is flexible) for attaching the mass to the ship. Another example could be generating a pseudo 3D endless road like in Out Run or similar racing games or to generate a destructible level as in Phoenix or attack formations as in Galaxian or maybe a wireframe tank battle as in Battlezone.

  • @DefaultHeathen
    @DefaultHeathen 3 роки тому

    Thanks a ton! I'm not going to ask for you to do anything else like everyone else is doing! Thanks for sharing!

  • @igbowgames
    @igbowgames 4 роки тому +1

    we missed you !!!

    • @Kidscancode
      @Kidscancode  4 роки тому +4

      It's been hard to find the time to make videos. I've been adding to godotrecipes.com though!

  • @jorgegomes83
    @jorgegomes83 4 роки тому +2

    Hey! Welcome back!

    • @Kidscancode
      @Kidscancode  4 роки тому +3

      Thanks! School has been keeping me busy, but now I have a little extra time!

  • @Heavypoly
    @Heavypoly 4 роки тому

    Perfect Timing!

  • @Eletromago
    @Eletromago 3 роки тому +3

    Nice, but I'm used to moving the camera in the opposite direction to the drag, for that, if you prefer too, just multiply this line by -1:
    "position + = event.relative * zoom.x"
    to be
    "position + = event.relative * zoom.x * -1"

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

      I dont want the camera return again to the character, because i dont have character. So can you help me what should i delete or change?

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

      @@shykitty1343 just make target_return_enabled = false easy as that as he mentioned you can do that just one change so easy

  • @faridrifai2166
    @faridrifai2166 4 роки тому +1

    Hello nice tutorial, I able to drag camera where I want, but how to limit dragable area?
    So it cant go out from map

  • @artik_mc6570
    @artik_mc6570 4 роки тому +1

    Thank you for the lessons. I may have more time now. Since we were put on remote work. Maybe I'll finally start creating games.
    (Спасибо Вам за уроки. Сейчас возможно у меня будет больше времени. Так как нас посадили на удалёную работу. Возможно наконец займусь созданием игр.)

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

    is it possible to make a tutorial for 3D scene ?

  • @MarkIsAsleep
    @MarkIsAsleep 3 роки тому

    How to handle camera drag when camera is rotated on different angle?

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

    I dont want the camera return again to the character, because i dont have character. So can you help me what should i delete or change?

  • @eruaiokoyomoh3177
    @eruaiokoyomoh3177 4 роки тому +1

    Can you please, do a tutorial for the shader functions in Godot, can your example please be a 2d shockwave effect

    • @Kidscancode
      @Kidscancode  4 роки тому

      I have a couple of shader tutorials here: kidscancode.org/godot_recipes/shaders/
      but I still need to find the time to do some more. There are lots of other good Godot shader tuts if you search YT and Google.

    • @eruaiokoyomoh3177
      @eruaiokoyomoh3177 4 роки тому

      @@Kidscancode thank you so much, but in particular I would love to learn the 2d shockwave shader effect like in Celeste or Dead cells for my game

  • @lumumdare3289
    @lumumdare3289 4 роки тому

    thanks for theses, are you doing any new series soon thats gonna be in 3.2 or 4.0 ?

    • @Kidscancode
      @Kidscancode  4 роки тому

      4.0 is still quite a ways off. I'll be doing more as soon as I have the time - remote teaching has been consuming my time.

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

    I

  • @AdamEarleArtist
    @AdamEarleArtist 4 роки тому

    Do you think Godot could access blenders cameras through mobile phones? Do you think it would be difficult?

  • @TheMangazixy
    @TheMangazixy 4 роки тому

    Thanks you for this tutorial :)

  • @newb9258
    @newb9258 4 роки тому

    Hi need a little help, i followed the tutorial and it not seem to work, i enable touch emulate and also receiving an error of "The argument 'delta' is never used in the function '_process'"

    • @Kidscancode
      @Kidscancode  4 роки тому

      That is not an error. It's a warning, just letting you know you're not using a particular variable.

  • @blackmoon1534
    @blackmoon1534 4 роки тому

    can you make equip armor? (sr for my bad englih)

  • @kushal8621
    @kushal8621 4 роки тому

    Hey friends
    Needed some help
    i want to move my character through area2d or any other node
    And I want to make my character appear double or more
    Like the game SKY by ketchapp

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

    In case anyone else has an issue with this on 3.5 Stable...
    I had to put the keys from the dictionary into an array 1st to search the dictionary using a string value...
    Here is my fix for the Screen drag event:
    if event is InputEventScreenDrag:
    events[event.index] = event
    if events.size() == 1:
    position += event.relative.rotated(rotation) * zoom.x
    elif events.size() == 2:
    var keys = events.keys()
    var key1 = keys[0]
    var key2 = keys[1]
    var touch1 = events[key1].position
    var touch2 = events[key2].position
    var drag_distance = touch1.distance_to(touch2)
    if abs(drag_distance - last_drag_distance) > zoom_sensitivity:
    var new_zoom = (1 + zoom_speed) if drag_distance < last_drag_distance else (1 - zoom_speed)
    new_zoom = clamp(zoom.x * new_zoom, min_zoom, max_zoom)
    zoom = Vector2.ONE * new_zoom
    last_drag_distance = drag_distance

  • @arturcorreia6615
    @arturcorreia6615 4 роки тому +1

    Hi, missed you! Could you make a fighting game so we can understand the logic?

    • @Kidscancode
      @Kidscancode  4 роки тому +2

      Thanks! "Fighting games is a broad topic". There's really not that much logic to a fighting game, it's mostly just hitboxes and hurtboxes. The trick is in the animations and responsive controls.
      I'm more focused on smaller, bite-size tutorials right now. Making a full game is a very time-consuming task all on its own, and making it into a tutorial adds even more. I'd prefer to stick to systems - like the "Attack Animation" one I did a little while back, which could be used in a fighting game.

  • @Pspisripoff
    @Pspisripoff 4 роки тому

    Do you still need Android Studio to make this game work on Android?
    I hate that software and I cant find another way to export directly my application to APK and instal it

    • @Goldenfightinglink
      @Goldenfightinglink 3 роки тому +1

      Yes, there is other ways to do it but it's mainly made with studio in mind.
      I never opened it more than three times and been able to properly export and install hundreds of aabs and apks for testing
      I have no idea how to do so without studio, I suggest googling