#blueprint
1 messages ยท Page 369 of 1
Double click to open it up to see how it works.
yeah not for me that one
just loop my guy
X = Index/width
Y = Index%width
umm what
how to get the coords from an index
no im still talking about filling grids
Thata the logic youd use to fill it
ForLoop -> CreateGridActor @Location = (index%XTileSize, index/XTileSize, 1)->Store In Array
Whatever you have that represents the grid
what are we talking about
I want to just create first an address book for future objects to be spawned on
So a struct then
Thats fine
Id pop in some draw debugs to ensure correctness ๐
Did they change anything on overlap? I'm using get overlapping actors (also tried overlap event), but can't get it to work. I'm pretty sure this bp was working a few weeks ago.
- There are two actors/blueprints trying to overlap each other
- both have set to overlapAllDynamic
- overlap events on
- tried using trigger volumes in case there was something with collision model
If you're using a map you already have it. An empty map of int vector to thingy IS a grid
no i changed to array as you told me to
so now it works and I can simply get an address from array index, right?
its that v2 array in pic
was able to use a workaround with ComponentOverlapActors-function. makes absolutely no sense why this would work and not the other, but i guess it's solved
changed it from timeline to foreachloop also
what is the array OF
they're structures, what is in them?
x and y coordinates
why would you need that
its my addresses
but the address is calculatable from the index
what is the actual thing this grid is a grid of? What's the actual thing you care about, not the addresses
i want limit of -2500 to 2500 both x and y values.
Then i spawn them inside that criteria. When I destroy the spawned objects, i remove them from spawned array
i need them exactly 100 units apart
so no random -2459 values and such
how would i make it so that the child actor component on my character blueprint is set to the battery the player decides to interact with? not done much with child actors
you mean you want to get values of your child actor?
Connect 'Self' to the 'Battery' variable.
How can I save and load which pickup has already been picked up?Im struggling with this very much so any help would be very appreciated
managed to get it, i couldnt connect self to the battery before since the battery actor isnt a child actor itself
I have 4 episodes on an inventory tutorial that covers saving. Unless you're using uobjects for your item data you wont be able to follow it but the explainations might help.
Welcome to this tutorial on how to create an inventory system in Unreal Engine 5! In this video, we'll go over the concepts of setting up an inventory system using Unreal Engine's powerful Blueprint visual scripting language.
In part nine, we look at how we can start serializing our item data ready to be saved. So whether you're a beginner to U...
at this point any bit of direction counts, thank you
Step1 dont use child actor components
ever?
Ever, ignore it, find something else to use instead
care to elaborate why?
I mean, i understand that everything can be done without them, but is there a particular evil reason why?
Watch this recorded session from Unreal Fest Seattle 2024 that uncovers the truth behind Unreal Engine best practices.
Are Ticks really that problematic? Should you make all your meshes Nanite? Is the ChildActorComponent truly cursed? Should you never use Cast?
You've probably heard many of these so-called ""best practicesโ. Check out this...
They will break the question is not if, its just when
Same for structs
yeah structs suck
well yes childactors suck too
funny they dont remove it then
guess, it will break everything and maybe for super simple stuff, ok. but then again if it is simple you can do it without childbp
he says it himself they use them for very simple stuff like vfx attachments
But if you attach something to it with some logic your in it for the suffering lol
even the whole cast to child actor thing just sucks
but never thought about even the replication issues
It sucks that they suck, can't wait for scene graph
Designing a door actor inside a room actor inside a building actor is a PITA without being able to see stuff at design time
Why is this not working? The "DrainStamina" tag remains applied the whole time and is never removed even though it fires, I also checked the "return value" of the remove active effects nodes and it always returns "0" (didn't remove anything)
cant you just store the handle and remove it by handle?
I've tried as well, also didn't work
also the second half of it can be combined to a single function/event
Personally I'd probably just have a blocking tag for it
and keep the GE active
that way it can still be predicted
I can't seem to figure out the exact reason why it's not removing, because if I include the removal at the top right after it's applied it's being removed, but if I do it at the bottom 2 then it doens't get removed even if it "runs"
and the tags on the GE is correct?
yep
Ah, it's server related it seems
Somehow applying is running on server(?) and removal isn't
in the GA it has this , GE has nothing related to authority in details
ah ok ok
@verbal kayak We use CAC in Atre: Dominance Wars. But pretty much for the same thing. Our map actors can be upgraded and I wanted to allow designers to make preset displays for the tiers. So they made actors and I place those using a CAC.
But it's worth noting that this negates any and all of it's issues.
CAC runs perfectly fine AS LONG AS YOU DO NOT SAVE IT WITH THE LEVEL. It's serialization can fuck up at times. Beyond that... ๐คทโโ๏ธ It's fine. Ours are all set at runtime, so we completely bypass it's issues.
The game looks really nice from the screnshots, gives me total war warhammer vibes
How did you guys handle the units without hardcore performance drops ?
You mean the armies?
ye
The big units are just characters. Navwalking, very optimized for movement.
Armies that follow them are Mass units. KaosSpectrum had a fun time on those. ๐ He's the mastermind behind that.
that's pretty cool
oh, good to know @maiden wadi . Thank you
I was hoping to get some help with this issue we're having all of a sudden, we're a team of developers and we just noticed that we cannot Add/Remove/Change any variables of this struct without the editor crashing with this error consistently with 100% reproduction.
This is the structure of the BP in question
BaseNPC parent class
-----BaseVillager_bp child class
----------BaseVillager_Humans_bp child class
Animals_NPC is also a child of BaseNPC and I thought that was causing an issue so I temporarily removed the BaseVillager_Humans_bp from the project so I could delete that variable from the struct without crashing, then put the BaseVillager_Humans_bp back and the crash still occurs upon any further editing of the struct.
I don't see any obvious circular dependencies either
You're in for a rough road ahead. Large BP based structs such as this can become problematic when trying to change.
With it being an object base property, you'll need to go through and find everyone where the strict is used and send the specific property to null.
Once done, you should be able to remove it.
However, I'd recommend splitting your struct up into smaller ones or define the struct in C++.
at the moment I'm not sure if it's actually the struct because it was working until we suddenly noticed we couldn't edit it. I even deleted the camera component because we weren't using it and then the next crash referenced the next component in the list after the Camera
our skeletal mesh setup is a little peculiar so I'm investigating there for something that looks off.
dude I just had the most fucked time fixing animations lmao
my animation has AnimNS_HitDetect and I'm pretty sure I need to do something with it
blueprint selects attack from attack count variable, plays the chosen montage and when it completes it resets amount
execute line goes into a ++ to increase attack count
all that works, but I'm confused how do I get the AnimNS_HitDetect
play montage -> On Notify Begin -> Print String doesn't work ๐
good news I found out I need a HitDetect function in my character
Should I be using custom events like functions? As well, what do you guys think are the most important bp aspects to learn about? I've learned a bit about interfaces, now I'm learning about custom events and when to use them. If they're literally just the bp version of function's, then I won't even learn more and I'll skip past it.
Events and functions are similar but have their different use cases.
Custom Events have to be placed in the main event graph and can be replicated. Also note that only latent nodes can be placed in the main event graph.
Functions can be made pure and have local variables.
With you saying you've learnt a bit about interfaces, can you tell me what their purpose is? (What are they for)
Hey Guys I really need help with something. I am working on a maze type game and want to put holes in the landscape for the player to jump over. The thing is I want to be able to move those holes based on a blueprint actor. The idea i have is a line trace will hit the landscape and put an occlusion in it, but i want to have multiple occlusions and my landscape material is a repeated grid pattern.
I wish i could just make a static mesh that overlaps with the landscape and where it overlaps it acts like a boolean.
I'm not sure how to approach this, my current idea is to make my grid texture into a very tiled texture via GIMP and then use that so i can occlude where i want based on alpha. but this idea will be difficult to make work with holes i can drag and drop in the game.
PLease help!!
You can't put holes in landscapes.
Lol. Dynamic landscape effects. RIP.
best bet might be using the Voxel Plugin
There are those patch things. But I have no ideia how good they are.
How flat is your landscape?
Show a picture
It's not a litteral hole, it's a visual hole
We're still using landscape in Atre unfortunately. But it's 100% flat. Our rifts and stuff are purely visual with WPO offsets in the shader.
Oh, if it's just visual then yeah. WPO
I was also going to have a box component to turn off collision with the landscape when jumping over the hole
I just want some kind of occlusion to work on the landscape.
without the use of a 2d scenecomponent
Ah ok. It might be worth asking in #materials then. I'm sure some wizards over there would be able to help.
Thanks for the suggestion.
Their purpose is to send data like casting except they're not as resource heavy. They're also a collection of bp's that all share something in common
Our artists did such a great job on those. ๐ You can see that the white wireframe of the landscape here is perfectly flat.
They hid the material around the model and the model has some shader stuff on it that blends to the landscape's virtual texture.
Casting is not resource heavy, and casting isn't a method of sending data.
An interface is just a collection of functions that can be used to allow classes that don't share a common parent to have/implement the same set of functions.
There's actually a slight overhead for using an interface. (Granted its tiny)
I'm not sure where you got that information from but it might be worth learning from another source.
Wizardry! Looks amazing. They did a fantastic job.
Straight from the ue5 wiki. I just suck at explaining things.
Or maybe I don't understand, although I'm using them fine currently so it's more likely I just suck at explaining
Can you link this by chance?
https://dev.epicgames.com/documentation/en-us/unreal-engine/blueprint-interface-in-unreal-engine
https://forums.unrealengine.com/t/blueprint-interfaces-explained/149222
I was super confused as to when to use blueprint interfaces, and when I finally figured it out (in contrast to event dispatchers); I decided to make a quick guide on this matter because I feel a lot of the video guides out there mistake its use akin to that of an event dispatcher, which itโs not. So first you have to know what an interface is...
what does making something pure mean? just curious
It gives it back its innocence
I don't see anything on the doc site unless I missed it?
The one mention on the forum part is that it causes a hard reference. Which is partially true. But also dramatically stupidly simplified. It's perfectly fine for parent classes to be hard referenced together and all be loaded at all times. C++ classes work in the same way.
The main issue is when you cast to some class that has a lot of assets. Which is why you use inheritance. You cast to a parent class and call the function on it, which the child can override. Your casts stay light on their referencing and you don't get a memory linker issue.
And I feel it's CRITICAL to point out that casts cost no runtime performance. And as Pattym said an Interface does. An interface call can cost up to 20% more than a basic function call. Likely nothing in normal use cases but by comparison it is still a chunk more.
There's a big issue around this whole topic because people say stupid shit like "cast bad for performance!" and really don't explain or even understand what they're saying themselves. There's two issues going on which are the runtime performance cost of the call and then there's a broader linker issue which is a massive topic in itself but essentially translates to asset loading problems and memory consumption.
The TLDR casting is not bad for performance, interfaces are not a linker savior.
From a BP perspective, it's a type of function that will be re-evaluated for each unique node it's connected too when executed. (Doesn't cache the result)
Executed, not unique.
It does cache the result for every other node, but every executed node will cause it to rerun.
Interesting. Dont fully understand this, but I do a bit.
I feel like I'm likely to make a mistake when it comes to casting, versus with interfaces it's not as easy to make a mistake (from my limited knowledge)
You're more likely to make a mistake with interfaces, honestly. And more likely to be copying code around and making things harder to follow.
Cast is a question.
Is this thing an instance of type x?
If so, let me treat it as that type.
You have an animal. You want to tell it to bark. You cast the animal to Dog since Dog is the thing that implements Bark.
No, I'm not copying code.
If the animal was a turtle it'd fail
Made a vow to myself to actually understand all the code that I make, and I promised that I would not copy slop from videos and instead I'd actually understand it.
Noooo. You cast to Animal and tell it to "MakeNoise". Dog just happens to implement that as a bark. ๐
That's why I'm coming here, because I want to fully understand and grasp these concepts.
Here's a situation that might explain casting.
You have a trigger. You want it to make any character that touches it jump.
Looked at something that had to do with ray casts, went back and looked at every single node to understand what they do and why they do it.
You have an overlap event, but importantly, that event gives you the overlapper as an ACTOR.
Okay, and what is an interface then?
Yea, I'd go with this.
But if you wanted something more general, you could use an interface for 'MakeNoise' that way you can use the same function for non animals too.
You don't know if it's a Character until you cast. Character is lower in the type heirarchy.
The blueprint way of avoiding casts
Interfaces are just functions that aren't bound to a specific class type.
You should never use an interface to avoid casts. If you are, you're using them for the wrong reason.
Casting, Delegates, Interfaces. All have their place, and they do not replace each other.
But you got a cast to the interface anyway lmao gottem
Literally what everyone does
And they are all wrong
Unless your interface is implemented on multiple unrelated classes it's a bad idea pretty much.
Feels like Reddit I've got 2 people saying 2 different things ๐ตโ๐ซ
I've used an interface once in the past 6 months. It had 2 functions in it. Lol
Its a way to decouple classes but still have them communicate
You don't need interfaces for that.
So much shit I don't understand ๐ญ
Component with a delegate is the better interface prove me wrong
Nah you dont but then again in c++ you nearly never use a interface
At least at the actor level
its a bp phenomenon
You could argue an interface is like a component.
I like components for this too
get component by class - do wahtever you want, no cast no annoying implementing a interface
and only a tiny bit of overhead from the comp
The get component still creates a hard ref so it's important to make sure you're using hierarchy to base class your systems where possible.
Yeah I really like just doing things as components talking to components, letting their actor know about important things.
Also sometimes you need some state. Interface is great for Interaction until you need to statefully hold CurrentInteractor
but only to the component
Like you can get component from actor
It's not. You don't need interfaces for that in BP. You need a correct hierarchy or other systems. The Dog Barking is a good example. If you want to be quick about it, put the MakeNoise in a parent class like Animal which has no assets. It's fine if things link to Animal. Dog overrides this and Barks.
An alternative to this is abilities. Generically tell anything to run an ability that isn't on cooldown with a thing like a tag like MakeNoise. It runs it's ability. If it's been granted said ability it uses it.
Both of these things stop memory link issues that people abuse interfaces for, and both are a better way to implement this than an interface.
What is the drawback of using a interface instead of a cast
They are not interchangeable. They do different things.
A cast is just a type check.
But they can be used for the same things
calling a function in another class
Extra work for no benefit.
Interface fits when you need UNRELATED classes to have some set of the same function signature. Full stop, that's it.
The extra work seems minimal
An interface is just a way of calling a function without needing to know its class type.
I mean you do you but interfaces without multiple unrelated implementers are a smell.
Sure but if there are no drawbacks and even a benefit in doing something i dont see why one should not do it
Using an interface can result in you repeating code. It can also make managing a project harder as it scales if over used.
not that i would use a lot of interfaces in the first place
No default implementation for another.
I have a Dog, and Cat. I have Animal as their parent.
Interface:
I implement the interface function in Dog and Cat, and make them play their animations and sounds separately in each.
Inheritance(cast):
I implement this logic in Animal, and make properties for the animation and sound. I set these on Dog and Cat with no additional programming required just some properties set.
Now when I add Fox I simply set properties instead of having to implement the function and copy the code.
Interface calls also cost up to 20% more runtime in BP. Their overhead is nasty in some cases.
Bugs can be harder to track down. Inconsistent behaviour as it can become dependant on how it's implemented in X number of class ect..
I have zero interfaces in any of my projects.
I never knew there was a interface cost.
I always assumed it was just a cool function call
You bareley ever mention it
Unless you have A LOT of classes with interfaces
Ok fair
Thats why I like to have basic C++ classes, or use a component.
Base/ static implementation.
I'd also note I'm not a fan of either of these points as making something make a noise sounds a lot like an ability. Which turns into a more compositional approach than either interfaces or casting.
I would say damage would be a good usage of an interface but it's implemented in the base class of Actor since Unreal comes from an FPS background.
I prefer component whenever I can usually.
Using damage as an example, you want a bullet to damage what it hits. You could:
A: implement the damage call at the common class of all actors, Unreal did that. You make something damageable by being a subclass of Actor. You could add a default implementation as long as you're ok with all damageable things being subclasses of some base.
B: implement damage as an interface. Each target has to handle what being damaged means. You make something damageable by implementing that interface.
C: implement damage as one part of the API to your HealthComponent. Just get component by class and call. You make something damageable by giving it a HealthComponent. The actor binds to OnDamaged and OnDeath etc. The actual math of applying damage to HP can just be done in the component, invisible to the actor.
What about interactables? A interaction component > interface ?
Or better polymorphism ?
I use component for that too
Since it can have state, like who's currently interacting, or if it's locked, or whatever else.
Im getting different info on inheritance alltogether i head several times now i should always replace inheritance with components if i can composition > inheritance
Or a location
Also, in some contexts, components allow for better expandability.
If I need to make an interface change, or addition I do it everywhere.
For a comp.
I can edit the comp and everything is changed.
Or, if I have my comps setup a way, that supports copies of themselves (like interaction)
I can have a basic interaction comp.
Then, just add a 2nd one, for advanced, or class specific interactions.
Not at all. Composition and Inheritance are very different ideas.
Back to the Dog/Cat thing. You won't make everything an Animal that just has different components. You could do this, you could make a Noise component and place different ones on Cat and Dog and make them play different sounds that way and change their mesh, etc.
But realistically you'd never do that. Animal has a set amount of things that all animals have, and you configure or extend these things in child classes.
Composition is the idea that you want to reuse functionality across multiple classes. StaticMeshes for example, you might need one static mesh in one Building actor, and fifty static meshes in another Building actor.
Abilities share the composition idea in a way that you may have 10 buildings, but only two of them might have the ability to upgrade. Or three of them might have the ability to detonate.
But I'll still make Building children. Turrets, Radars, Traps, etc. Same as I'd still make Cat and Dog.
I think first i heard it in some coding tutorial on youtube, i went down a entire rabbit hole and since then i bareley ever used inheritance, sometimes for very short chains
Base class item - equipment - helmets for example but never any further
That article thing is correct. You shouldn't use inheritance for code reuse. That's what composition is for.
Lets say you have animal, some animals should give birth some should lay eggs
Would it be better to inherit or composition that behaviour?
With make sound i guess it makes sense, all animals should make a sound, but if we have the give birth thing wouldnt components be better ?
Base class animal
2 components
Egg layer and birth giver component
Or just a animal component that simply checks what type the animal is
are we mammal or avian ? - lay egg or give birth
Probably. Because this is again in ability territory. Should have the ability to lay an egg, or the ability to birth. Whether you handle that through a real ability system or through like components is semantics.
ProcreationComponent with enum EProcreationType
assuming there's a categorical split like that
lol
EverythingComponent with enum EComponentType. ๐
hello I have a question, how do i apply the day/ night cycle on every other level maps and continue the time? the chat system I have created only works on one map either. I also tried to test it in the different map but the simple box collision with open level node freezes the game or it starts from the different server than the opened one.
Who has cats remaining?
that's the answer to what goes in target. Your next question is probably "how do I put it there" or something like that
You need a reference, there's many many ways to get a reference to something
the easiest in blueprints is to just do use the node "get owning player pawn"
and then cast it to your class
Ex: Get Owning player pawn -> Cast to MyCharacter -> Cats remaining
if someone tells you to use a blueprint interface instead casting tell them I said to shut up
I'm scared of casting ๐
Store the time in the game instance, all variables there are persistent upon level transitioning
I'm probably going to go to blueprint square one and watch a 3 hour long video on blueprints
I think that'll help a lot
Lesson 1 Mr. Pika. All the youtube videos telling you "Don't do this!" are probably gonna spend the next 10 minutes lying to you
They delete all of the comments of people trying to fact check them
Heard of smartpoly?
No, do you have a video and specific timing of something he said I'm happy to watch it and fact check it for you
No lol, it's a 3 hour long video and I was just wondering if you've heard of him.
Seems pretty good though
Check out my Premium Courses:
https://smartpoly.teachable.com
DOWNLOAD THE PROJECT FILES HERE:
https://drive.google.com/file/d/1vtTuDNytdPijo4TF9ccLgc7zPcaAbbqh/view?usp=sharing
Want To Learn Game Development?
Check out My Multiplayer Survival Game Course:
https://smartpoly.teachable.com/p/ue5-multiplayer-steam-survival-game-course-remaster...
Here's the specific video
I would say watch as many videos as you can to learn all the different ways you can do stuff and all the useful nodes. What's important is that you take everything they say with a grain of salt though
People who make YouTube tutorials are almost always hobbyists who have never actually worked in the field they make the tutorials for. But I don't mean to be completely pessimistic, they are are still very helpful and are necessary
Hello everyone i was working on a basic dash ability and i was wondering if there s a way to make the player dash based on where he looks and not only his velocity?
i was able to kinda achieve this with this set up but the player velocity still "overpowers" the way the player looks as well as the dash not working at all when the player dosnt move and sadly i also need the player to be able to dash while not moving
@fiery swallow oh hii moxie nice seeing u here lol
xy override should stop the "overpower" thing you're referring to
but I feel like this should work for what you're trying to do
you could reduce any existing velocity on the player ๐ค
yeah bro I've got thousands of messages here
e.g. SetVelocity(GetVelocity() * 0.1) before you dash/launch
@fiery swallow @spark steppe i already fixed the overpower problem by this node!
rn im trying to figure out how to fix the player not moving at with the dash if hes standing still + i was curious if its possible to combine both looks direction dash and key press dash (as in line i want to dash left or right without looking left or right
haha i bet
only take look at direction into account if they dash forward, and with all other key combos dash into the "direction of the key"
๐คท idk how other games handle that and what specific behavior you are after
Stop movement immediately just sets your velocity to 0,0,0. I believe XY override achieves the same thing but leave your Z in tact. Using stop movement immediately might give you weird issues if you're falling during the dash
yeah its fine. im trying to do something similar to ultrakils dash system i think its neet. i am barking my head over it for like an hour or 2 lol.
as for dashing while not moving this code shouldn't effect that... Can you try changing your launch velocity to like 1000 or something as well and see if you move forward at all? I'm wondering if you're just colliding with the ground and it's not letting you move because of it. I don't really have the editor open to trial and error myself
it leaves the z normal i tested it and it dosnt set me back to the ground
it kinda moves forward but only a little like the grown is stopping it i guess. i am forced to jump before i do the dash
I'm not sure how heavy your character is but if you remember the dodge/dash mechanic we had in renown. All we did was set the Z to 64.
we used add impulse in the character movement component instead of launch character but It's probably the same underlying code
my suggestion for simplicity sake is to just find the minimum z required to make your dash move while not actually leaving the ground.
true i will try to do it
thx for the help
casting is only an issue if mis-used
flying, momentarily ?
I considered mentioning it but flying would mean no gravity during the dash and idk if he wanted that :p
some games you can dash off of ledges smoothly onto the floor below for example
I'd probably solve that in code manually, as that removes any constraints given by the cmc for the move
Anyone got a good tutorial for left hand IK that works for multiple different weapons / positionings? I tried a couple videos, one didn't work the other worked but wasn't good enough, hand still drifted away (was based on weapon socket positions)
So far only way I've seen was simply using constraints in the animations themselves but that's a lot of work for animators ig
But the tooltip is already telling you
Self is not a gamestate - the left pin is always the target, from where are you pulling this cats remaining int
If this variable exist inside your game state you need to pull from there
How do you pull from gamestate ?
Get gamestate - gives you your gamestate object
cast to - your specific gamestate
from that - get cat remaining
Is this a property binding for the text of a text widget?
What am I missing here to ensure the IK remains bound to the socket/weapon?
As you can see, the position works well for the start, but once animations start the hand position doesn't really end up working well.
https://medal.tv/games/screen-capture/clips/lGvRIFsHte6BEsI4A?invite=cr-MSw1RXMsMjAwNTA1NDU4&v=14
Watch IK not working properly by Steeljardas and millions of other Screen Recording videos on Medal. #screenrecording
I think it's something to do with the tick group. The AnimBP updates before the weapon moves meaning it can be a frame behind.
yea but the animations are several frames long it, even if it's a lagging a tick behind it should sort of keep up but it isnt at all
I see what you mean. After slowing the video down, it looks like its off when the sword rotates and becomes more horizontal.
yup
I need some help. I have created a vending machine with buttons that i can click on with the mouse. I have made an interaction mode that allows the player to switch the camera view to click the buttons when they are within the interaction collision of the vending machine. i also made a test mode that allows click events without changing the camera view or being inside the collision. By doing this i have discovered that my click events do not trigger if my character is inside the interaction collision. Can anyone tell me how i can make sure my click events trigger when the player is inside the interaction box?
does it work when outside?
can you explain a bit more how you implemented it ?
anyone have idea why this work . It s a normal actor blue print calling other BP in my level
and i tried to put that in the BP_level and doesnt work anymore
Delay does not work in For Loops
it s working for me
no problem it work
problem is my interface dont work in the BP level
well keep in mind that latent nodes inside a for loop is a recipe for bugs, if it works then good but careful
i redone all the node ....
good to know my new BP dont have them 0.. but dont work at all lol
see above that simplified verson with just the actor directy drop one by one no array no for loop
I have never seen the compiler error you have here
but the interface is broken i dont know if it s limitation of the level blue print or me
look like a bad copy past you need redo the node... i redonne but just same error pop ...
are you sure of your references that you are feeding in the interface input ?
the target
yea sure .... like i have both Both side by side
hmmm maybe try to have 3 nodes that call the blueprint interface, each one with a single actor as a target
man your genius
not sure UE really like to have multiple targets for interfaces call
that worked
๐ฅ
that anoying. is there way i dont have to have same shit copy past for each actor ?
just it look bad lol
aside from building an array and making a for loop I don't think so ...
but if you collapse nodes you will put dust under the rug and it will look all clean
i feelt that a bug on Level BP . because i have done in another level with just a separate BP lot of actor goes to the pin and no problem...
no sorry i m telling shit was different method
stuff was in the bp
Show the nodes.
ahh, my bad. was wrong variable connected.
It is
I guess I just didn't understand the tooltip.
Its advised to avoid using these as they run on tick. It can be that bad, Epic even added an option in the project settings to disable it outright. ๐
For most UI stuff, you can update things based on events. For example, when the value is updated, there's a call back (event dispatcher) that things can bind too. Saves having to check each tick and repeatedly updating something that hasn't actually changed.
what's wrong with bindings ?
Pattym just said it
I trust you, but how does this go against https://dev.epicgames.com/community/learning/tutorials/l3E0/myth-busting-best-practices-in-unreal-engine#don'tusetick?
oh yeah right I had not understood the message properly
It doesnt
He said not to use tick, and so I was wondering what the scenario is to where we shouldnt be using tick
Because that says it's fine to use tick in moderation
He said dont use bindings
Then he explained that it runs on tick and that's why not to use it
because it's not useful to have it run on tick since you can avoid it
tick are not an absolute evil to avoid at all cost, but if you can have an event driven scheme it's better
Are there some things you cant avoid running on tick?
well collisions for instance
I'm referring to this section here.
'Use Event-Driven Updates Instead of Bound Attributes'
I'm going to implement a "locking camera" system like in Dark Souls, and I can't think of a way to do it without tick
since it will have to update every frame
Anything with animations and movement should run on tick / delta time
or else it becomes choppy
It's also important to keep event driven stuff pretty clean too though. You can easily cripple a game with events that just run too much to the point tick is actually faster because it only updates one time per frame instead of 120.
Everything in moderation.
In other words - it is not the tick that is the problem here, but updating the value when it doesn't need to be updated. If you change your stamina every second, but it is bound with the widget binding - the widget will try to update it every tick, even though it only changes every second.
It is just wasted processing power. Doesn't matter with one widget but can grow somewhat with many of them
Just lower your framrate to 1 fps. Easy fix. ๐
Just to add to this, the reason the bound properties in widgets can be bad is because some things can cause it to redraw the whole widget which can be resource intensive as it is. As a project grows and widgets get more complex, it can have a snowball effect where your frames will tank even though nothings really happening visually.
(Of course this is an extreme example but can be easy to get to if not careful)
It makes me wonder if its possible to make a game that's fun and engaging that only updates every second. ๐ค
They also break when you start correctly using invalidation boxes.
I believe there was a game like this. Like the player could only see photos of the world, which showed the world every few seconds or something
But maybe it was just a visual representation and it still ran on more fps ๐ค
This tick = bad attitude is just goofy.
Tick is the core of the entire engine. It's the thing that runs per frame. If you need something to update smoothly per frame then something, somewhere, is ticking.
The concern is doing unnecessary work on tick. Either work that doesn't have to be done every frame, or work that doesn't have to be done at all. But if the work has to be done every frame, it just has to be done.
Still makes me laugh a bit that like over 95% of games in Unreal aren't splitscreen. Even the multiplayer ones are single screen... But every single one of them ticks to see if it should show a second screen in the viewport. ๐
If people had any idea how much actual work is done per frame just with engine defaults their mind would be blown.
But if your stamina updates smoothly over time, not in chunks, then just bind it. If the value you were trying to represent is often or usually changing every frame, you need to update every frame.
It's also important to note that stuff like UI tends to get more of a pass than other things. Even if stamina updates every 1s that doesn't mean you want the bar to snap. It's perfectly acceptable to make the UI interp to the current value for a visual niceness while keeping gamepaly code quick and performant.
This is a common effect in online games where you don't get snappy updates constantly but want your UI to feel smooth. You might not get updates but every 0.2-2.0 seconds. And interpolating it hides this from the player a bit. Makes it less messy.
Why doesn't unreal have an auto magic on update call back for uproperties? Like a fundamental built-in way to say hey, call this function when this value changes. Seems like that'd be very useful as a fundamental engine construct
Probably cause it'd just be abused worse than delegates are. MVVM tried to solve that but it's... convoluted.
anyone noticed in 5.6 that bp debug firings of execution lines dont always show?
Only update things per frame when they neede to
tick is a per frame update
does health change every frame? No. React to OnHit instead
We had a speed property in RS2 that literally updated over a hundred times every frame for each marine. Eventually that got bumped down to like 20-30 per marine. But it was still faster for me to update attributes on tick in UI at this point because that one attribute was triggering assloads of delegate calls. One thing updates a thing, which broadcasts, which updates the original thing, which broadcasts again, etc etc etc until it settles finally. Like I said above, event driven can be just as terrible or even worse.
sounds like a pretty rare edge case
but yeah there's definetly scenarios you'd want to use tick
you just gotta be aware what tick actually is, and use it when appropriate
GAS isn't much different. If you have attributes that rely on other attributes. You change one thing and you suddenly have dozens of attributes running their OnChange functions.
am i the only one with this random lines only firing up in ue debug?
ouch, am i in a pickle?
there's like 30 of them that rely on each other xD
im fine for now, but i'll defineitly watch out xD
on some zoom some lines show, some dont.
Nah. It's normal. But I'm just saying that it can hurt if you're listening to each of those and updating UI. Your health gets buffed or something and it causes changes to something that causes another change etc etc etc. Meanwhile your healthbar widget updates a few times instead of once at end of frame after everything's settled. Wasted update calls everywhere. And it spirals incredibly fast.
MVVM kind of worked on this where it only actually broadcasts the change at end of frame, but it's annoying to use IMO. Would be nicer if this was more of a default behavior. Cause slate doesn't update until after everything else anyhow.
At a certain level it might actually be faster to just tick and fetch a bunch of data than having delegates scattered all over the place reaching their grubby little fingers into your state
I prefer to just tick once, pulling all the data I need, and then revisiting it if it's a bottleneck. Never has been, but I don't make huge UI-driven things.
totally, I was just giving an example of something that must be done using tick
What do you mean????? my for loop that calls a event that calls the same for loop is bad ???? ^^
ew
Yo I heard you like loops. So I put a loop in your loop that loops your loops.
I heard the screams of a million UE Editor instances triggering infinite recursive call detections
That's why I wasn't able to prototype my WFC in BP
it's literally such a huge algo that it would result in like 20s run times
probably even worse, never got far with it in BP before moving to C-style C++
had some issues with this as well for some editor utility functions where I was working on huge amount of actors at the same time, doing some sorting...
WFC scales something like N^4 or something else rediculous, it's so much work.
Fairly simple model but huge tight loops
O(N^4) is quite obscene indeed
can i not create widgets in objects?
Function ' Create Widget generated from expanding Create Widget ' is unsafe to call from blueprints of class ' Object '.
Create widget requires world context I believe.
Hi!
How can I move a pawn with an Axis2D Input Action?
I know how to move a character with its Add Movement Input:
But I don't know how to use it with a Pawn.
Thanks!
I see, alright
btw, if you create UObject in C++ and override GetWorld() in class and provide that outer object (owner) of UObject, then you will be able to create widgets inside UObjects
so all you need is Owner (AActor* variable) set by AActor that 'holds' the UObject, then when you call Initialize(AActor* InOwner) you can access world easily and create widget should work
The same way. But your Pawn needs a movement component like FloatingPawnMovement or similar.
That isn't quite moving the character, it's telling the characters movement component how you want to move.
I'd recommend doing this, get the thing to move without any movement components
just:
Tick -> math -> set position
Very good way to learn the fundamentals.
OK
Protip, you can fetch action values, you don't have to use the events
makes continuous things like movement a bit more ergonomic
the template characters already have movement setup
you can peek at them to learn it
If they are rawdogging Pawn then Character won't help much
character is a nasty coupled mess
mhm true
I'd recommend to everyone that the first thing they should do in any engine is make a sliding or rolling pawn with WASD and look controls, directly.
Forces you to learn how inputs, collision, traces, update/tick, and cameras work in whatever engine it is
When my player character walks over the Medkit, the Medkit disappears,but the player's Health does not go up.
BTW I'd recommend you just make a ModifyHealth and feed it a negative or positive
also clamp CurrentHealth between 0 and MaxHealth after the addition, no need to check and branch, clamp is built in
~Cries in Gameplay Effects~
Hey, I want to make some items that react to sounds made by the player. Is there any built-in delegate or something I can bind to? Or should I just call my own event dispatcher in every function in my Pawn class that makes sounds? I've seen some things related to this issue with AI agents but Im not using AI in this game
I fixed my mistake but it still doesn't work.
how does the UI get updated right now?
you want possibly floating pawn movement component to move the pawn around
That delegate at the end of beginplay. Call it after you've changed CurrentHealth as well.
Hi all, Iโm hoping can get some advice on spawning NPC ships for my game. Iโve researched pooling and want to see if itโs right for my game based on how the ships are created.
I have a single ship blueprint that is โbuiltโ on BeginPlay from DataAssets (ship mesh is chosen, sails are added & configured, movement settings are applied etc). So the whole thing is dynamic and data driven.
Would this work with pooling? Considering each ship is pretty unique (there are presets of sorts, but generally some parts will be different due to data assets) would I get the peformance improvements pooling provides?
Does anyone have any tips for how I can spawn ~50 different ships without the frame drops & freezing?
My thoughts were pooling and staggering each โbuildโ part across ticks to spread the load out, is there anything I can do more?
(If this isnโt the right channel lmk)
how often are ships being destroyed and recreated?
Not very frequently, there will be a single โmassโ needed at launch to populate the immediate area but then the spawn system is dynamic, and ships should have a long lifespan unless they get into a fight.
I wouldn't bother pooling then
When I spawn one currently I get a visible frame drop/freeze, is that more likely due to my code / initialisation rather than anything else?
Trying to think how I can stop the frame drops if I donโt pool
If just spawning one makes your project freeze then you have some much deeper problems
profile it and catch the spawning frame and take a look at what's eating your time
Thatโs very likely the case ๐คฃ Thanks, Iโll avoid pooling and profile it
I'm having an issue where my 2D Paper Sprite character won't play the flipbook animation when I press down the E button, I set InputAction. The "Print string" works but the flipbook won't play when E is pressed.
Will it play ever, have you got it to play on begin play or a delay or anything like that?
So I did get it to play by "Set IsAttacking" but now when I use the attack E button, it messes up my other animations like Jump
Would it help to share my Blueprint?
It seems like once I press the E button to punch, it messes up the walk and jump and doesn't reset everything
ya show code
the path between the e button and when you play the anim
This is all I got
Does anyone know why my blueprint eventbeginplay isn't firing even though its placed in the level?
So I have an ak-47 mesh, and I attach it to the socket but the orientation of the socket when equipping it in game is different then the way I set it on the skeletal mesh.. any one know what could cause this... (For example I set the socket vertically in the skeletal mesh but when I pick up the weapon in game its horizontal not vertical like how I set it in the skeletal mesh)
Someone else was having this issue. Multi or Single player?
right now single
Check the pivot point, the sockets rotation, and orientation on the attachment node if used.
Is it just one actor or all actors.
One actor
Thanks
Sorry ended up in a bind
Are you using any kind of delays?
Also what debugging steps have you already taken?
It isnt placed in the world and you pulled in the wrong actor ๐คท
Or a bug
Two random follow ups on this. Which GameMode/State are you using? Base or non Base? And are you using level streaming or world partitioning at all?
It works now (shows in the world), idk how I fixed it. I just reopened the project. Thanks for trying to help.
Although I do have another issue (this time probably with the code, not a weird bug), but I'll share it tomorrow
Thank you
casting is fine in this situation?
You can always cast to all things that are already in your ram at all times
ah
You can also always cast to your player
so since its literally a game state its not like it matters
i see
lets say you have Actor horse and actor saddle
For the saddle to exist horse must exist first so casting is always fine too
Get Attach Parent Actor -> Cast To (Base Horse) in that scenario is always fine
Get Attach Parent Actor -> Cast To (Full Armor Christmas Theme Haunted Stallion Horse) is probably never a good idea (and also implementing cosmetics in your class hierarchy is bad)
Depends on if that Horse is the base class or not
If there is only one horse with 400 attached cosmetic (for whatever reason ๐ )
The cast is fine as long as the thing your casting from depends on the class anyways
Literally cannot stop mentally watching two dark knights riding this fucking horse, jousting with Christmas trees. ๐
I am a sane individual and can be trusted with the art and narrative direction
Peak gaming. Two knights one horse each, and Christmas trees as weapons. I got hit so hard an ornament popped off and KOโd a bystander. 11/10 finally a game that understands what gamers want!
this game will make billions
Kinda gives me monthy python vibes
Someone would have to tranq me on the floor to stop me from wheezing to death if that ornament part actually happened. ๐
Honestly if we could fill out the rest of the team this seems like a ton of fun
Hi guys, any pointers as to where i should dig to find out exactly what these expensive ticks are?
answer: stat tickables
and the profiler
what you recommend for a time line of event in my level ? now i was using a main BP and communicate with interface. should i useEnevent dispatcher ? and for the tme line Event tick ?
can I get a reference to the mesh assigned to the static mesh component from a class reference to the blueprint actor?
class reference as in the purple one
Not within BP's limits.
You'd need to spawn the actor, get the value, then destroy the actor.
ok thanks
Hello,
I have the Game Animation Sample Project 5.7 , and Im trying to use my custom characters on it,
But its different to 5.6, and I managed to setup my character by copying the meta human sample Kellen,
But I cannot switch my characters as the system is different now,
I switched to original project and start testing out how to switch,
Found out that I can add a slot in the widget blueprint, Visual Overides array,
But when I click on the character on runtime, nothing changes,
This is the exact same character as the above row, but there is something missing when I add it again to 2nd row, and cannot find what it is and there are not much details out there still.
Looking for help
does anyone know how to cut a hole into a mesh that's inside a blueprint? I'm trying to hollow out a cannon barrel.
you would need to access the mesh with the Mesh Editing tools and use a boolean cut. Or do the same in your DCC (such as Blender)
Just click on it and look for it on detail panel. Drop it in the level and do a bolean
Save it
I wish I known I hate character stuff ๐ญ
hi guys i am working on a wall jump mechanic and was wondering if theres a way to allow the player to wall jump from any angle not just when facing forward?
this is my base for the wall jump and rn i am using the forward vector as the base angle for the jump
Hello everyone,
I need some help.
I am an experienced Unity developer with 6โ8 years of experience in Unity and C#, but I am currently stuck with an Unreal Engine Epic Achievements task and donโt have much experience with Blueprints yet.
I want to publish my game on the Epic Games Store, built in Unreal Engine 5.4.4. For publishing, Epic requires Epic Achievements.
I am using the** EOSCore plugin**, and it initializes correctly, but the plugin does not provide clear or complete Blueprint examples. I followed the official documentation and created the Blueprints myself, but the game crashes right after a successful Epic login.
I only need help with a simple setup:
One Epic Achievement
Initialized in the Main Menu
Unlocked when entering or completing a level
No need to login again and again
If anyone has experience with EOS / Epic Achievements in UE 5.4.x, I would really appreciate your guidance.
Here is my current method
getdefaults
Use the Impact Normal in the hit result of your line trace
I'm not sure the kind of mechanic you are trying to achieve here, but with the normal you can have the character either jump perpendicular to the wall or with a mirror angle with respect to its forward vector
im trying to get something similar to Ultrakills wall jumo (if you ever played it u would know ig)
in that game u can do a wall jump from every angle (like even if u stand with ur back to the wall u can still do a jump) i was looking to make something similar at least
oh so you want to detect wall anywhere around you ?
uuuh how do i find it?
yeah!
break hit result
but that's not what you want
here you want to do something like a capsule trace around you character
or maybe some kind of for / loop sweeping of line traces at different angles
yeah i was thinking to do that but i didnt find any info on how to do it.
be careful thought because running this on tick might get heavy quickly, you should run it in a timer with like a 0.1 period
checking every frame is way overkill
i was thinking that it could be heavy yeah. good to know tho
true lmao
unless you want the wall jump to be automatic, you should fire it only when you press the jump input
then again I don't know the game you mentionned ๐
its fine lol i will try to figure it out
the only thing tho
one thing for sure, if you want to do multiple regular tracing, do this in a timer to reduce computing load
could u tell me or give me a source for a way to do what you said here? i am just not sure how could i do a 360 checking line or a capsule
so instead of a "line trace by channel", go for a capsule trace
radius should be the maximum horizontal distance to a wall you want to reach
the problem is i cannot connect multiple traces.i can only put one into each yellow hole
half height the maximum vertical distance
yes replace the line trace with the capsule one
and if you breeak the hit result, the "impact point" vector will give you the location of the nearest wall
(well I think so, please correct me if I'm wrong because it would be useful to know)
Lets move to DM to avoid hogging the chatroom โบ๏ธ
sounds amazing i will dm u rn thx ALOT for the help
My pleasure, I'm at work and bored as hell so it's always nice to do some "remote programming"
i sent u a dm ๐ฑ ๐
Thanks for the reply, was able to find it out after more digging,
need to add the Visual overrides on the GM_Sandbox game mode
And the variable called Visual overrides
Hello everyone,
Iโve been working for some time on a system where a character can walk on any surface.
The system works well overall, and gravity is correctly computed using line traces.
Iโm currently facing a major issue when the character is walking on the ceiling, i.e. when gravity is (X=0, Y=0, Z=1).
On the attached video, Iโm only pressing the forward movement input. However, when gravity is set to (0,0,1), the behavior depends on the camera orientation:
If the camera is facing the X axis, movement works as expected.
If the camera is facing the Y axis, the controls become completely inverted.
This is not an input issue, but appears to be a reference frame / rotation problem caused by how movement direction is computed relative to gravity and camera orientation.
Technical context:
Unreal Engine 5.6
Blueprint only
Movement is based on Add Movement Input
I compute a custom rotation using a function called โGet Gravity World Rotationโ, which is applied after Get Control Rotation, before being used to drive movement.
All relevant Blueprints are shown in links below ๐
Question:
What is the correct way to compute a movement direction that remains consistent regardless of camera orientation when gravity is inverted?
More specifically, how should the movement basis (forward/right vectors) be reconstructed when walking on ceilings, to avoid axis inversion issues?
Get Gravity World Rotation Blueprint : https://blueprintue.com/blueprint/xqabh94v/
Movement Input with Gravity : https://blueprintue.com/blueprint/dd7absby/
Why are you using quaternions instead of rotators directly ?
Hello! I have created the Save/Load system in Unreal Engine 5, but nothing happens when I press the keys (R/J).
No, it is not creating it twice
Also, where is the save/load in the video you attached ?
ok thanks, I'm always worried about not storing the output in a variable of a created widget and use it instead of using twice the same output node
You only need to be careful with pure nodes - the ones without the execution pin
Yep I guess that's where my confusion comes from
Non-pure nodes keep their outputs after they were executed once
ok good thanks for the correction
Um, you ask about save/load and the video is about a health widget. Not sure what your problem is then
Your max health variable is set to 0.
So I have an object that moves fast and on collision it is stopped. My move mouses the object. In really fast movements i hit somewhere and collision is made and it stops the object. The problem is that now my object is really not touching the collided object, but a bit before it. How to improve?
Check the collision on your meshes, you probably have void spots where its not snug to the geometry.
have you try turning on CCD (Continues collision detection)
spheretrace gets hit
Yeah but not sure how that relate to your collision component.
hi guys
if i may ask u something please
what is the meaning of vaiable in blueprints?
if all fails, you might have to evaluate it your self.
who said about collision component?
is it a represntation for a value or number?
vaiable? You mean variable?
yeah
it is something that can change. hence VARIable. number, state, string whatever.
It's named containers.
Your computer stores data in some storage. To make it viable for programming, you just declare a name for that storage space.
so you can refer to that storage space if you want to change the data.
so it is like a box for information
Concidering traces can't collide with other traces, they'll be hitting something in the level. Check the collision on those things.
who said colliding with other traces?
my object has sphere trace. it hits other mesh. it should stop
but sometimes if really fast mouse flick, it stops even before.
so a hit has happened but visually the object that is movable by player is not even close to the object.
nothing else in level.
just these cubes
empty level. Cubes that player object can collide into are the only ones there.
sorry, I sent another video
and right now its 1 cube.
Just show your code.
@lethal aspen https://www.w3schools.com/programming/prog_variables.php
You don't specify the slot name you're checking exists on your key presses.
that player dead bool says that stop line tracing from a mouse cursor, so effectively stopping the player object being moving.
I was mainly hoping for some answers maybe in the project settings?
but there is none for frame stuff i guess.
There's nothing here related to movement. Its hard to help without understanding what you're actually doing.
Tracing has nothing to do with stopping movement
LOL
unless the movement is performed with the boolean check
Sphere trace checks if it hit death object. IF hit stop player?
and yes its is performed with boolean check AS I told earlier.
You are assuming that others can read your mind tbh. We don't even see where the PlayerDeath is used.
Perhaps share that bit of code as well. ๐
btw it helps to draw debug trace to visualize the trace.
when it's tick dependent, you can't get away with simple traces in a low fps environment or when you move something too fast.
that player dead bool says that stop line tracing from a mouse cursor, so effectively stopping the player object being moving.
I was mainly hoping for some answers maybe in the project settings?
but there is none for frame stuff i guess.
this is what i said
tried with 120 fps and 60 fps
same stuff.
What you've done is the same as me doing this:
'I'm having an issue where when i set a property in a widget, its not updating the text.'
and only showing this.
have you look at your debug trace?
see if you actually hitting w/e you want to hit.
maybe the same problem with people trying to do melee trace and doing it on tick.
you mean the sphere trace or another debug trace?
they don't really work in real envinronment, the band aid for that is to perform backtracing.
what ever you want to test againts.
see if in game, it actually hit the object.
and confirm with pring string or breakpoint.
yes it hits
game over screeen appears
i print the hit
as you see in the pics
all info i gave you
Nope, I don't see much from the pics
??
That single screenshoot doesn't show much.
i give up trying at this point.
All the code related to the problem you are having
including screenshoot of the confirmed hit, visual, etc.
we don't have your project
it's hard enough to read your mind, let alone debug a project we don't have physically.
there is confirmed hit in pic
Is there a reason you're avoiding just showing the code we've asked for? You've shown one picture which is only a fraction of the story and your explanations aren't helping.
I give up. ๐คฃ
So you understand the situation, first answer the hyperthetical question i shared here. With the information i provided.
How you are moving the object is important too, nto onyl the bool itself
In my opinion, problem is that really fast mouse movements just skips the trace frame somewhat on the movement. but its weird though that if it skips, it should not be dead.
I tried btw, without the delay node also. Just wanted to add that there to see if it improves the problem of stopping too early.
The issue is that you never set the location on the frame it becomes dead.
Isn't there a simpler way to get the mouse location? Something like Get hit under cursor? It is not related to the problem though
So it seems your logic has two methods of becoming dead. The first one was triggered by the sphere collision which is why it looks correct. The second on however was triggered by the line trace.
If triggered by the line trace, it's location is never updated.
yes, there is one for the cube barriers
and then there is one for the white area.
maybe i just do a distance check based kill
i think line trace is before
so thats why it stops and sphere trace is behind
So you should die if the cursor goes over the cubes (boundary) or if the sphere overlaps it?
sphere overlaps it with its trace
i think i will put both places last location, maybe that helps and then set it on every death.
That doesn't answer my question.
cursor is line trace basically checking for navigable area. If it hits that white area its dead. Also Sphere trace is there to check if it hits those cubes around.
It seems pointless to have two things doing the same check
Also I have a problem, that even if it did manage to stop around the cubes, fast flicks of mouse put the location in center of cubes. I would want the sphere to immediately stop on the edge.
ok, pointless for you maybe, you dont know game mechanics, BUT Even if i remove now the white area check, I am still with the same problem.
now the set location thing actually helped a bit
i am not stopped too early.
but i have now this problem that the sphere is inside the cube. I would want only the edges to touch and stop there.
frame issue I guess?
I would suggest you to stop for a second and prepare a concise explanation of this mechanic - what you want to achieve
Before you move you're sphere you need to do a line trace from it's current location to the new desired location (cursor). If it doesn't hit anything, you can set the location directly. If it does, then you need to set the location to the hit location minus the radius of the sphere in the direction of the line trace.
The current line trace for the white area does seem pointless as the sphere would end hitting the boundary anyway and dying.
Removing it keeps the death logic with the sphere trace instead of in two places.
white area is not redundant at all
its a safe check.
because I can skip those barrier cubes with a real fast mouse flick.
and then i can just move freely in that white area.
If you implement what I mentioned above, (tracing from current to desired) would act as your new safe check.
To be fair, you could probally remove the sphere trace all together.
Could do this even easier by just sweep moving the sphere.
sweep i tried, but the trace is not now hitting it ๐
or make trace just a bit bigger
but yeah the sphere trace is needed to the other gameplay aspects, so I cant remove it.
and sweep moving, is not working also on speedy mouse flicks.
It's not functionally any different than tracing to the new location and setting it.
i know? but it skips also
also it means now that i need to make sphere radius tad bit bigger, and create a fake visual mesh to represent the actual bounds
because if you have sweep, now the sphere stops at the wall in slow speeds, but the trace is not hitting, which is not nice.
and with fast mouse flicks, it completely ignores the sweep.
is there by the way a way to limit cursor speed?
what are those v. marks in hit locs?
Local variable.
ahh
I had a slight error. Fixed in this one.
what is difference in line trace result impact point and hit location
for a line trace there is none
ok just making sure.
hit location = location of the shape when the impact occured (so if you have a sphere trace it's going to be the center of the sphere)
Impact point = location of the actual collision with the detected object (for a sphere trace it's going to be on it's surface)
yep
Hello everyone! I'm new to Unreal Engine 5, and my goal is to fully understand all the engine's details and underlying logic, rather than just copying tutorials. I'm looking for the best resources (especially on YouTube) for these two core areas:
1โคEngine Interface and System Details: Could you recommend a comprehensive introductory course that meticulously covers every part of the interface (World Outliner, Details Panel, Content Browser, etc.) AND logically explains the relationship and roles of core Actors like Controller, Pawn, and Game Mode?
2โคBlueprint Logic Mastery: What is the best video resource or documentation that deeply explains the Blueprint Execution Flow and the Communication Logic Between Actors? (Specifically focusing on the differences between Casting and Blueprint Interfaces). What are key logical concepts (e.g., using Timers instead of Event Tick) I should master for writing clean and efficient Blueprint code?
Check pinned posts in discord (can also check other channels if you need something specific).
If you are very new to programming I liked very much this introduction to the blueprints. He also goes trough the unreal engine interface in first videos.
https://www.youtube.com/watch?v=IipvT6aGinM&list=PL2A3wMhmbeAq3WOT7kQ0EGby1YMb0zj5_
Are you looking to learn how to use Unreal Engine Blueprints and visual scripting? This unreal engine blueprint tutorial is the perfect place to start! Welcome to: The Visual Scripting Crash Course Series! In this series, I'm breaking down all of the essential blueprint building blocks for understanding visual scripting in Unreal Engine. Star...
Hi!
How can I declare a variable of type array of actors?
Is this one? The Item Array?
Thanks!
No, create a variable of an Actor. Then click on the pin in the details panel and you'll have a drop down to select Single/Array/Map/Set
hi I have a problem.... If my cast here fails, then I will get some errors on my screen... how can I disable these errors?
I tried doing something like this
I tried to add these Make Str
What nodes would I use to remove one IMC for a pause menu, then re-add it when unpausing?
For context, my main game IMC and the pause menu IMC both have an input action that use B on the gamepad, but only one or the other is active at a time with my current blueprints.
https://youtu.be/sHaFCkYmJrA Never mind, it wasn't fixed. The issue still persists, and now it's even wierder. The fog BP runs sometimes, and sometimes it just doesn't
Why are you trying to set variables on the nonexistant BPSaveGame?
Ok I have figured this out, for some reason it kept changing the material parameter collection in blueprint. Idk why though.
I would disable the IMC, and add an input action dynamically.
What node do I use to disable the IMC?
Same way you added it to the local player in the first place, through the UEnhancedInputLocalPlayerSubsystem (that would be to remove it, instead of disabling, and re-adding when you're done).
Also, if you're using CommonUI - there's generic back / back handler setup already (if i recall that's the same button as B).
I'll try in a moment
NEVERMIND, it's STILL acting very wierd.
Should I just give up.?
ok NOW i have figured out the issue. The TimeRAW variable does not update in the bp_fog when it updates in bp_sky.
Is there a way I could make it so that when TimeRAW (float) in BP_Sky updates, the TimeRAW (float) in BP_Fog also updates to be the same?
Show how you've set the 'Sky Reference' on the fog instance in the level.
You're pulling the value from the Sky Ref so it'll be what ever value is set in there. The ref looks like its been set correctly.
How does 'Fog Colour Change' get called.
From what you've shown the 'Fog Colour Change' never gets called. I need to see the specific node that calls the function.
Also, where do you bind to the BP_Sky_Fog event dispatcher?
Is this not it?
So it doesn't look like your actually using the event dispatcher so i'll move away from that. The issue is because the time that is being fed into the timers is 0. This means the timer never gets set.
Actually... remove the timer in the BP Fog thats called on begin play. Get you're Sky Ref -> Bind to BP_Sky_Fog and then connect the red square to the red square on the Fog Colour Change event node.
Alternative you can use a 'Create Event' node and select the event from the drop down. A little like this.
ah i see. that worked. i didnt know how to add the dispatcher lol.
So this means that everytime the event dispatcher (BP_Sky_Fog) gets called in BP_Sky, it calls the event connected to the Bind to BP_Sky_Fog
Right?
Exactly. You can have multiple things bound to an event dispatcher.
I see.
Personally, I would have an event dispatcher called 'OnTimeUpdated' and have it return a float for the new time. This makes it more useful, plus the name reflects when it'll be called.
If you want something more scalable, you'd actually seperate out the time keeping stuff into its own class. (an actor component on the game state would work)
Then the sky and fog would both bind to it to do there updates. This makes it easier to switch out different fog and sky BP's during testing.
It also means you can still have your time stuff without the visual stuff.
Having the time stuff seperated also makes more sense when you want other systems to hook into it and can prevent large hard refs.
Ok i understand, it would be better for organisation aswell
Btw is there any way to connect the red line a different way?
I just don't want it to stretch across the whole blueprint if I bind multiple events to it yk.
can I get some help with this rotation logic? trying to make an isometric shooter but having to have the camera face completely down to not mess with movement, and then tilt the player upward a little, but I cant for the life of me work out how to turn him on his local axis to point at the cursor, without just spinning on z axis
(background is placeholder obviously)
You can use a 'Create Event' node and select the event from the drop down.
ahhh i see. does this affect performance at all? or does the name just trick me lol
actually it shouldnt affect performance. stupid question my bad
thanks for the help
maybe Im doing this completely wrong because I dont think gravity would be possible this way, but when I tried angling the camera instead of the player the movement feels weird because of the perspective
leave him vertical, tilt the sprite or whatever the visual is
him being the pawn actor itself
is the sprite the root component?
or mesh or whatever it is
Why do you gotta tilt him to begin with? I see no reason why you can't achieve the first image's result with him being vertically oriented.
I did, and as I said that messes with movement (visually)
the skewed perspective makes you feel very slow walking vertically
yes, I did
hmm, rotating the ground to the camera angle instead seems to work
kind of impossible to work with though
I dont know what to do anymore, I cant find anything useful on this
most good isometric games are actual 2d but I have no 2d knowledge
this is what I mean https://gyazo.com/ddf330a2f4af19b12ea4362c554a3bac
like surely that isnt right? do any games actually do this? and if the vertical movement was "fixed", then you couldnt walk along the diagonal cubes at the start like that
Shouldn't if you did the math right
if man runs at 1 floortile/sec you'd expect him to have the same speed in all directions right? Taking 1s to go from 1 tile to another no matter the direction
theres zero reason you can't just do it and have the isometric come from the camera
Show the math for when you press W
and run "up"
closed it now, but theres nothing, its literally just default character movement
and as I said, the movement IS consistent, its the camera making it look wrong
the camera is angled downwards so of course it feels faster horizontally even though it isnt
just like how forward and back looks motionless with a flat orthographic camera
mind elaborating on this?
lol
what?
XD
im deleting that message
thats embarassing
wow might even leave server too after that (kidding)
that is TERRIBLY embarassing though
thank you!
well... its working now... but at what cost
wait no it isnt working anymore shit
at least its not being printed and ive fiddled with duration values
this is dirty btw
not sure what that means?
Usually you dont want to modify it directly like that, it works but a cleaner way would be to create a function in your game state that decrements the cats and from that cast you only call that function
interesting. still not sure the difference between events, functions, and all that lol. I tried reaidng the docs but still didnt understand, might watch a youtube video on it.
A event is basically the same as a function
You cant do latent stuff in functions
So everything time based wont work
so whats best practice? always use function unless you need time?
yes and if you dont need a return value
alright, this may be a misunderstanding from me but wouldnt the amount of cats be a return value?
ye it is
which is, it is a return value or it is a misunderstanding
Its a return value
alright. So instead of using a function i would use an event
youre confusing me here lol
i need a return value, but youre saying to use function (no return value)
Functions can have returns
Events dont
If you need a return use a function
For this task you dont necessarily need a retrun tho
you can do it with a return, you can also just read out remaining cats with a getter
in your gamestate in a function
Decrement cats - cats-- return remaining cats
or you can just do the cast - decrement cats - then you take the cast again and say - get remaining cats
both give you the value
ill definitely just use a function
thats cleaner ye
you said it should work right now though?
i thought it worked for a milisecond in the top left. I stopped play and started again and it did not work
does this event even get called ?
yeah. The material works fine just the print doesnt
probably because you havent set this game state
im going to shit myself if this is why.
god fucking damn it
how do i get my actor to interact with the gamestate function?
wait
cast
You call functions with your cast ofc
cast = you can access all variables and functions of that class
ahhh
and casting here is fine because game state is always loaded? (checking im correct)
ye
awesome
the cast itself ias also not the problem
the cast is really cheap
the problem with it in blueprints is
If you cast you create a dependencie to the thing your casting to
yeah hard reference
exactly
for other blueprints that are not global like game state you should look into delegates, components and interfaces
or do proper inheritance so you know when you can cast and when not
i see. Interesting
little confused on this. I create a new custom event?
It's referring to how you set stuff up in general. A common method is using things like event dispatchers to notify when something has happened. This allows for the things listen to them do something.
i guess ill have to learn about how event dispatchers work. Where would i create the event dispatcher, gamestate?
Why would you want to do that ?
its what pattym just said?
He said set up a dispatcher in your gamestate ?
no. He said setup a dispatcher, and i asked "where would i create the event dispatcher, gamestate?" as in im guessing id create the event dispatcher inside of gamestate
Originally he said dont use bindings because they run on tick
yes he did say that
youre confusing me
and that a way better way is to use dispatchers
okay
Are you using a binding in your gamestate ?
so youre saying to place it in the ui event graph?
i see
still not sure about event dispatchers, ill have to learn
oh, i think i may have figured this out
nvm i still got zero clue lol
Its just another way of decoupling
ngl still confused
gonna continue watching a video
ohhhh ive got it now
Just for clarity, the 'property bindings' in widgets for those who aren't as familiar with UE.
You bind to event dispatchers so I don't want people getting confused. ๐
Event dispatchers are great for widgets. Using the 'create event' node, you can use a widget as a target and have it call a function on widget. The widget doesn't even know it's bound to something.
alright so ive got this. https://blueprintue.com/blueprint/sljilm1p/
on the last bit of code, what object do i put in?
Any ideas why im getting this camera stutter when the camera moves back?
not doing anything weird with the timeline i dont think
that was my guess lol
looks like it dips down no?
its been a bit since i used timelines but that doesnt look right
it eases in and out
no clue then
the points are set to auto, the timeline that zooms in has the same curve and its fine
following up on this, anyone know?
i m noob but nothing came of or true feel weird to me
Hey guys, I want to let a vehicle follow waypoints. But my vehicle doesn't move and I didn't find any tutorials that are useful for my case. That's the bp in my car. As car I use the BP_OffroadCar that comes with Unreal Engine. As Waypoints I placed BP_Waypoint actors in the world and added them to the Waypoints array.
Is there a way to check if a given player controller has a particular UI class in its viewport?
I am trying to make contextual text appear on the screen without depending on the specific pawn.
how to implement sitting in a chair or laying in a bed in FPS with no skeleton?
like interaction
press e to sit and then i sit and i can move camera around?
No skeleton? So you just want to animate the camera as though it were a head?
yes\
You can put a slot on the prop and have the camera snap to the slot in whatever position and rotation would fit best.
ive tried with set view blend it seems to work somewhat but idk jsut getting someone else's idea how to 'properly' implement it
Hi!
I'm using this to move a Pawn, but it moves in a straight line. How can I make it move in a zigzag pattern?
Thanks!
im currently woking on a project where the players movement is based on increasing physics linear velocity, is there a way to put a cap on the velocity?
I'm comparing tags hard coding their names. Is there a way to do it without hard coding it?
Depends on the context, what are the tags? what are they used for? where do they live?
DId you add a navmesh to your level?
Also moving in a loop like this won't work, since the entire loop executes on a single tick - meaning the car would always go straight to the last waypoint in the array.
You should be able to easly find a tutorial on AI following a waypoint, there are many of them. Like this one, although I didn't check if it is a good one, this guy is a hit and miss with the quality sometimes: https://www.youtube.com/watch?v=WqcDNlWEgsI
Hello guys, in this quick and simple video we are going to check out how to make an AI follow a waypoint path while patroling in Unreal Engine 5
โช๏ธJoin My Unreal Club: https://gorkagames.club/
๐Download Free Unreal E-Book: https://bit.ly/Free_Ebook_MasterUnreal_GorkaGames
๐ฅDiscord: https://bit.ly/GorkaGamesYouTubeDiscordServer
Simple ...
No I forgot the nav mesh. And I will change the loop. Thank you
Depends. You can use the get all widgets of class node to get the widgets if they exist. But I don't think it is a good way to do it, especially if this is a multiplayer scenario and the server needs to know this.
I would usually recommend making some UI manager component that would keep track of all of the current players widgets. It coudl have functions to poll which widgets are active or even some replicated variables for this if needed.
Or you use a one main widget as a manager. Then this one adds and manages other widgets so it has knowledge what is active and what is not and can add additional context easly
You are only checking index 0, what if the tag is not at index 0?
If you just want to check if an array contain an element, there should be the contain function. So this way you can check for a tag, regardless of the element position.
also a better way is to use GameplayTag.
Helps your self from making typo especially on tags that are used in multiple places.
Why doesnt this work? this runs every tick but when i print the value it doesnt change even though both actors are moving
post entire code, and maybe a video of the test.
EQS and vector math.
To move in zig zag pattern it can just be as simple as moving 45 degrees to the right from current position, forward by Y units then after X time, move 90 degrees to the left forward by Y units.
but you will need EQS to make movement viable. If you are not familiar with EQS, start something simple with it.
how are you printing the result? what is exactly being printed.
i removed the print, i was printing the look at rotation and it never changed
the print was placed directly after this
ok so i did some testing and neither of these are changing even though the actual locations are, this is placed in a function so i dont know if that has any effect
this works for me
find nearest actor is just finding itself, because it itself is in the array
simply take self from the array then.
the print string still repeats the exact same thing
cache the array like my screenshoot then work with that array,
still doesnt work
I'm not sure how you are printing them, if the Sheep root is the player too for example, and you placed multiple instances of Sheep root in the map.
Sheep Root Y closest Sheep root maybe Sheep X. And if neither are moving then the value isn't gonna change.
to test, make sure you only place 2 instances of the actor.
the player is a child of the sheep root, there are 2 children of sheep root on the map
both are moving
i figured it out, i thought the sheep were moving but it was just a component of them, not the root
is there a way to get a specific component of the return value actor?
depends. If there is only one component in the expected actor then you can use Get Component function
get component by class
In the dropdown you can look for the component you want
after that its a good idea to do a isvalid check on the component
Hello, if i have a static mesh file, is there a way to rotate it and have it apply to all instances of it permanently? thanks
Yes by rotating it in material or spawning the mesh in Niagara, blueprint will kill your performance if you want same rotation for the same mesh on multiple instances
If you want to change the base rotation of a static mesh, put it in your scene, go to the modelling tools, rotate your mesh and then bake the transform. Save it.
Every instance of it after that will now have that rotation.
How do i bake transform?
trying to launch my packaged exe and getting the error below.
I have no idea why it's getting the D drive as unreal is not installed there neither is the project or packaged file.
Is there a way I can see what file is causing the error?
`Fatal error: [File:D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\Misc\PackageName.cpp] [Line: 924]
FilenameToLongPackageName failed to convert ''. The Result would be indistinguishable from using '' as the InFilename.
0x00007ff7d8f03e20 TalesCombat-Win64-DebugGame.exe!FPackageName::FilenameToLongPackageName() []
0x00007ff7d8f23af9 TalesCombat-Win64-DebugGame.exe!FPackagePath::TryFromMountedName() []
0x00007ff7d8fb84d3 TalesCombat-Win64-DebugGame.exe!UE::Serialization::GetLinkerLoadFromOwner() []
0x00007ff7d8fc0736 TalesCombat-Win64-DebugGame.exe!LoadPackageAsync() []
0x00007ff7ddc487a9 TalesCombat-Win64-DebugGame.exe!UGameplayTagsManager::LoadGameplayTagTables() []
0x00007ff7ddc4747b TalesCombat-Win64-DebugGame.exe!UGameplayTagsManager::InitializeManager() []
0x00007ff7dfbfbc89 TalesCombat-Win64-DebugGame.exe!UEngine::InitializeObjectReferences() []
0x00007ff7dfbf3dfa TalesCombat-Win64-DebugGame.exe!UEngine::Init() []
0x00007ff7dee3fa28 TalesCombat-Win64-DebugGame.exe!UGameEngine::Init() []
0x00007ff7e007dca1 TalesCombat-Win64-DebugGame.exe!FEngineLoop::Init() []
0x00007ff7e0091cce TalesCombat-Win64-DebugGame.exe!GuardedMain() []
0x00007ff7e0091e6a TalesCombat-Win64-DebugGame.exe!GuardedMainWrapper() []
0x00007ff7e0094b62 TalesCombat-Win64-DebugGame.exe!LaunchWindowsStartup() []
0x00007ff7e00a1a84 TalesCombat-Win64-DebugGame.exe!WinMain() []
0x00007ff7e4a2df0a TalesCombat-Win64-DebugGame.exe!__scrt_common_main_seh() [D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
0x00007ffadc96257d KERNEL32.DLL!UnknownFunction []`
D: is the EPICs path, cuz your likely not using a source build, instead your running from EPIC, which is pre-compiled on someone elses PC basically.
What the log, or context, right before this?
That could provide insight, into the specific file, or etc.
Make sure modelling tool plugins are enabled. Then you'll find it here.
What do you mean what is the log or context right before this?
Im trying to launched the packaged exe
Oh, I miss-read. lol
I saw packaged exe, and assumed this occured during packaging/ cooking.
Not on startup.
Hello! I've been having a hard time finding a way to teleport a level after it is loaded. I'm creating a system which loads a level instance when the player gets to a door, and attaches that new level to the doorway using an "attach point" blueprint in each level. The connector ("from") blueprint, representing the doorway the player walks into, loads the next level as an instance. It then uses "Get All Actors of Class With Tag" to find the attach point in the next level and subsequently move it so it lines up with the doorway. In theory this should work. I simply move the new level to the correct position/rotation after the attach point is discovered, but unfortunately it seems that you can only set the level's transform after it is visible. I don't know why it's not possible to reposition a level during runtime, given that baked/static data would all conceivably move as one, but I suppose I'll just have to work within that.
Basically, I need to reference an actor in a level before it is loaded. To my knowledge, this is impossible.
My current thought is to make an editor utility script in order to automatically store the attach "to" points in a file adjacent to each level, though such a method is not very dynamic and I really prefer not to do it if possible. I'm sorry if this is a somewhat out there question, but I'd greatly appreciate any ideas or advice on how to do this. TIA!
Couldn't tell exactly where to post this. But I'll try here too!
I'm using the new Game Animation Sample Project 5.7 with the Mover component, and I'm noticing, when using my custom metahuman, a twitch during a state change (from crouch > stand in this example), this is not as prelavent on the other characters, what could this be caused by?
This issue is NOT present when using the Character Movement Component.
Is it because the metahuman is Cine quality? Maybe it's having a hard time adjusting higher polycount?
This mainly happens when the character stands from crouching vice versa, or subtle elevation shifts.
Replying to myself with a solution in case anybody runs into this issue as well:
Keep this event chains from BP_Kellan (OnAnim Initialized Body/Face) even if Live Link is disabled, this seems to fix the stutter that comes from the Mover component.
My next question would be, could we move this logic for Motion Matching rebuild to the Player Controller ? Currently it runs on the Level BP.
Doesnt look like it matters much where this code is placed
It does seem to increase the sizemap a bit to 1gig
with all the PSD
i guess unavoidable ๐
That is a ridiculous amount of anim data. O.o
I wonder if there's a way to build the PSDs async
Ye there are a lot of animations in the tables
Is there any particular reason why four days ago you spammed a shit ton of channels with a waving emoji and now just did it again?
Basically for each possible position the player could be in you have a animation
- all the variable stuff Running to full stop - running to walking - running to backwards etc
Yet another fancy feature that no studio can reallistically support besides maybe AAA
alltho you can get away with much less animations and it still looks somewhat ok
I ended up frankensteining it together with og blendspaces
any idea on this?
@last peak, you remember the game im making right? (sorry for the ping)
well, im trying to cast to bp_hud but i cant find what the object needs to be.
ive even googled it, it says that you cant cast to hud but i dont know.
this is inside the game state
Is the BP_HUD an AHUD or UserWidget class?
i think userwidget, although can you let me know the difference?
Where did you create it?
thats a bit vague, elaborate?
im just not understanding sorry
If you think it's a userwidget then it was created somewhere.
CreateWidget node, with that class specified.
it was created within a hud class
Did you save it into a property after creation?
i did not
didnt evne know that was a thing
Can you show the CreateWidget node where it's at?
You did save it into a property.
oh, thats what you meant?
ive got it saved as a variable, i didnt know thats a property
So in yout other thing where you're trying to cast to BP_HUD. What class is that?
its a widget blueprint
Had to check something. In the place you're trying to cast, you want to GetOwningPlayer. Drag off of that and do GetHUD. From that you want to cast that to your NewHUD. Then you can pull your WidgetVar.
what would the target be for GetOwningPlayer?
oh
none needed
if i may ask where did you find that?
UserWidget's source code.