How To Make A Spline-Based Side-Scroller Camera In Unreal Engine

Поделиться
HTML-код
  • Опубликовано: 25 сен 2024
  • Here's how to create a spline-based camera system for your side-scroller games in Unreal Engine 4 and 5. The camera will follow a spline path that you can create in your level.
    Get access to the project files and more on my Patreon: / mattaspland
    #UE5 #UnrealEngine5 #UE5Tutorial
    _________________________________________________________________________
    What I use:
    ⌨️Keyboard: amzn.to/3TMYuly
    🖱️Mouse: amzn.to/3JNYgWD
    🎧Headphones: amzn.to/3z8OfhM
    💺Gaming Chair: amzn.to/3M1VM9V
    🎙️Microphone: amzn.to/3FSxnQ8
    🎙️Mic Power Supply: amzn.to/3FTXt5f
    🖥️Monitor (X2): amzn.to/3LSsMkT
    🖥️Monitor (X1): amzn.to/3FSd9WS
    🦾Dual Monitor Arm: amzn.to/3nvABCC
    🦾Monitor Arm: amzn.to/40pKJvi
    📷Webcam: amzn.to/3lIlRA2
    📷DSLR: amzn.to/3lKbjQI
    🔥Cable Management Tray: amzn.to/3ZwzEaQ
    🔥Cable Management Sleeve: amzn.to/3M6U5Yu
    My PC Specs:
    GPU: amzn.to/3JHLHMx
    CPU: amzn.to/40hcupY
    RAM: amzn.to/40iHd67
    Motherboard: amzn.to/3FRne6e
    _________________________________________________________________________
    🔥Subscribe: / @mattaspland
    💬Discord: / discord
    🐦Twitter: / matt_aspland
    📷Instagram: / matt_aspland_
    🔗All: linktr.ee/Matt...
    _________________________________________________________________________
    Support Me:
    Patreon: / mattaspland
    PayPal: www.paypal.com...
    Ko-Fi: ko-fi.com/matt...
    _________________________________________________________________________
    To access the project files and screenshots from the video, check out my Patreon above!
    My Public Video List: trello.com/b/7...
    Unreal Engine 4 Tutorials Playlist: • Unreal Engine 4 Tutorials
    Unreal Engine 5 Tutorials Playlist: • Unreal Engine 5 Tutorials
    The Basics Of Nodes Playlist: • The Basics Of Nodes In...
    _________________________________________________________________________
    ♫ Outro Song: Kronicle - Chill Noons

Комментарии • 53

  • @Kiran.KillStreak
    @Kiran.KillStreak Год назад +5

    even tough i really don't need this camera follow feature , I still watched ,I might learn a new thing, and I did. Thanks for tutos. 👍

  • @willcarattini
    @willcarattini 10 месяцев назад +4

    Thanks for this, I adapted this to make a river water sound follow a player along a spline. Works really well.

  • @gamesplayeraryan6165
    @gamesplayeraryan6165 Год назад +6

    You never disappointment us

  • @tomhikon
    @tomhikon Год назад +1

    Have 3 days to make a 2-D game for class and am not about to get learning paper2d rn. It'll have to do. You saved me a ton of hassle thank you!

  • @jornzwaagstra1150
    @jornzwaagstra1150 4 месяца назад +1

    You can Alter this code 4:30 by spliting the sctruct pin of set world location and only giving it the x and z value of Vinterp and give the Y a custom value (which is essentailly your camera arm length ). now you can put the spline directly on the players path.

  • @penguinlord9984
    @penguinlord9984 Год назад +2

    Oh dang I needed this. This is awesome! Thanks!

  • @seriosarge
    @seriosarge Год назад +8

    Hey! Thanks for nice tutorial. Can you make a small addition to this: a way to 'override' camera controls. For example: most of time camera sticks to character, like default, but on certain places it goes on spline, then, after exiting override zone, it returns to default state.
    I saw it on "some unreal tricks you don't know" video (from Epics I guess), there was a really easy way to override camera controls, but can't find it now.

    • @steve_rico
      @steve_rico 9 месяцев назад

      In the UE documentation there is a box collision static camera switching tutorial.
      This provides the basics needed to switch between cameras.
      You can apply the logic to any multiple camera mechanics and behaviours.

  • @Subj3kt1
    @Subj3kt1 Год назад +1

    Exactly what I was looking for. Thanks Matt :D

  • @forcepower7116
    @forcepower7116 11 месяцев назад +1

    thanks mate, perfekt as always

  • @Jax1Million
    @Jax1Million 11 месяцев назад +1

    hi matt thanks again for a brilliant tutorial, is there anyway you could another video on this but explain (if its possible) how you can rotate and off set the camera once you have it set to the spline please. thanks appreciate all the work you do.

  • @jhonyfernandez2703
    @jhonyfernandez2703 24 дня назад

    Thanks!

  • @Zireael_Daifuku
    @Zireael_Daifuku Год назад +3

    I can't create an 'event tick' because I'v already one for something else. Can I use a 'sequence' node after my 'event tick' to have my first system and then this camera spline?

    • @Zireael_Daifuku
      @Zireael_Daifuku Год назад +5

      Ok it seemed to work. But now I would like to know if I can have 2 or more camera splines? Because I have several possibilities of directions in my level.

    • @diablasquegaming6655
      @diablasquegaming6655 Год назад +3

      @@Zireael_Daifuku I have the same "problem". If anyone can help please 🙏

    • @LightKey_Studio
      @LightKey_Studio 5 месяцев назад

      @@Zireael_Daifuku Did you found the solution?

  • @PatrickTheDM
    @PatrickTheDM Год назад

    Just in case you plan to have some action on the side. 😃 Good tutorial Matt.

  • @javierdelcarpio9490
    @javierdelcarpio9490 Год назад +1

    Is it possible to create an offset in the location of the camera so that it is ahead of the actor?

  • @HD-uq3bq
    @HD-uq3bq Год назад +1

    Please I am really needs your help. If you making this tutorial I will so grateful for you and supported you! Please..
    You can make a tutorial about a character from the ground picking up some weapons and using them. Different weapons sword, pistol and axe. And each weapon will have its own animation without the inventory system, but each weapon will be activated with buttons. For example the Q button of the gun and the R button of the ax and the T button of the Hammer to attack. Like in Bloodborne, dmc and dark souls

  • @KADstudioArchitect
    @KADstudioArchitect 19 дней назад

    Hello, I Made few points and curve for VR Camera but rotations are not smooth at all and rotate sudden (step-step)

  • @suskung1252
    @suskung1252 Год назад

    Thank you so much!!💪💪🗿🗿

  • @johndoe35717
    @johndoe35717 Год назад +1

    Please make an episode on mobile controls

  • @CharlieRacing83
    @CharlieRacing83 7 месяцев назад

    Hello, thanks a lot for this video, it helps me a lot, there’s any way to make the camera rotates along the spline?

  • @therealmpk7651
    @therealmpk7651 5 месяцев назад

    to me the camera follows the ball character at a lower speed than the ball is moving and then after the ball is out of view the camera returns to it's original position and it doesn't move along the spline, just in place and in relation to the movement inputs I press..
    I have the EXACT same code, I have checked this video so many times just to make sure of not making any misteps along the way. Still not sure how to fix this.. please help... This is kind of an urgent project

  • @dennischinedu7282
    @dennischinedu7282 Год назад

    Hi Matt. Could you please make a saveable skill tree component tutorial please

  • @denjodynamite
    @denjodynamite 4 месяца назад

    hey i know its not the newest video, but i have a question i cant solve. you know a way how to use this spline system with more than one spline?

  • @OmarUltraProMax
    @OmarUltraProMax Год назад +3

    Hi Matt. If I try to package my game, it shows me this error: „PackagingResults: Error: Unknown Error“. Can anyone help me 😢

    • @omerdobronxx
      @omerdobronxx Год назад

      Review the coding of your plugins in the game or if there are any other red errors on that message, investigate them.
      (my english is not good I'm sorry.)

  • @ZenichiroZenix
    @ZenichiroZenix 21 день назад

    Hey Matt!, i known it's been sometime since you post this and you probably don't even remember anything about it, but i'm working with this spline system, and i tried to make the character go forward into the screen not only left and right, so the camera does go on the spline i set up properly but does not wait for the character so it goes forward when i hit W but the player it's outside of the screen, any help?

  • @mauroariel84
    @mauroariel84 Год назад

    Thanks for the tutorial, how do I make the camera always be at the same distance from the pawn ? x axis

  • @artadecram_9624
    @artadecram_9624 Год назад

    Thanks for solution! As we know -in common 3d-editor - like maya or 3ds max - we can smooth spline or rebuild it that means that instead 5 point inside we will get 10 ones - can we do it in Unreal engine? What operations can i do with spline in UE?

  • @Uchidan
    @Uchidan Год назад

    Any chance we could get some Common UI Tutorials? I could really use em myself.

  • @nadinegutierrez599
    @nadinegutierrez599 Год назад +3

    Hey there Matt!
    I have a camera rotation problem with your system.
    I need to be able to set specific camera rotation at the spline positions that I place in its path.
    Meaning that I want my character to climb a tree and the spline needs to be twisted while climbing until the top. So in the end, I have a spiral spline that makes its way to the top.
    The thing is that the camera always faces in one direction...
    I don't want to follow the character either, but I want to control the camera's angle in every spline position so it's always facing the tree.
    Any help, please??

    • @Zireael_Daifuku
      @Zireael_Daifuku Год назад +2

      Ohh I have the exact same problem, I'm currently looking to have a rotation with the camera spline. Did you find a solution?

    • @nadinegutierrez599
      @nadinegutierrez599 Год назад

      @@Zireael_Daifuku hii!
      Unfortunately, not yet :(
      I have been using Unity until now even though I worked in Unreal for a few game jams and for creating some blockouts, so I'm kind of new with the engine.
      So I was looking for something similar to Cinemachine for my game (not movies, like all the amount of tutorials that I saw with camera rails).
      But I can't find anything, and it's just a simple question lol... All I see is people trying to sell their already working blueprints at the store instead of teaching how to achieve the result. Sad but comprehensible I guess.
      I'll keep trying!

    • @Zireael_Daifuku
      @Zireael_Daifuku Год назад +1

      @@nadinegutierrez599 Yeah I'll keep trying too! If I find something, I'll tell it here.

    • @markthompson112
      @markthompson112 11 месяцев назад

      @@nadinegutierrez599 A lot of Cinemachines features are found in the "Camera Boom" (aka the spring arm component), this BP actually removes all those features by decoupling the camera from the component its attached to. A better solution is to use the camera boom as the ref plugged into SetWorldLocation and reduce the arm length of the component. On top of that, you can get the rotation of a point on a spline using "Find Transform at nearest location" thought I would encourage for rotations to use distance along spline or something a little more reliable, then set the rotation of the camera boom to that rotation (you may also have to add an offset)

  • @rodroeq7956
    @rodroeq7956 Год назад

    I wonder if the movement in games like Inside works like this. You know side scrollers that don't go exactly left and right but you move like in rails.

  • @zapking4244
    @zapking4244 Год назад

    This video was super helpful! Thank you! Would you also be able to make a video on a dynamic Aim Down sight mechanic for a first person shooter that can work for different guns and scope locations? There surprisingly aren’t many videos about that on the internet

  • @bigsky7617
    @bigsky7617 Год назад

    Matt (or anyone!), do you have any tutorials or advice on a boardgame-like movement system based on number result (dice roll)? I'm trying to work something up with making each tile an actor and use "move to actor" but I can't figure it out. I know this is vague, I didn't want to leave an essay. Anything would be helpful, and thanks for your amazing tutorials!

  • @KurixTV
    @KurixTV Год назад

    Hi , maybe make a video about an anxiety system in ue4 ?

  • @nathanialmcculloch152
    @nathanialmcculloch152 9 месяцев назад

    I just cant get this to work lmao. I've spent literal hours trying to figure it out.
    I've tried on version 5.1 and 5.3 in 3rd person template and the camera just jumps to 0 0 0 and wont move.
    Any help please?

  • @tiebei2548
    @tiebei2548 Год назад

    I can't seem to figure this out, I believe it has something to do with the preloaded settings for BP_ThirdPersonCharacter, but I'm not sure where. The camera just sits in the "middle" of the map when starting the game. The camera moves when the player moves but it's nowhere near where it is in the video even after moving and rotating the spline. I added a sequence between Event BeginPlay and Get Actor of Class in this video and Cast to Player Controller from the default BP_ThirdPersonCharacter blueprint.

    • @tiebei2548
      @tiebei2548 Год назад +1

      It took me three times of building this to realize that I never connected VInterp To to return a value to Set World Location. Now to figure out how to et the cameras to face the other way.

  • @rifat.ahammed
    @rifat.ahammed Год назад

    Great

  • @suce2853
    @suce2853 Год назад +6

    I can't create Event BeginPLay because it is already in use in the controller. How I can fix this

    • @eve_hub
      @eve_hub Год назад +4

      You can add sequence node at event begin play

    • @Zireael_Daifuku
      @Zireael_Daifuku Год назад +2

      @@eve_hub I can't create an 'event tick' because I've already one for something else.
      Can I also use a 'sequence' node after my 'event tick' to have my first system and then this camera spline?

    • @eve_hub
      @eve_hub Год назад

      @@Zireael_Daifuku yss

  • @10C45E
    @10C45E 6 месяцев назад

    Do you know how to stop the camera from teleporting between spline points?

    • @jornzwaagstra1150
      @jornzwaagstra1150 4 месяца назад

      make the interpspeed higher or lower maybe or add more points

  • @Jax1Million
    @Jax1Million 11 месяцев назад

    lol i litearlly just worked it out. sorry