UE4 - Easy Diablo III local co-op camera system

  Рет қаралды 2,076

Unreal Solver

Unreal Solver

Күн бұрын

Пікірлер: 8
@damian8051
@damian8051 Жыл бұрын
This is really helpful thank you. What I'm going to try and work out is how to store all player refs on begin play and them add their mesh locations in a foreach
@UnrealSolver
@UnrealSolver Жыл бұрын
Thank you for your words, glad to hear it was something useful! ❤️‍🔥 Easiest method (for your question) would be to use GetAllActorsOfClass where the class is the Player Blueprint, pull out from the blue pin and type “location” to find GetActorWorldLocation (or sth similar) and Add to Array (you can create an array of vectors beforehand or create this Add macro node, connect the vector and then right click on the Yellow Squarish Array Reference and select “promote to variable”) Then you will be able to iterate through them later using ForEachLoop ;) To find the middle point of multiple actors a good method will be to make a double ForEachLoop to compare distances between all actors, additionally you will need a Float variable (can be a local variable in a Function that will calculate it) to store the found length and compare if it’s longer than the previous ones found Remember that you have a node called “Distance(vector)” so you can check distances easily as a float, the loops will simply compare if ActualDistance > Float Variable distance and if TRUE = save the float to that value and both vectors (so you can still refer to them, you can use a Local Variables again to make no mess in main BP) You want to save vectors because at the end of the both loops you need their locations, get the middle point as on my video and that’s gonna be the camera placement Hope that helps… and doesn’t confuse much 😆✌️
@damian8051
@damian8051 Жыл бұрын
@@UnrealSolver Thats perfect!, thank you for taking the time to write that out, thats very kind
@armeddreams9141
@armeddreams9141 Жыл бұрын
How do you do this with characters that spawns in, instead of ones that are already in the level. I'm not sure how to get references to the playercharacter blueprints when new players are created on spawn
@UnrealSolver
@UnrealSolver Жыл бұрын
You can use a Is Valid node and make a loop/timer that will check for validity - if Player is not valid - continue loop, if is valid - stop the loop and use his reference (which you check if is valid or not, and you can make it valid by the spawning Event) to perform the camera movement part Valid Variable = non-empty, non destroyed nor pending kill, meaning that when Player2 Reference Variable value returns none/nothing (which it does by default) it’s invalid, once you use Set node of the variable and connect the spawned Player as input - you just made it valid, and this will work as a switch in your timer/loop to end it and start using the reference to the camera code ;)
@impavidusstudios1286
@impavidusstudios1286 3 жыл бұрын
You are the BOMB!! Thanks man!!!! I know it's not the same username but this is my company channel/name. I really appreciate it! Right now the camera is a touch far away following your tutorial but I can always mess with the numbers! I got to the end though and everything was like NOT working right and I'm like wtf did I do wrong! Well, I put all the code in Event Begin Play for some reason lol and I had the collision still on so it was like clipping. But now it works wonderfully!! Thank you!!
@impavidusstudios1286
@impavidusstudios1286 3 жыл бұрын
Got another video idea for you or a branch off of this one! To be able to lock the characters from getting too far away from each other! Just a thought!
@UnrealSolver
@UnrealSolver 3 жыл бұрын
Glad to hear you got it all together! Like said at the end of my video - wish you the best with your project ;]
Learning Unreal Engine in One Month to make a Game!
15:25
Will Hess
Рет қаралды 97 М.
Hoodie gets wicked makeover! 😲
00:47
Justin Flom
Рет қаралды 126 МЛН
They Chose Kindness Over Abuse in Their Team #shorts
00:20
I migliori trucchetti di Fabiosa
Рет қаралды 12 МЛН
Who's spending her birthday with Harley Quinn on halloween?#Harley Quinn #joker
01:00
Harley Quinn with the Joker
Рет қаралды 26 МЛН
бабл ти гель для душа // Eva mash
01:00
EVA mash
Рет қаралды 9 МЛН
Making an Enemy for my Beat 'em up
5:39
Cobra Code
Рет қаралды 9 М.
The REAL Reason Unreal Engine VFX Looks FAKE
6:58
Joshua M Kerr
Рет қаралды 507 М.
Anti-Ghosting Temporal AA - Unreal Engine 4 Guide
10:11
Tefel - Astro Colony
Рет қаралды 43 М.
UE4 Tutorial - Local Multiplayer Setup (Shared Screen)
5:34
TheSujayChand
Рет қаралды 3,5 М.
Why I’m switching from Unity to Unreal Engine
9:02
LixianTV
Рет қаралды 1,1 МЛН
Unreal Engine 5 Tutorial -  Action RPG Part 1: Movement
13:53
Ryan Laley
Рет қаралды 95 М.
How to set up local/split-screen Multiplayer in Unreal Engine 5!
4:58
UE5 Setting up Local Multiplayer / MP#1
11:12
ProfMoto
Рет қаралды 8 М.
10 Unreal Engine 5 PLUGINS I can't live without!
9:37
Cinecom.net
Рет қаралды 584 М.
Кто-то купил WinRar? #shorts #шортс #новости #факты
0:53
This is Хорошо
Рет қаралды 4,3 МЛН
Apple Intelligence vs Galaxy Ai✨ #Shorts
0:19
lifegoodd
Рет қаралды 3,6 МЛН
Улучшил свой айфон!
0:17
По ту сторону Гугла
Рет қаралды 3,9 МЛН
Samsung S4 win this 💀 #trollface #troll #trending #trend #viral
0:19
Okotanis Gaming
Рет қаралды 3,6 МЛН