C++ Line Trace UE4 / Unreal Engine 4 C++
Vložit
- čas přidán 21. 08. 2024
- UE4 C++:
This playlist covers various aspects of working with C++ inside of the Unreal Engine.
This Video:
In this video, we implement a Line Trace By Channel function. These can be useful for interacting with objects you're looking at or tracing forward for weapon shots and many more things.
Links:
The beginning of this playlist: bit.ly/CPPOverv...
Download projects from any complete tutorial series and more: github.com/Dev...
Consider supporting the channel on Patreon: / devenabled
My First Pluralsight Course: app.pluralsigh...
My Second Pluralsight Course: www.pluralsigh...
My Third Pluralsight Course: app.pluralsigh...
Check out my Website: devenabled.com/
Twitter: / robbcreates
Sound Effects (BFXR): www.bfxr.net/
Get Affinity Designer: affinity.serif...
Get Unreal: www.unrealengi...
Get Some great free assets here: www.gamedevmar... Gamedev.tv Courses - Affiliate Links:
Unreal C++ Developer: www.gamedev.tv...
Unreal Multiplayer: www.gamedev.tv...
Unreal Blueprints: www.gamedev.tv...
Blender Characters: www.gamedev.tv...
In this video, we implement a Line Trace By Channel function. These can be useful for interacting with objects you're looking at or tracing forward for weapon shots and many more things.
Took a brief detour to learn how to manipulate Textures through Materials after seeing your color changes, next thing I am shooting photos of the hardwood and uploading it to the project by literally dropping it in the tray! Then dragged it right to the cubes I wanted to texturize...Granted some manipulation is needed to perfect but OMG this tool is incredible.
Unreal Engine is insane and I feel like I am barely just scratching the surface of a piece of a barely scratched surface.
Thumbs up for your great work. 😉
Not gonna lie, the way you say c++ is soothing lul
Didn't see your comment before somehow. I'll need to rewatch my video and see how I'm saying it lol.
Thanks
Thank you ! This is very well explained !
Thank you!!
At this point I ask myself what the pros with C++ in UE4 are. Don't get me wrong, I love coding and wanna learn C++, but if UE4 is more optimized for Blueprints (which are great, I used them for several years now), why should I use C++ here?
Btw great tutorial series! :D
Thanks for the compliment. If you're asking specifically, why linetrace in C++ then I'm not really suggesting that. This entire playlist is more to fill some holes in content/documentation I've found a little lacking or outdated. If you've watched other videos in this playlist you've probably picked up I'm not a huge fan of working with C++ either. In general, though it's useful to know at times as in bigger projects it can be much easier to read/manage. It can also be a requirement to understand when working with things like plugins which might not be fully supported in Unreal and require a little manual fixing to even get them to work, this usually requires C++. In general, though I work in BP, if I was doing something like a linetrace on EventTick for something that needs constant results then I might put it into a C++ class like this for performance if it starts to become an issue.
@@DevEnabled Thanks for the long reply! You're right, readability is a huge plus with text-based code, BP scripts often become a little unorganized, with connectors all over the place. With plugins or other "self-made" Tools C++ is also nice to know to understand or tweak stuff.
I almost reached the newest Tut in the playlist and learned a lot, so thanks again. I don't regret it ;D
Came to see how difficult c++ is to use in unreal since i have never used it . Starting to feel demotivated only using blueprints. The closest to c++ i have gotten is using gml which i assume is much much more basic . I want to start moving towards code again .But worried the learning curve is going to be huge
Just try to grab the low-hanging fruits on the imaginary learning tree. Maybe create a little site-project to learn and understand c++. A roll a ball game for example. Sounds super boring sure. But you can add features with your new c++ knowledge to make it funnier and better.
sweet
Do you plan on making a lock-on combat state, where the camera focuses on a single object and the character moves himself facing that point?
Thanks!
Welcome!
that is cool!
please make some sound, animation, enemy spawn, attack, movement implementation. Would be helpful. Thanks
How do you set a Trace Channel from C++ to Block / Ignore / Overlap though? In most cases, people would want to use a trace to click on objects in the world, like a button to open a door. In some cases, that button then needs to become unclickable, which would mean removing it from the trace channel. Maybe after the door automatically closes after a period of time, it sets the option back to Block to allow it to be clickable again. As of now, the only way I know to get this to work is to use the multi trace, then sort by tag, and add/remove a "clickable" tag as needed to toggle clickability. The trace channels are useless to me if I can't change them at runtime.
Do you do this professionally. In the past you have poked at that you may do this a freelancer. Have you worked on any cool projects??
Yep my Monday - Friday job is freelancing as a games programmer. I've not worked on any big titles yet as I usually get brought in for quick and early prototypes for potential game pitches which can be really fun. I also tend to avoid larger companies as I prefer the general work environment of less corporate indie companies.
@@DevEnabled Thats fair, I feel like large companies may be generally harder to work with.
back when visual studio was useful