Unreal Engine C++ Camera Boom Socket with Scroll Zoom!

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

КОМЕНТАРІ • 15

  • @dimoronen
    @dimoronen 2 роки тому +3

    Not many comments here but I wanted to say this was very straight to the point and one of the better tutorials I've seen on youtube. Thanks and keep it up my dude! :)

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

      Thank you for the kind words.

  • @Phocusnick
    @Phocusnick Рік тому +1

    Thanks, this video has helped me with understanding of Axis Mechanics!

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

      I’m happy I could help :)

  • @ROSALIEIK
    @ROSALIEIK 2 роки тому +1

    IT WOOOORKED!!!! You smart.

  • @gildomarjunior5726
    @gildomarjunior5726 2 роки тому +1

    Thx a lot, happy new year!

    • @sudokid
      @sudokid  2 роки тому +1

      Thank you, and I hope your year is going well.

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

    Nice

  • @ms2649
    @ms2649 Рік тому +1

    in UE5.3.1 *const float NewTargetArmLength = CameraBoom->TargetArmLength + Value * ZoomStep;* seems to be causing a crash what can be done to prevent it?
    a temporary fix i found was to keep track of the length with another variable thats also set to the default one (but doesnt looks less clean that way)

    • @sudokid
      @sudokid  Рік тому +1

      I have not played around with UE 5.3 yet but I'll test this out over the weekend and get back to you.

    • @ms2649
      @ms2649 Рік тому +1

      ​@@sudokid i have modified a slight bit from the video since I'm using enhanced input.
      EDIT: for some reason the CameraBoom has no parrent (idk how that happened)
      void AProject_1x1Character::CameraZoom(const FInputActionValue &IA_Value)
      {
      // input is a Vector1D (float)
      float Value = IA_Value.Get();
      if (Value == 0.0f || !Controller) return; // Either we dont have a controller or the input isnt actually anything
      const float NewTargetArmLength = CameraBoom->TargetArmLength + Value * ZoomStep;
      CameraBoom->TargetArmLength = FMath::Clamp(NewTargetArmLength, CameraMinZoom, CameraMaxZoom); ;
      if(GEngine)
      GEngine->AddOnScreenDebugMessage(-1, 1.f, FColor::Yellow, FString::Printf(TEXT("Current camera distance is '%f' "), CurrentTargetArmLength));
      }

    • @ms2649
      @ms2649 Рік тому +1

      ​@@sudokid i remade the project and now it works -, I for some reason cant get the camera connected to the socket now-

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

      @@ms2649 I'm guessing you got it all sorted out?

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

      @@sudokid yes, i ended up remaking the project and moving over all of the stuff

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

    How to create cameraboom cant find one?