#blueprint
1 messages · Page 358 of 1
So I would have to make children of every item in that array, then? When the loop sequence finishes?
You'd use the loop to add them to the grid
ForLoop -> CreateWidget -> AddChildToUniformGrid (math out the row and column)
you need a reference to the uniform grid aswell
I'd typically have this logic inside the widget itself
e.g. WBP_CardStack , adding WBP_CardStack_Entry to the grid
@gentle urchin It's actually part of a function within the widget itself.
nice
so you'd need to add the uniform grid in the designer
and input that as the target for add child to uniform grid
This widget is for one single button, though.
one single card?
Yes. I was given a suggestion to duplicate it by means of an array and a For Loop sequence.
which is just one of several going into the main widget
So we have
- WBP_CardDeck
- WBP_CardDeck_Entry
You missed the part where you were supposed to have a main widget, that the cards are being added to
CardDeck contains 1 to many CardDeck_Entry
Or the owning widget, whatever you wanna call it
im doing this exact thing with my inventory rn
Inventory in my case has the container that all the inventory_entry goes in to
To help further explain, this is what the main screen currently looks like. This screen is on a level map representing the difficulty level. The two widgets that spawn are the HUD (above) and the cards, so far. Later, I will add two score numbers and a timer to the HUD UI.
Hold on, are you planning on using widgets as the data authority?
Nono, relax
Phew
Is this a 2D game or 3D?
2D
no its visible
Are you doing the 2D through Paper or through Widgets?
Widgets, since that's the only method I know of and have worked with.
Should be possible, though you might hit some walls.
Anyone know how hard it is to draw a widget onto a plane in 3D space?
I'd say this isn't exactly the same as putting in 2D text on a 3D wall or a texture on a cube.
You'll have a much easier time if you use world space for moving and arranging 2D widgets, rather than doing it all through canvas. Canvas widgets tend to have really particular arrangements and hierarchies, since they're meant to change size frequently.
That's also how you can do fancy stuff like flipping cards over.
I see. I do intend to have a dealer playing, too. This game is inspired chiefly by the game of blackjack, after all.
Have you used Unity at all?
No, really because it costs money to do so.
They have a VERY good UI system for this kind of thing. Could help you to compare and find equivalents in Unreal.
For them you can have UI render to screen space, camera space, 3D space, or a texture.
That would explain why I've seen some games like this made with Unity.
wasnt there like a card game template for ue aswell
I never knew that, actually. Then again, I try not to use too many preexisting ones because I planned on making the game retail, some day. I don't want to cheat.
it's not cheating , its just not reinventing the wheel 😄
but it can be hard to find a good base tho
to much low quality templates out there
Here we go:
You create an actor, give it a Widget Component, and have the widget render onto the actor.
Use actor for position, use widget for appearance.
pretty straight forward
I have been trying to make progress in a separate RPG project, but then I thought I'd try to make this one in the meantime in the hopes of making some money for production capital.
Huh...I'm glad the name of that video is there, because I can look that up and follow it.
Here's a link https://www.youtube.com/watch?v=dKqb_2Y5Fb4
Let's build a deck of cards in Unreal Engine.
This is an edited version of a livestream. The audio is bad at parts, but it is better in the livestream version if you find it distracting. You can watch the unedited version here: https://www.youtube.com/live/MbRkBVncYEY
Join the Discord: https://discord.gg/NPjFd8uT22
Bluesky: https://bsky.app/pr...
Thanks! I'll be sure to give it a look in the morning.
In the meantime, I've just bookmarked it.
I have been trying to make this timer work on my game, i have almost copied exactly from unreal sensei: https://www.youtube.com/watch?v=1XjgLKrb4_M&t=5746s and the timer works, but i was trying to create it so the timer goes up, and also so the timer can pause once all targets have shot(and eventually a leaderboard) . i ended up getting the timer to go up, but making it pause when hitting all targets i cant seem to do? Ive even tried setting it so that when a button is pressed it pauses, but i cant seem to get that working. im using blueprints for the most part. just seeing if anyone would be able to help me
UE5 tutorial for beginners! In this free course we will create our first game in Unreal Engine 5. We will go over the fundamentals of how to program a game using UE5's visual scripting language called Blueprint!
Get the Unreal Game Developer by joining the Unreal Masterclass:
https://www.unrealmasterclass.com
Downloadable Assets to Follow the...
Aftert the SetTimer node, you can drag from the blue pin and promote to a variable. This will give you a timer handle variable.
You can use this variable to pause/clear the timer.
Where to pause it depends on your implementation though. If you already made the pause button code and it doesn't work, you would need to show us the code
It should, if the input is triggered. You can add a print before the pause timer to make sure it is triggering
Update on my mask issue, I got it so its now its showing hole on mesh at location actor is placed at on X axis and when I move object placed on x axis the hole updates position for along x axis, but if I plug any value into the Y axis the hole vanishes from surface completely...
but if I unplug the Y value hole appears at correct location on x axis.. here are my updated blueprints encase anyone can spot what I am messing up..
If anyone thinks t hey might know how to fix this please feel free to message me.
Hi, this is a question more about the viewport side of BP, instead of coding, but is it possible to use vertex snapping inside BPs? V doesn't seem to work
Hey folks
I have an array of actors in my main actor.
I want to get the 8 closest actors (meaning horizontal distance). What is an efficient/easy way to find those?
I guess I need to get my array sorted by distance somehow. Then it would be easy from there.
So any help on how to sort arrays/maps in general would be helpful.
quicksort
if you're looking for a bp only solution i got a snippet on the forum
c++ and bp variant
There is a node called FindNearestActor. You could make a copy of your actor array, use this to get the nearest one, then set the index in the copy to null, repeat until you have your 8 actors in an output array.
But to make this sort of thing more performant you would need to do your own sorting as said above. Especially since you want to take only horizontal distance into account.
That tooooo yes
Thank you both. 🙂
Blueprint Runtime Error: "Attempted to access missing property 'none'. If this is a packaged/cooked build, are you attempting to use an editor-only property?". Node: Multi Capsule Trace By Channel Graph: EventGraph Function: Execute Ubergraph Ledge Component Blueprint: LedgeComponent
Does anyone know what could be this issue?
This is the screenshot from the tutorial, apparently my unreal 5.6 didnt have this because when i search for it, its not there. Anyone know what's the subtitute for Add (Vector) in the Control Rig Blueprint?
#control-rig is where you'll want to be. Even though they appear similar, they're not strictly the same as blueprints
is the 'Contains' node for arrays an exact match for strings? Because I don't think its unless I am doing something wrong. For example I have an array of strings
"Epic String Named Bob"
"Epic String Named"
"Epic String"
If I use the Contains node and enter "Epic", would it return true even though there is no string thats exactly just "Epic"?
Ok good ty
Getting a bizarre crash in the Editor when transitioning to a new level:
[2025.10.14-12.57.31:097][403]LogWindows: Error: appError called: Fatal error:
[File:D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ReferenceChainSearch.cpp] [Line: 2038]
Fatal world leaks detected. Logging first error, check logs for additional information
(refcounted<2>) (Garbage) RemoteControlPreset /Game/Maps/YourGame/Gen_03/World_00/UEDPIE_0_Game_World_00_Level_00.Game_World_00_Level_00:PersistentLevel.AvaScene_0.RemoteControlPreset
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^ This reference is preventing the old World from being GC'd ^
-> UObject* UObject::Outer = (Garbage) AvaScene /Game/Maps/YourGame/Gen_03/World_00/UEDPIE_0_Game_World_00_Level_00.Game_World_00_Level_00:PersistentLevel.AvaScene_0
-> UObject* UObject::Outer = (Garbage) Level /Game/Maps/YourGame/Gen_03/World_00/UEDPIE_0_Game_World_00_Level_00.Game_World_00_Level_00:PersistentLevel
-> UObject* UObject::Outer = (Garbage) World /Game/Maps/YourGame/Gen_03/World_00/UEDPIE_0_Game_World_00_Level_00.Game_World_00_Level_00
[2025.10.14-12.57.31:097][403]LogWindows: Windows GetLastError: The operation completed successfully. (0)
Unreal Engine 5.6
Source of RemoteControlPreset is from the "Remote Control API", which is needed by Avalanche, and I use Motion Design so removing it is a no go.
Tried googling for the issue, but no solid leads. I also remember running into this issue in 5.5, except it wouldn't cause a crash of the editor, just an error output.
I removed all Avalanch actors (Text actors) from the level, tried to reproduce the crash again with the expectation that it wouldn't crash, however, it did again crash.
Do you know what RemoteControlPreset is?
If I'm understanding the code correctly, the TLDR is that you have things referencing the level itself that shouldn't.
Hey Authaer, would you able to locate the video for the drag and drop talk? X_X I can't seems to find it.
hello, i have an issue with a simple blueprint. I am trying to create a random NPC "generator". It takes randomly a skeletal mesh inside an array, and depending on the skeletal mesh, it assigns a random texture ( that fits the skeletal mesh. ) However, I dont understand how but the value between the switch node, and the print is sometimes different. How is it possible ? The 2 screens are on the same execution, you can see that the picked skeletal mesh is different
Ok so I figured this out. The random is executed each time the out item is called, so I needed to promote it to a variable 🙂
god damn chat gpt is so bad with unreal..
this should be easy.. I have a Current Parent Name Variable.. I know it's somewhere as the first element in a struct.. I have an array of structs. all i need is the index (or actually, the other values part of that struct.. so I need to find which index in the array my current name matches the name in the struct.. how do i set this up??
i could make a map at begin play to simplify.. i want it to output the index when i give it the name but i can,t find the node that does that
ah it's a name map.. with index mode.. i had it the other way around...
Is this overkill?
Its memory vs cpu instructions optimization
ah so what i did uses more memory
You pay with memory for less iterations
ok.. intuitively i think it makes sense for me to do it.. but i might be wrong
because the other way would be to go through the parents list and find when it matches?
Unless your array is in the thousands
i feel like this is heavy but idk the inner workings of this stuff well enough to judge
yeah it's probably light either way
Unless my array is big, i usually just loop it
Inside a function with early return
early return meaning it stops when it matches?
yeah i guess i'm overthinking this
And return the found data or index
I avoid making them pure, as to avoid multiple unwanted executions
ah? hm not sure i udnerstand that part. I thought the only advantage of not having it pure is to handle exceptions?
Nah it properly cache the output aswell
this will go through the whole array even though the first one was a match right? so I'd want for each loop with break?
Pure nodes dont , and gets called whenever an exec node is connected to it gets executed
On true you simply call return
Exavtly
oh wait.. i can optimize.
Because if we dont find it, we want the outside to have a chance to react
ah yeah
99% of the time thats just some log / print string to tell me what went wrong , and just exit exec right there
actually in my case i should handle this type of error way earlier in the chain
yeah
yeah my current parent should probably be the struct actually.. instead of just the name
yes as is with every blueprint pure function. They are evaluated per exec.
hey folks, im running into an issue where my state tree keeps running on an actor that is destroyed, i basically have a timer inside the task that executes every frame and i just cannot get it to stop. have you ever ran into a similar issue?
is the actor an AI that got killed ?
StopLogic (which stops the ST) is run on EndPlay on the state tree component
but the state tree component is placed on the AI controller, which isnt dead at this point (as far as i know)
so what you can do is listening for pawn OnDestroyed on possess and call StopLogic yourself
or listen for UnPossess event
should I just do it, and stop hesitating in learning unreal engine?, I keep having tabs tutorial videos open, I have a idea of what I want to do, but the Fact that I know what I would be doing first time is going to suck and Ill be redoing everything a dozen times somehow makes me hesitate in diving into UE5,
no experience Dreamer I am lol
Yes, just go try to do a thing
and make that thing SIMPLE
I've worked with the engine for 10 years and still end up redoing stuff all the time
im trying to make a bp that plays a video clip inside a ui when the player overlaps with it, with the bp getting the video assigned in each instance, but i cant get it to play the video i get it to assign the texture inside the ui but then its frozen on a frame of the video
Have a laugh at my expense😄
But it works tho!
when you skip the for loop, you end up with a blueprint spaghetti mess 
I get more and more horrified the more I look
Is that like a billion individual timelines?
You are supposed to use blueprints for programming, not to draw art with them
Nah this was when i was starting my first game and instead of just using and setting a variable i went and connected everything manually😂
Yes those are timelines but only one can fire at once 😂
would that have performance issues?
Nope not really it worked just fine i guess since nothing changed after i optimized it xD
It was just a massive branch nest, branch after branch so only one could fire at once, and it was an event that didnt trigger often
Protip: you can change the curve used by a timeline dynamically at runtime. 🙃
imagine giving that bp to a newbie 😅
I was hoping to add some wind platforming to my project. so basically my character or anything with physics gets close it pushes them back and gives them a big jump boost basically. But still being somewhat new to unreal and never delt with this before. I tried finding a tutorial or something and I couldn't find anything. so can anyone help me out what ever the simplest way of doing it would be.
Grr
anyone know any good resources for a camera system that helps keep the target in frame?
what i mean is rather than rotating to them, the screen can zoom out to keep them in frame
Does anyone have an example of sorting a struct array in blueprints only?
sounds like you just wanna make your own custom camera manager
and some logic for mathing out what zoom you'd need to keep it in ithe viewport
went for a simple route atm of just pulling back the camera based on the height difference between the player and the enemy
simple is good
just like sorting anything really
what criteria are you sorting by ?
It depends. Could be any of the primitives.
the point is, you make the rule for the sorting. As for the sorting wether it's a struct or a primitive data type, there won't be any different.
Dump the one that meet your criteria to a temporary variable, then you can set the variable to the temp variable after you are done with sorting.
If you never attempt sorting before, you can just practice sorting an array of integers.
Bubble sort would be the easiest algorithm of all the alternatives.
I was hoping someone might have seen an example graph somewhere.
I strongly recommend doing it your self, once you can sort an array of integers, you can pretty much sort anything just by changing the rule.
It is common knowledge that blueprints do not include sorting functions. In my previous experiences, I have been able to create simple sorting functions easily. However, during my current project, I faced the challenge of sorting large data arrays and found that the sorting process was either very slow or unsuccessful. Since I wanted to avoid us...
macro wires always kill my brain X_X
someone put a ton of work into this 😄
even tested them
also LE Extended Standard library got some sort functions integrated
Yeah but when people need to make their own rule for the sorting, they will be stuck if they don't know any sorting algorithm.
So. Freaking. Expensive.
define large arrays
5k+
you can get away with bp only still, but you might need to frame slice it
that's not too bad tho, you can split into multiple DT's as workaround and use select based on whatever criteria
also this, I do delay to next frames or on batches whenever it gets nasty
I will not use blueprint to iterate over array that large
and it's probably copies for struct
it does indeed
Can someone please explain, why in blueprints I can't manually make a variable/parameter of type TSoftObjectPtr<UWorld>, but if I drag from a pin of that type and use promote to variable, it creates a variable of that type just fine?
world type not exposed to blueprint by default. Ask epic but If I have to guess it's probably to protect designer where they accidentally load levels they don't even open.
I know, and that's the other strange thing I don't understand. If it's not exposed, then why can I create a variable of its type via promote to variable? Is it a bug or feature?:) Also, I've tried this as workaround:
USTRUCT(BlueprintType)
struct FTcLevelWrapper {
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TSoftObjectPtr<UWorld> Level;
};
And using that wrapper struct I can also specify variables of that type and set world in default value/K2Nodes just fine
Not sure what you need a wrrapper for? Just declare a UPROPERTY for your class.
I want to be able to create a variables of type TSoftObjectPtr<UWorld> in BP classes
if you can already do cpp do your self a favour and just declare it in your native class.
But by default I can only do that via promote to variable
This way you can access the variable from both world.
I'm working on a project with people who doesn't know C++, so we want to keep C++ part as small as possible
personally I have almost 0 variable declared in bp unless for very simple stuff (mostly widget logics).
I don't want to work on a project for a year and then one day I need something in the C++ world and suddenly I have to refactor many codes.
So they can understand everything what's going on in the project
Yeah that's not an issue, they don't need to know C++, the person that is capable can expose the variable to blueprint.
It will be accessiable by designer.
Anyway, I'm just interested how and why this works. If anyone know, please tell me. My current guess is that you can only create FSoftObjectPtr variables in blueprints (without a type information), but if you promote a typed one, this somehow gets stored with type information (even if it's not exposed to blueprints, which is probably a bug) . But you can't create them manually via editor. I guess this is some stuff hardcoded somewhere deep in the engine
It's not to do with soft object ptr but the type it self. World is not exposed by default, soft or hard ref.
Yes, but it's exposed if it's a UPROPERTY in C++ defined field. (Or UFUNCTION parameter). And using that parameter you can promote in to variable in blueprints just fine. That's what bothers me. Btw, you can set it in blueprints if it's FSoftObjectPtr variable. You can't make a soft object reference specifically of that type though. (Again, unless creating via promote to variable)
Yes it's not exposed by default. I gotta expose one for my self too for my save game.
the promote to variable can be a workaround but it is what it is.
it's been like this for many version, you won't see it exposed anytime soon if ever imo.,
Probably took some shortcut when blocking the blueprint usage
Returning to this topic,
I created them as billboards, but another problem arose.
Billboards must face the player, that's true, but the player is on the field, so I have to block rotation only for the Z axis so that the player doesn't see the corn stalks hitting the camera.
Is there a way to achieve that? Or I need to try smth else?
"if pintype = UWorld then hide from selection"
im a biiiit curious why you'd need to have the uworld to save tho ?
I think because your creating a World ref from the level code but in bp your uworld ref would be on the bp your using
Material logic
For those wondering I figured it out by making material that faces the camera exactly as I wanted
Performance rocketed by 50fps boost, so that's amazing news
Logic for normals is cool as well so I leave that for those needing it on the screen
If you wanted to add wind etc that would also be a material thing
Yeah I need to make some research on that note too
anyone able to help me figure this out?
anyone able to help me figure this out?
Anyone done a 'complex world map' similar to World of warcrafts?
Im trying to show the whole world map with different regions - you select one region and then get a zoomed in 'second map' with more details, I think i can do the second map part alone; my question is; for the first world map with regions to select; would a png with transparency be good enough to be used for a 'selectable mask'
the actor is an ai that got killed yes, i cant seem to destroy deactivate or do anything to the AIC or the state tree this is what i've tried so far
I dunno if this is necessary but this is how I destroy my ai and I don't seem to have problems with the BT running after destruction.
This is a BT task
If you destroy the pawn, the controller will get destroyed too
(Unless there is some option to prevent it somewhere, dunno)
The reason why is that they don't want people to be able to create a hard ref to a world in BP (Normal blue object pin) Creating a world ref is just blocked for this reason.
They created a struct that has the soft world object in it as a work around.
thanks for the reply, yeah i guess i gotta make a dead state that will atleast prevent from other states/tasks running but it still sounds really sketchy
Hmmm, I'm not too advanced in the AI but I think timers don't "belong" to the tree and that is why it keeps running when the logic is stopped. Maybe you could try to use the override on ReceiveAbortedAI to clear the timer? And see if this fixes the problem. But it is my guess only, I didn't have a problem like this before
Btw, #gameplay-ai would probably be a better place for this quesiton, it seems specific to AI
Hey! I'm completely new to Unreal Engine and just started learning Blueprints today, so I'm trying to do some very basic things for now. I'm trying to create a simple button to move a door, the interaction works fine, and the button animation plays correctly. However, when I try to move the cube, it completely disappears.
At first, I thought it might be because of my Timeline node, but even when I try to move it by just 0.01 from its original location, it still disappears.
Any idea why? There must be something wrong in my Blueprint, but I can’t figure out what.
Thank you! 🙂
First image is my BP_Switch and second my BP_Character
Root component doesn't have relative location. The root component is the actor itself, so it has the world location of the actor. Also setting the location variable is not connected - I don't know if it is assigned anywhere else, but if not, you will find your door at 0,0,0 in the world space.
Okay, so I basically need to always have my Blueprints connected to an event. I thought it wasn’t necessary to get the location at first, so I just changed the node to get the location and connected it to a Begin Play and that fixed my issue !
Thanks !
This is what im trying to do 'Custom widget buttons' But am struggling to get the mask correct; anyone know of any tutorials on this ?
Overlayed custom buttons maybe
Just to add to what's already been said, don't handle the movement from the button. This should be done in the door itself. The button should be like 'oh i've been interacted with. You over there, do your thing.'
This allows the button to be reusable as a trigger for other events.
Oh okay, I’ll remember that for next time, thanks for the advice!
Hi again!
I'm trying to generate chunks the same size (now literally the same actor) when player is moving
I don't have any idea how to manage that cuz every tutorial I found was smth like minecraft or smth based of mesh
Just trying to do smth small and easy to manage, don't even want to save chunks that are already generated (my idea didn't need that at all)
Hi! I'm working on saves/loads in UE 5.6. For some reason when I load the game, it starts at the 0,0,0 coordinate and not the location I saved. Does anyone know anything about this?
bpthirdcharacter
This doesn't show enough. How is ShouldLoad bool determined? What is inside LoadSaveData?
But at this point you could plug prints to the cast failed and to the false branch so you know if it fails there
It didn't work for me because I had this disabled. The saves are so complicated that it's easy for this kind of thing to slip through the net.
Thanks anyway! I'm new here on the server, the help is appreciated.
[SOLVED]
Would appreciate help here on why this Blueprint is not working. I'm having troubles with this new Enhanced IA Input.
Basically, the script should have the player rotate their camera by clicking and holding Right Mouse Button.
Last two pictures are the Input Mapping Context and the Imput Action chosen.
[SOLUTION]
The Level was missing a Controller Blueprint (which is when you add context), the Input Mapping Context Blueprint (also called IMC) and a GameMode Blueprint to link them all.
Perhaps I'm missing the mouse movement axis?
If I need to format an FName is there a cheaper way of doing than converting to FText, formatting text with format node, converting text to FString, converting string back to FName ?
hi, having issues with: player goes up elevato box, BP , goes into levelsequence wher the eleavator action is, when plyuer getstotop of sequence, player floats in air and sometimes falls through box, box is transparent also, how to fix ?
If I have a widget that's spawne as part of a widget component, how can I get the component that the Widget is attached to? is there a way?
I need to get Widget -> Widget Component -> Actor
Unless things have changed, you've always needed to pass the component into the widget manually.
Crud.
I'm dealing with an issue where a pooled widget is store a reference to an actor that's not its current owner.
Why would you need to format an FName? As far as I know they shouldn't be edited on runtime if you can avoid it - since they are stored in a table internally, and editing them adds a new index to the table per each new FName - without deleting the previous one.
Yeah, FNames are not for formatting/manipulation.
Well it's to access a datatable row with a piece of text that can have dynamic parameters
It is still weird, but I would skip Text conversion, since this is for localized stuff mostly.
In blueprints you have a node Append String, you can use that to build a string from a name and some other signs/strings. The Name can be converted to string right away
Slightly shorter but yeah, there are no built in ways to edit a Name
There's probably better ways to do that kind of lookup than a data table.
Any way to deal with player controller being invalid on player death with destroy actor?
hi, i want make an simple character controller (player movement how used to be on playstation 2/wii games)
but i understand nothing of blueprints or cpp
Not sure I follow?
Just do a valid check, or like whats I guess "going on"?
Player blueprint destroys actor, sends message to gamemode, gamemode receives message and attempts to get player controller to respawn them at player start. The issue is using destroy actor in player blueprint also destroys the controller. So, the gamemode has no valid controller. I'm trying to avoid casting and using interface, would it be easier to show blueprint img?
Pass a controller ref, with this message?
Rather then try to get data from a now destroyed actor.
Well, your not valid checking anything, so?
But, send the restart, then destroy should do it.
Cuz, when its destroyed you can't technically get data from it
Even switching the two around, the gamemode gets the event, but the player doesn't respawn
Also thank you for trying to help, I really do appreciate it. Sorry for asking confusing questions 🙁 @next hollow
Odd.
Any logging in the log directly?
UE should provide some info perhaps?
LogBlueprintUserMessages: [DemoHorror_C_0] Gamemode received event
Whats UE?
Unreal Engine
I'm still not getting it. I'll take a small break for now
thank you
Is there a way to use the Delay node inside an Object derived BP?
I am trying to create a modular system for my gameplay, consisting of Actions
For example, In a cards game, there's an action for Drawing the Hand, Discarding hand, performing an attack, etc.
The Action class is derived from UObject, so as to have minimal overhead
But, Delay nodes are not available in Objects?
They are essential for what I'm trying to do
Do I have to use Actor for the actions? It seems a bit wasteful
Without C++, maybe not. Iirc there is filtering going on for what nodes are available based on the World being available. UObjects have no UWorld by default.
I see.
I'll go with Actors then
Look into the GameplayTask system.
Although if you're doing a cardgame, using empty actors should be fine.
Task? Don't you mean Ability?
Using Actors for this is probably overkill but if you can't create some simple C++ base class then you gotta live with that, yeah. You've found a limitation of Blueprints :D
I am aware of the Gameplay Ability system, but it always seemed like a bit complicated to use for a small game
I'll take a look.
GameplayTasks are different than Abilities
There doesn't seem to be much documentation about it
Is this what you're referring to?
https://dev.epicgames.com/documentation/en-us/unreal-engine/tasks-systems-in-unreal-engine
Thanks for explaining it a second time. Really helped me solve my issue
In the meantime, going to use Timers for now, seems like they should work just fine
I'll just have to chop up my code into multiple events
Na, that's something else. They mean GameplayTasks but I don't think there is much documentation about them. They are used throughout AI and GAS iirc, but I don't think or at least know if they can even be subclassed in Blueprints.
Timers might work cause the time manager sits on the GameInstance iirc
In theory timers are superior anyway and delay nodes are only really cool for single frame delays.
Just use the by event version please and don't use the one with the string param unless you really know what you are doing.
It should, btw, not be the biggest act to unlock BP Objects to allow nodes that requires a World Reference.
It's mainly up to you allowing C++ code in your project.
This is the problem that you are facing, fwiw. Don't want you to leave here without some knowledge.
#if DO_CHECK || WITH_EDITOR
// Used to check to see if a derived class actually implemented GetWorld() or not
thread_local bool bGetWorldOverridden = false;
#endif // #if DO_CHECK || WITH_EDITOR
class UWorld* UObject::GetWorld() const
{
if (UObject* Outer = GetOuter())
{
return Outer->GetWorld();
}
#if DO_CHECK || WITH_EDITOR
bGetWorldOverridden = false;
#endif
return nullptr;
}
They check if someone overrides this function in a child class.
By default, it will ask its "Outer" (which you usually specify when you create the Object runtime) for the World. But during Editor time, there is no Outer with a valid World, so this will never return a valid World and UE can't be sure that it ever will.
A lot of the nodes that you often use in Actor and Component Blueprints require a WorldContextObject to pull the world from. Example for such nodes are SpawnActor and LineTrace nodes.
While you might be passing in an Outer that returns a valid World (like an Actor), that will not happen until runtime, so this doesn't resolve the actual issue within the Editor.
This bGetWorldOverridden boolean is checked when you rightclick the EventGraph in the Blueprint. I don't want to bore or overload you with C++, but the image shows where UE checks if the function (event/node) is checked for requiring to override GetWorld.
The solution to that is relatively simple: You need a C++ child of UObject where you fully override the GetWorld() function and then inherit from that in Blueprints. That should, in theory, unlock the nodes you want to use.
Actually, even simpler, you can override the ImplementsGetWorld function and just return true I assume.
But looking at GetWorldChecked, I would rather have that boolean not be true in general.
To back this up, here is an image of a Blueprint that derived from UObject (left) and one that derived from a C++ child class of UObject (right):
GameplayTask nodes seem to be available, but you probably still lack a lot of other stuff.
The C++ class for this is just this (cutting some corners on clean code to keep the chat from being too much text :D). ImplementsGetWorld can probably be skipped.
#pragma once
#include <UObject/Object.h>
#include "WorldObject.generated.h"
UCLASS(Blueprintable, BlueprintType)
class UWorldObject : public UObject
{
GENERATED_BODY()
virtual UWorld* GetWorld() const override;
virtual bool ImplementsGetWorld() const override;
};
#include "WorldObject.h"
UWorld* UWorldObject::GetWorld() const
{
return IsValid(GetOuter()) ? GetOuter()->GetWorld() : nullptr;
}
bool UWorldObject::ImplementsGetWorld() const
{
return true;
}
I was actually interested at one point in this too.
Is it safe to expose object to a world like that? By safe I mean - are there possible bugs, or it should be fine as long as you do everything right?
And you have to provide the outer by yourself when creating this object right?
It's safe as long as you provide a valid Outer that has a UWorld.
In C++, nothing stops you from just doing World stuff inside the UObject by calling GetWorld() with such a valid Outer. This is mainly to block Blueprint users from using a UObject with stuff that requires a UWorld without having one.
The whole thing of being tied to a UWorld only comes into play with AActor and UActorComponent. Both are UObject child classes fwiw.
Yeah, I understand. I was reading on it a little when I was annoyed at the lack of access to a function library in objects
You can spawn UObjects in your UGameInstance, which has no concept of a UWorld and Epic simply blocks you from doing something bad.
Wow, really appreciate the deep dive @surreal peak
This is going in my Anytype database for sure 😄
I do work with C++ (just not in this project), so this is great to have for future reference
couldnt they provide some overrides for bp users to provide world aswell? 😛
Since the whole GetWorld stuff isn't even exposed to BPs, probably not.
Is it clean to make variables public in unreal or should one still go with setters ?
I have no clue why you ping me for that. Unreal is no different to any other OOP driven framework. Do what is best practice for those.
I just started with regular c++, sorry for pingin ...
If you aren't wanting to use some C++, one option is to pair custom uobjects with some sort of manager class (actor component). In the actor component on tick, have it call a function on you're uobjects and pass delta time to it. This can allow you to create your own timer like events. You can add a bool to the uobjects to determine if it should be tickable in context to the system.
I've used custom uobjects in BP only projects for a while so if you want any more work arounds/suggestions just ask. 😅
The game instance implements GetWorld and can return the current persistent level i believe. It also creates a dummy world to use before the actual intended world has finished loading.
I do find it interesting that things like actors and actor components get the latent manager through the world even though it lives on the game instance.
Although I guess this is because you can technically have multiple game instances with different worlds associated with them. (most likely for the editor)
Are the nodes inside a loop?
It is more likely that the debug shows wrong info than the math not working
they are not
I see one of the inputs is a variable. If you set it before the break, the pure node will show the current value of it
Not the one it had on input
wait what
Pure node quirks 🤷♂️
I just printed both of those entries and they are correct and valid
For variables during break it just shows the current value they have now, at least sometimes. I never actually tested which ones are affected by it, I'm just aware of it
Np. If you wanted to check calculations done, you need to break on the node with the execution pin the calculations are used in - like a Set for example
Just a mini-bump; If anyone knew about overlaping buttons with custom masks;
Thanks!
It took so long to find; but if anyone needs in the future:
https://www.youtube.com/playlist?list=PLAwXuttcXyAhkBQfJAkSoRau800DjMePo
I think so, but I haven’t done it yet Start with a complete LandScape to act as the terrain The boundaries are parsed from the image pixels and generated using Decal Because ordered points on the map boundary can be used to create a polygon plane This polygonal plane overlays the topographic map and serves as an administrative division
Hey folks,
When I play the attack montage on my GASP-based character, why does the migrated Paragon sword trail VFX fail to appear between the two sockets?
do you have the socket TrailStart and Trailend in your skeletal mesh?
anyone able to help me figure this issue out?
In ue 5.5 I've been facing critical issue.
Sub widgets variables are not updating . I've removed some text data from the array but still it's visible in gameplay UI.
How to fix it ?
debug, no one can say without looking at the code or have the project at hand.
Go up the chain, where things are meant to be updated. Go further up if not there and so forth.
very stupid question ahead: how the heck do I add a freaking new point to a spline in level editor/ i can't find the shortcut on google
I fell like an idiot
I'm pretty sure it is dragging the last point with Alt pressed
Thanks for your response: If you check the first image on the asset details on the left, I have the Trail Start & End.
Here’s also a video https://www.youtube.com/watch?v=q_AQD35CMdY
I've no more idea if you already have them sockets.
I having a lot of trouble with my interaction system, it's only registering the object in some cases, but not in others I also expanding the collision box, which did help because originally placing it on the counter here it wouldn't be detecting the item whatsoever, but even with a bigger collision it's still acting very strangely does anyone know how to fix this?
The collision box is honestly way bigger than I think necessary, but even like this its still acting weird
debug it, print string what you hitting.
See what you are hitting when hello is printed and when it's not.
hitresult.OtherComponent
Yeah It seems like if there's another object behind it is when it doesnt work
I'm pretty new to nodes how would I get that off these nodes
Okay I figured out how to get that working and yes it's picking up the object directly behind the screwdriver
Just going right through it for some reason
ye, just print what you are actually hitting and it will all make sense.
Correct the screwdriver's collisions.
First check it's primitive's collisions to make sure they block the trace channel.
If they do and it still goes through then open the mesh asset and make sure it has simplified collision generated for it.
I just remade the collision but It still goes straight through and hits the counter
I wonder if disabling the counter from being hit would be the solution here 🤔
Because when floating it works perfectly with the small collision but the second something else is behind it, it goes right through
show the collision of the counter.
I'm predicting a wedge shape from the back lip to the front of the counter.
yup that would def do it
you're a genius thank you 🙏
I probably would of spent an hour figuring this out
I swear its never the nodes and its always some bs like this lmao
One thing i live by (that a lot would disagree with 😅 ) is always start with tight custom collision. You can always reduce later if needed. The number of issues you get with bad collision is unreal. lol.
I tend to to make custom UCX hulls in blender and export with the mesh.
It's funny because I've used those for so many models and this is the one model I didn't and forgot about 😂
Works perfectly now 🤝
hi, I have a character walking into elevator, bp WITH link to levelsequence for moving of elevator , on trigger , eleavator moves jup with character inside- but at top of lift, character walks off (trigger inside box that moves lift UP), and char. walking off that trigger , causes char to float in space, and its'shakky', what would cause this ??
it literary hit the cabinet.
Also you can visual collision with ~ show collision
I'm going to take a guess and say its a collision issue.
ya me too, just makes no sense, well its a little complex,,I have a triger outside that allows char to move INto BOX, THAT IS BLOCKED otherse, sure its not that, and inside, a trigger in the back and adds collision back so player can't fall out ,,then anoither trigger that on U lift goes up to desgtination in seaquence,,,is collsion getting confused due to z factor ??
box on ground, goes to z location straight up
I"ve just never seen the engine act like this 5.5
Show some screenshots of the lift in the scene.
ok
one sec gotta load project
sorry large project ok its loading
the sphere collider is on over triggermesh , that via U elevator goes to destiation on z
once at that location, is when the charagterafter walking off trigger mesh, gets spazzy, gravity weird, as if I walked off map
Can you do a video? The screenshot hasn't really helped lol.
I haveother lifts that go simiar height but don't do thisw
never have but I'll try,
I'm going to try amd video recorder , this might take a fewwww
Please help me, I can’t take it anymore. I have triggers that, when activated, play an animation on the character, and the camera is supposed to move in its own way. How can I implement this correctly? The Engine Camera Subsystem is very inconvenient and works from zero coordinates.
ok nitro charges over 100mb, ill have to move to youtube, give me a bit more time,
moments like this I wonder if a mac would make this all easier o_0
recording screen blahj
almost done, ut checking video lol
crap sorry
This is a video for assistance with a likely character collision issue when character walks off trigger mesh, and starts acting wobbly and has gravity issues.
@dark drum there you go
sorry its not perfect using older logictech ext camera ;0-
kids safe !
That definitely looks like a collision issue. Check the collision around the top of the lift.
the top is like 5" above floor
gofig
but ya it sure feels like coll issues
its the only lift that does this, the others are not box lifts, just platform lifts
` show collision to visualize
true
this is SO weird, the collision is very spotty
works, then player walks ,and player feet go through box o_0 OKKKK
maybe I need simple as comple or something, illl check
might have been double sided geom was off,,so odd it was working at all, LEts see--
How can I fix if the door is opposite to the player and it's rotated anything that's not 0º to close opposite of it
Also timelines for some reason take more time when reaching the desired float
So they the doors just stand there unable to be interacted
The door is just standard youtube tutorial
[This tutorial is filmed in Unreal Engine 5, but will work for later versions of Unreal Engine 4]
In this tutorial we will be making the door we created in a previous video open away from the player. We will be using a dot product to power this. We also make sure the door closes correctly instead of jumping around.
Fixed models (sorry about th...
But nobody takes into account rotating them to anything that's not 0º
seems like you're making the mistake of setting an absolute rotation between 0 and whatever the end is, versus whatever the starting rotation is and an offset
I tried vibe coding a bp function library to the same result
tried doing this lmao
a pure node is evaluated every time the node it's connected to it is.
So each tick of that timeline it's getting the rotation and adding the offset, which will also include the rotation of the tick previous.
rather than saying "ok so the rotation of the door was 90, so add 90 and lerp between 90 and 180, each tick that number is changing so it's 91 and 181, 92 and 182 etc
you want to take that initial rotation before you start rotating the door
you're also mixing world and relative rotations there which might compount things
if the door is attached to something that is rotated 90 degrees, and the door is rotated 180, then it's world rotation is 270 but it's relative is 180
how to move player pawn using AI?
i want my player to be lways following spline path
and the player can change the speed with inputs
that relies on the player being possessed by an ai controller which it isn't. You could perhaps try unpossessing it with the player controller and possessing it with an ai controller?
I mean.... you could just create a ai with a camera and use that for your player
You set up input in your player controller, that input controls the speed of the ai
how can I do this? how can I create an AI COntroller?
If you're never actively playing as the player with freedom of movement, do what blackhand says.
Just make the player an AI. Make the actual player an invisible floating pawn that sends inputs to the ai
I wanted to use character movement on the ai, is this possiblke?
character movement component is specific to characters not players
if you want an example of sending signals to an ai pawn, i believe the top down template has it
Thank you. Now the problem that I have is that timelines are "lazy" they stand on the last value for a while
otherwise, you should be able to just spawn an AIController actor and possess the pawn with it
what does the timeline look like
top down uses a charcter and a player controller
this just got me confused XD
The length was 5 my bad
i do this with a node or placing an actor?
must be my mistake then
a node
the other suggestion is probably going to be much easier though if it works for you
But i want the came to be a first person one, so how can I do this?
I'm missing something on getting the actor component to rotate with my mouse... im missing... something.... help?
fu***, switch to location and it works much better.
@last peak @thin panther you suhhestions worked as a charm
Awesome!
Not sure where I should post this, but I've been struggling with some assets not loading when they're supposed to. When I check breakpoints in visual studio, various soft pointers appear to have the right asset path but are returning null until I manually open the asset in question - then it suddenly works correctly.
I'm recreating a bunch of functionality from Lyra bit-by-bit, so I'm using the CommonUI and UIExtension plugins. It's affecting widgets most heavily, but this particular issue appears to extend beyond those. I've removed all my UI and such, and I'm just focused on input right now.
As such, when I first load my project, no input works. Then I open my IMC (I don't save/compile/anything), then close it, and suddenly it works again. What could be going on here?
Also I only just recently noticed this issue. And as far as I can tell, the IMC is still referenced on my main character, but the soft pointer is null there too.
sounds like you're not loading the asset properly
Editor tricks you by keeping those assets loaded after you've 'looked' at them
but they'd fail 100% of the time in any standalone/packaged build
I did move the input logic and asset references from the character onto a component, but the IMC in question is right here in that component:
A quick test, I tried changing each of these values, but none of them fixed the input. Opening the IMC listed here and then pressing play does fix it for the duration of the session.
anyone maybe using unreal 5.6 and first person primitive type ? i am trying get socket transform on weapon but it has offset, probably transform has been taken from old weapon position (before vertex changes) is it possible to get somehow new transform after fppt
Any help on that system?
Don't even know where to start with this
Should character always be on the middle chunk of the 9?
Easy. Do this either in a manager actor or in Character, doesn't matter right now.
Tick/Timer -> get character's position, convert that into a rounded integer vector which represents which grid point they are in.
Say you had 1000UU chunks, it'd be that CharacterGridPos = CharacterPosition / 1000 rounded to int vector
Maintain a map of int vectors to chunk actors.
Whenever CharacterGridPos changes, go over the map and destroy all chunk actors that are too far away, and spawn new ones in the 9 spots where needed
To start out, start by drawing 9 debug points on tick in the grid around CharacterGridPos, get that to work before bringing chunk actors into the mix
start with getting it to draw the grid like i showed, then instead of drawing grid you need to look at your map of grid coords to chunk actors to know where to add chunk actors and which ones to destroy
you want the map to be integer coords so there's no goofiness, the integer grid is what you fundamentally care about
just convert back to vectors at the very end when you gotta spawn or draw things
Welp, I've done it as you suggested and smth is off
show your code
you mixed up center and extent
Alright, that fixes one problem
Now when I'm moving diagonally in one direction it's moving along me but in other way away from me
It's working only when X and Y of player position are both negative or both positive
If anything changes with that, grid is running away from me
And only perfectly under me when X=Y
I found it!
X and Y was mixed up
Now it's working
what are you working on?
I'm trying to make the most basic chunk world generation using predefined chunks, same size on a grid
Here is my idea
Ahhh I see the video and image! Looks pretty dope. Whats are you going to be using that for?
I have an idea for a smaller project, something like a psychological horror game.
I just need a small chunk generator to create the world and make it as random as possible.
It's not about survival or anything like that, just about the experience of playing alone and learning an interesting story, or rather, an interesting aspect of the human mind.
I am currently working with some friends on another game project, and in the meantime, I wanted to do something smaller to learn UE5.
I'm still learning more about programming from this than in my current studies XD
hello, when I try to grab an item, the ground also gets picked up, and I fall after that is there a way to stop grabbing an item? here's what I have tried to do.
Is that really the process of grabbing an item, so far I've not needed that, but sure SOON,,but destroy object to grab it ?
it destroys when i grab the item to get rid of it in the world
i'm using this youtube tutorial but he didn't cover on that part
https://youtu.be/aca_Toxfla8?si=QfAnZqejTFjlcsTy
Hey everyone,
welcome to the next part of our series on the Unreal Engine 5 Inventory System! In this video, we're going to create the Item Slots and I show you a simple way on how to Sort them
Discord: https://discord.gg/Yh7w5GBU7k
Patreon: patreon.com/PyroDev
Part 1: https://youtu.be/bfuXhsRjc9A
Part 2: https://youtu.be/MS5UoNZczBI
Part 3:h...
this was under the comments, but i did not understand
Psychological horror, nice 🙂 What inspired you to do that? I think it would be dope to use the chunk generator to procedurally generate the different environments for your game
@north lynx What are you and your friends working on right now? Are you going to school for game dev?
anyone know why world partition does not load from save/load data?
im on 5.4.4 and as soon as i load from a save slot world partition doesnt load
at all
do a flood fill
Whats wrong with it ?
My guess is that the floor is a actor, your linetrace hits the floor adds it to the invetory and then destroys it ....
Looking for a bit of help with Implemented Interfaces:
So I made a BPI_Player, and created an Interact Function.
From there I created a sphere box in my player to detect on overlap nearby items (on an array). I created a follow up IA_Interact to pickup items in that array which ends with Interact (Message).
The intention is that it fires Interact in the BP_ItemPickup to add that item to my inventory but SOMEHOW the Interact is never called in BPI_Player.. maybe I should call it in BPI_ItemPickup?
Anyway see attached images for my code
Nearby interactables array index 0 is not what you think it is
just hook it up to a print string
Hey quick question, so I made a child class anim blueprint with same manquin same animations including montages but using different character class BP but it’s not working, when I’m moving the movement animation is working?
Hey folks
I have a Gameplay Tag Container called "Active Statuses". Might be a silly question, but can it have multiple Tags even though it is not an Array variable?
- I guess it is a Container, so that should be possible right?
Yes, it can have many tags
Thank you. 🙏
You can also get the tags as an array out of it if you ever need it for a loop or something
Hey, can anybody help me when sliding the left window it wll trigger and if right then the other and if right is open and we want to move left window then the right and left window will both move at the same time and same with the left open
i am just a bit confused here
Uh, it is indeed a very confusing blueprint.
First thing: why do you use both the Sequence and then connect branches between the Sequence paths?
It makes it incredibly difficult to follow the code. Sequence runs a bunch of code chains in order. But then you also cross to them from other sequence chains with branches, it can cause the code to run an unexpected amount of times.
Also the first two branches have nothing connected to their condition, so they are always true.
Then you set the bool for opened window twice - first before the timeline and then after the timeline ends, with a DoOnce for some reason...?
In my opinion this code screams to scrap it, rethink the design and do it again. What is the goal of it? I'm assuming opening two sides of the window. Should they open at once on Toggle? Or is it possible to open only one?
It wanna opens only ones on either left or right window and if one is open then while clicking on other the open one will close and the clickable one is opening
But this event you showed doesn't have any code to determine which window side was interacted with. This is the first thing you will need to do then. Pass to the Toggle event a variable to tell it which window it should toggle. It can be either a name, or a reference to the window. How do you get it - depends how you interact with the window. Either from the hit event, from line tracing during interaction or from calculating which one is closer when the player interacts.
The first two branches are connected but I am testing it so, I forgot to reconnect it and show up here
If they are connected to the condition below them, it is even worse than having them not connected at all 😶
But anyway, if you pass only one of the windows to the toggle, you will need to completely change this event anyway, since more than half of it will be unnecessary
Okay got it, I will try it later coz I have to go now
anyone knows what causes an FTransform to do this ? its driving me INSANE
If i remember correctly, the rotator gets normalized between -180 and +180. Then there's something to do with gimbal lock but I can't remember the affect this has on the numbers.
yeah thats correct, but im just putting in normal values like 90, and its going cray cray
its actually changign them as well and giving me nonesense values
ah right, maybe if theyre all on 90 and its hitting gimbal ..
ok no still happens if i put any other value
I honestly don't know.
The idea for this project came to me on my way back from the seaside.
Creating games? I always felt that something was missing in them, so I analyze various aspects and try to create something of my own.
Besides, I have no shortage of ideas for plots and mechanics.
The game will soon be available on Steam under the name Whispering Death.
Another horror game, but with more content and a richer storyline divided into chapters.
Hey, how can I hide the stamina bar? I mean, I want it to appear when stamina is being used and hide when it's not.
Set it to visible on stamina use.
Set/reset a timer on stamina use.
Set it to hidden after some time since the last stamina use - using the timer from before.
Hey everyone, wondering if I could get some help; I’m working on adapting a board game at the moment that uses hex tiles. I’ve built out a grid generator and I cannot for the life of me remember how to snap to the grid (I’ve done it in a chess game, can’t make sense of my own code 🤣). Any tips or pointers, or even suggestions on tutorials; I am not against tutorials 🤣🤣
snap to the grid in what context? runtime/editor? square/hex?
Actor movement so runtime and hex based.
With path finding? Or just moving to a neighboring tile?
There’ll be some pathfinding, yeah.
This would be your ultimate source. I often refer to it when working with hexagon grids. It gives sudo code examples for all the math involved.
THANK YOU!!! If it wasn’t weird to do to a stranger I could kiss you! 🤣🤣🤣 I’ve been stuck trying to work it out for days and I mean that quite literally. Thank you so much.
Has anyone found a nice alternative than this native BP function for reading a single raw pixel value at a UV coordinate in a render target? ❤️
Hey guys, I've encountered very weird crash. I've made a save\load system almost entirely in blueprints. It works absolutely fine in PIE. In development build however it crashes under certain circumstances:
- I go from main menu, new game/load game - everything ok
- save/load in game - everything ok
- go to main menu from game - ok
- Load save from main menu again - crash
It's really weird, because my save system is basically a state machine, and I reset ABSOLUTELY all state on transition to main menu. So I don't see any reasons of why it would work differently on first game load and on game load after going to main menu from game.
In the pic1 you can see the node that's causing crash: if I remove it, no crashes (but save system would do nothing obviously).
And here is another interesting detail (which is probably a key of the problem):
I store each actor's state as a struct with some common data, but any class-specific data goes into instanced struct. (see pic2) . And here are the lines from the top of crash callstack:
Error: [Callstack] 0x00007ff7d1ba1077 The_Crib.exe!UScriptStruct::TCppStructOps<FInstancedStruct>::Copy()
...
Error: [Callstack] 0x00007ff7d7e4227e The_Crib.exe!UBlueprintMapLibrary::execMap_Find() []
So it looks like it tries to copy struct contained in the map (which contains instanced struct), and fails for some weird reason (and fails only after returning to main menu from game). And again, I'm ABSOLUTELY 100% sure I clear all state. I tripple-checked that.
Do anyone knows what's going on here? Is this some known issue with instanced structs?
NOTE: my initial thought was that it has something to do with GC working differently in PIE and development build. However, I've tried to set gc.ForceCollectGarbageEveryFrame 1 in PIE, but still wasn't able to reproduce this crash.
UPD: I've temporary removed everything containing Instanced Struct from my save data structs, and it doesn't crash anymore in developer build! Can someone tell me what's wrong with instanced structs? Are they just bugged, or do they just require some special handling?
I've seen select node based on gameplay tag.
How do I actually spawn one?
Switch*
Switch on gameplay tag. Found it.
in my character blueprint, what do i need to disable or enable to have the capsule collision rotate/mirror ramps instead of staying upright?
I don't think that's supported out of the box.
ah dang, i admittedly thought it seemed to similar to vehicle physics. bummer though, you'd think a very rudimentary version could be togglable
CMC is very much Z up. You can probably rotate it by code, but it might start acting weird, as the gravity still remains Z aligned.
yeaaah, i'm just makin' generic indie horror stuff. ain't worth that much ya know what i mean😂
I'm looking for how to set a morph target weight using BP.. youtube only focuses on sequencer.. and AI is completely lost
i found Set Morph Target.. but it's for anim instance..
"get anim instance" requires a Context object input.. idk what that is
everything looks like a dead end
found a ref online that shows that i should be able to get anim isntance from mesh.. wtf
Does anyone know how to / or if possible to get the pixel colour of a widget where the mouse button is ?
here's how i'd do it:
read which widget is under the mouse
read what the color property of the widget
you can fetch (and possibly store) the widget scale and location somewhere.. if it moves i guess you'd need to update that?
this way you can tell if it's under the mouse
yeah thinking it may be better to try and find the XY of the image instead;
basicaly have a map that i can zoom in/out of and move around; and either want the XY of that exact image; or the colour of the mouse point
so you'd rather read/sample taht image at a specific pixel only when you need to
so im trying to get the "Map_Areas" point / XY using 'Event: Left Mouse Button > Pressed'
OR pixel colour
i don't know widgets that well..no idea if you can do that in there
Hey everyone 👋
I’m working on a multiplayer project and I need help setting up a scoring system.
Basically, when a player throws a ball into a goal, I want only that specific player to get a point so the system needs to identify which player threw it and update that player’s score correctly on the server (and show it on their UI).
I already have the throwing and goal overlap events working, and I’ve got a replicated IncreaseScore function in my GameMode, but I’m struggling with how to link the thrown ball to the correct player’s PlayerState in multiplayer.
Does anyone know how to set this up properly in Blueprints or have a video/tutorial that covers something like this?
Any help or examples would be super appreciated 🙏
Nothing in the GameMode will replicate or RPC. Not sure if you just phrased that wrong. But I think you're looking for the instigator. You set the instigator on the ball to the player throwing it. Then your overlap or such can get the instigator from it and their playerstate by association.
Thanks Authaer will give it a try , I see someone mention I should try Add a "LastThrower" field to ball that gets set every time a player picks it up? , So I will try both
Essentially the same thing. Either will do the same thing.
Is there a proper way to do this?
Trying to make a simple spline mesh BP where I can change the meshes along different segments.
Currently I manually match the SegmentMeshIndex array's # of items to the # of segments in the spline.
Ok really racking my brain on this; I've made a custom method to get pixel colour from a targetrenderer - so i can get colour from X & Y easily
I 'simply' need to get to get the X & Y of mouse position on the 'Map Areas'
If anyone can help i will be flabergasted xD
for anyone ever stuck on this:
anyone had issues with retrieving string or text from data tables? im able to get all other columns from the same struct/row, but for some reason the strings cant be printed/retrieved
post screenshot
if row not found still prints.. i assume it prints "" which doesn,t print.. try append str with something so you at least see it runs?
it 100% finds the row, im able to retrieve sound, mood, type etc. as you can see there
but specifically Dialogue is just empty for some reason
thought maybe it would be some bullshit with not working inside macro but i moved it to event graph now. I also tried to change the data type to string, text, name
really weird because i have been doing this before without issues
weird.. maybe the issue is when you set the struct?
tried making a completely new one, a struct with 1 column (string) but still
ill just have to find a workaround for now
hmm this kind of crap happens to me so often.. it's usually something dumb but it takes a while to find it
yeah strange. I checked the length just to be sure and it's in fact 0 / no content. I'll just store it locally on the actor, in some array for now
Ok interesting. If I just do Get Data table row and explicitly select the row name (rather than get column names -> pass that ) it works.
and what's the col name for those strings?
i unfortunately/fortunately think it's an user error on my part. I've changed it so much i've kind of lost sight of it, but i'm suspecting i've used column names instead of row names. I was certain I could get the Type/sound column but i must have hallucinated it. getting late i guess, sorry for wasting your time 😅
Seaside? What area or coast were you coming from? Checked out the game on steam and wishlisted it 🙂 The butterflies on the door remind me of Life is Strange 🙂
Hi I have a problem with my plants. Im trying to plant something like this here... 🪴
first it stars out really small, and then it starts growing... 👶 🧒 👦 🌱 🧓
but the problem is.... this specific plant I can't find it. . . It's spawning waaaaay waaaay out of the map
and I even tried here on this Set Relative Transform to plug in the specific trace end location X,Y,Z and it still didn't work, it still spawned waaaay waaay outside of the map...
Is the StaticMesh the root component of this actor?
nope
I was able to fix the one by using the impact point instead of the location
Hmmm, weird, Location should be the same as ImpactPoint in standard line traces.
ok I was able to fix the berry plants, now I have a problem with the mushrooms that have a huge offset
huge distance offset
I dunno, I don't see anything wrong on the screenshots. You could add a DrawDebugSphere after the hit, to see if the location from the hit is the problem or something else.
Why are you comparing with some reference to an instance?
look at the pink highlight
you can just cast for type check but using interface / actor component will benefit you here in the grand scheme of the system.
thats actually a very good idea
but thats not the problem
do you know what you are == with?
if the idea is to check the type of the actor you are hitting then you are doing it wrong.
You either check the type with cast or class.
because what you are comparing it is if the hit actor is equal to a specific instance in the world.
what about tag?
oh that is crazy...
if you want to check with tag, then go ahead.
my bad, thank you for that btw
but the == there is needless and incorrect at best.
Now when we are talking about offset
it's possible you are hitting some part of the actor that is not intended.
this is easy to debug.
just print string the Hit Component.
You want to know what you are actually hitting when things are failing.
I didn't mention it since the problem was with the wrong location - and if the hit was not valid, it wouldn't go through to the spawning code. And since it was an OR with the tag, the tag was apparently enough to go through
the component tag is also the "plant_Ready_Ground_Dirt" which is a static mesh of ground dirt thats plowed
its soil
Try to print the hit component and draw the trace line if the location you get is not as desired.
im always drawing my trace line
I'm from Poland
And thank you ^^
I printed the trace line
print the hit component and watch the print string, see if you actually hit at desired location.
it does
then I don't see the problem, you shouldn't get any offset unless your plant is not 0,0,0 relative to the root of it's actor.
Hey guys, still struggling with this problem. Where is certainly something weird about Instanced Structs behaviour. Can anyone tell me, is this even a valid way to work with instanced structs? Because it looks like the internal memory of instanced struct somehow gets invalid when I switch the maps.
based on source code:
FInstancedStruct works similarly as instanced UObject* property but is USTRUCTs.
So if it's instantiated, if the outer is destroyed, it will no longer be valid.
e.g if you attempt to save this or if you move to different level where the actor containing the struct is destroyed.
just assumption, though maybe someone else know.
but in the case of instanced UObject, if they get destroyed during map change or you save a UObject instance but they get destroyed after you leave the map or exit the app. Then that UObject is no longer valid.
But Instanced struct is not a UObject and doesn't even have a concept of outer
keep in mind editor does its own asset loading and storing, despite gc being forced
maybe someone with more experience with instanced structs can provide some insight for you
this also sounds fun
Hey, need help just a simple thing but i can't get the "component has tag" node and i have 2 static mesh its the window but i got stuck in it of how it's going to work
i am trying to check it in branch but it alwasy tell single tag not only one i am line tracing
What is event before these has tags?
It is interaction event, I mean its an interface
show it
and how do you call it?
also can you show what is beeing printed currently?
Okay, showing up
and also did you set tags on the components right?
and what prints do you get? can you also show Shoot Trace function?
So I think your Trace returns FIRST thing it hits, and it doesn't mean it's that Component you wanted to hit
what result are you getting? are you actually hitting the component?
the hit component i set it up is in actor bp
i get false in the second branch of right window
how do you know it hits the proper component?
are you printing name of it?
print name of this Hit Component and show it
R_Window and the other on the left is L_Window
it is passing there
i have checked it
passing what? it will pass even if the component is null?
print the display name of what you actually hit
i have used print string there so, it prints
but after by using hit component it didnt recognise as seperate
and what it prints?
can't you print display name of component that was hit?
maybe you are actually checking it's Frame?
can you go to viewport and check if this door also has tags? maybe the instance was not updated after you added them to blueprint?
yeah, it has tags in them
Maybe you have some white space in the Tag FNames?
Try some simplier names like Right and Left
Shouldn't be a problem but I mean maybe you have tag that is Right instead of Right
or the node ComponentHasTag has that white space in the name
i have checked it and i just copy it from tags that i write so, it didnt be a problem and the ComponentHasTag isnt have a white space in them
that is weird, but I still didn't see what is the name of hit component with my own eyes so I have no idea what else it could be
I am a bit confused here, you mean component tag or the static mesh name where I put the component tag or other
Yeah so here is your problem. You are not hitting the component you want.
You are hiting frame.
If you never need frame then disable Visibility block on that Frame Component
Or double click the frame mesh in the browser and make your own simple collision for it (by making it be 4 boxes along the frame, not one huge box covering the middle too)
Okay
I just want to point out that you can just check if the hit component is the relevant component inside the BP. No need to use the tags unless there's going to be multiple components with the same tag inside the same BP.
You'll still need to sort out the collision on your frame though like Amber said.
it is passing now, i just put the mesh collsion from project default to complex as simple now its passing and its working
thks for the help
FYI, you shouldn't use complex as simple when it is not needed and can be handled with simple collision - especially if the colliding thing is moving. It is substantially more expensive to the engine, since it uses triangles to check for collisions. And it can break some things that are expecting simple collison.
So it might work here but it isn't really a good solution to use.
Hi guys, i need to reparent a component to a cpp parent class as there are some actions i need to perform on it that cannot be performed easily/at all in blueprints, however to do this i need to make it so that specific blueprint enums/structures are replaced across the entire project with identical CPP equivalents, can anyone point me in the right direction on how to achieve it?
just do it manually, create C++ class with new variables, then start removing variables in blueprint and changing it to the new ones that will be avaliable from C++ parent
Hi all just a quick question. I'm making a game with multiple different abilities, a bit elden ring styled, but I want to use blueprints to do it as I don't know how to code at all. Would you still recommend using the G.A.S system for it?
I cant find any good tutorials to do it with blueprints tbh
You cannot really use GAS without C++, at least you need it for some essential things to setup at start.
Also #gameplay-ability-system and read pinned threads if you need more informations
The attributes must be declared in c++, but other than that, it's possible to do a lot in blueprint.
Any RPG project can benefit greatly. The setup may be annoying for those not familiar with C++ but imho it's better than rolling out our own worse wheel.
Also it's entirely possible to use blueprint only with GAS but you will need plugin called GAS companion. It handles the attribute creation but I'm not even sure if it's free.
just me or is the replace string function really weird? im just expecting similar to how you would do sql replace. Nevermind I see the replace-node is just worded a bit strange
Looks like this method is not even used, or am I missing something?
Spend like a day and din't figure out what's wrong with instanced structs and serialization. Probably gonna store generic data as byte arrays instead and serialize/deserialize it to UObject
Ouf. Id suspsect that its bp instancing that might be an issue and not the struct itself
What's the issue? The get instance value returning not valid?
It crashes on copying instanced structs loaded from save game (And only do so in development/shipping builds, and only when loading game from main menu. Everything works fine in PIE, or when loading save from running game in development/shipping game builds):
[2025.10.17-13.19.55:677][580]Message dialog closed, result: Ok, title: The UE-The_Crib Game has crashed and will close, text: Assertion failed: FMath::IsPowerOfTwo(Alignment) [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\HAL\MallocBinned2.cpp] [Line: 617] Invalid Malloc alignment: '4294958557' is not a power of two
...
Error: [Callstack] 0x00007ff7d1ba1077 The_Crib.exe!UScriptStruct::TCppStructOps<FInstancedStruct>::Copy()
...
Error: [Callstack] 0x00007ff7d7e4227e The_Crib.exe!UBlueprintMapLibrary::execMap_Find() []
I needed instanced struct to store generic data per object class in the first place. I gave up on using instanced structs for that purpose and re-implemented my save system using FObjectAndNameAsStringProxyArchive to serialize/deserialze properties to byte array, which is honestly much more clean and better solution. (I've exposed serialization/deserialization to blueprints )
However, I'm still interested why this error with instanced structs happened before, so If you have any ideas, please tell.
hey, little question, Is there any way to set a map with one key = an array of values ?
You mean the key type would be an array?
I mean, I am registering some actors inside a map, and I'd like some of those actors to share the keys, like if I use for each loop on this map and retrieve all of those actors that share the same key
Then make them share the same GameplayTag
GameplayTag as the Key, i mean
So you need an array as value type? You can't use arrays as map key/value type, however you can wrap an array of actors in custom struct and use it as value - this will work
array of actors inside a custom struct is not a bad idea I should try this out
that's also not a bad idea to use gameplay tag to get the actors..
basically I am trying to set a groupe of actoir sharing the same group name to be able to act on them later on
You already have a struct made for that, GameplayTag. can't think of a more lightweight option
Ill try, thanks guys
Odd. I might do some tests on my end. I've started using instanced struts more recently so it would be nice to know as well.
Thanks! Unfortunately, I don't have a reproducible example of this crash anymore(I fixed it before doing any commits). However, you'll probably encounter it if you:
- Save instanced struct in SaveGame
- Load it
- Change map
- Try to pass it somewhere (with copying)
hey everyone I'm trying to recreate a basic version of the chain hook from Overwatch I've done almost everything except the chain! I was just wondering the best way to do this. I was gonna try a spline where the end of it gets updated to the projectiles (hook) location every frame and then add a spline mesh but, not sure if if this is the best way as a spline mesh will probs be performant heavy. All ideas are welcome xD
I would recommend Niagara as a start. Placing links as a mesh emitter along the spline in a scratch pad. Updating and tracking spline meshes is going to get expensive and it's cheap in niagara. Then your gameplay code only needs to update your spline which should be fairly cheap for it since this kind of effect should only need a couple of points on the spline.
Thanks will take a look into that!! I just did some further research and noticed the games like Shady Knight seem to use some kinda particle effect aswell. Could maybe even make a wave like motion in the niagara particle aswell
Can we actually add a gameplay tag to a random actor in the level ? 🤔
You'd have to write a component that can hold one. There aren't any gameplay tag members of actor.
The "tag" member they do have are just FNames.
You can add a GameplayTagContainer variable to your actors/components and an interface to access it. Or use existing IGameplayTagAssetInterface if you are using C++
not using C++, I am starting to understand actually, I need to access the gameplay tag container directly and cannot add the tag to the actor directly
it works! thanks
Hey, is there a way to ignore the parent component’s rotation? In the character class, the capsule has to be the root, and because of that, if I want to create a material aligned to the camera, I need to update the world rotation of this component every tick. Is this a necessary workaround?
material aligned camera, and a components rotation have no relation.
The component could be at any rotation.
The rendered material would override it.
Sounds like its not actually aligned to the camera.
But, in the components rotation tab, you can mark it as world rotation
So, its rotation is now linked to the world, rather then the actors.
Yes you can, it will look just like this.
If you want to create a material aligned to the camera, you do this in the Shader.
that will be a thousands times cheaper too.
Using CPU to set transform is incredibly slow, if you got thousands of actors then Rip fps.
I'm using this node to align it to the camera, and now that I changed the components’s rotation to world, it works fine. If it rotates together with the actor, then it also rotates in the render.
but, yeah it was exactly what I wanted
Yeah, I haven't a clue how that function works, or if its inputs are required.
But, it is 100% not working.
If you have a ton of stuff doing this, I suggest actually looking up a working mesh align to camera function.
But, if you only have a couple of these, then its not the end of the world, just not the best is all.
I am curious of one thing, and curious if you have any insight.
So, you say CPU based is bad, and makes sense.
But, stuff like draw hud from the hud class draws to the GPU, but is I presume ran by the CPU.
Is there a better version of this?
(Such as dynamically drawing name plates above all actors)
Or, could it actually be better to use a mesh aligned name plate component on every actor, as they do not directly incure draw hud CPU calls/ usages?
When casting to my player controller running a server RPC to game state to update a variable that is replicated running this event client side doesn’t update the variable. Server side it works though anyone know why.
When you can offload it to the GPU, you better off doing so.
Rotating hundreds of coin using CPU will cost 40- 50 FPS while rotating it with GPU cost almost next to nothing.
Wouldn't the moving of hundreds of extra scene components also be bad?
Like, same amount, or?
What are we moving here exactly
if you can offload it to GPU you should, but you can't do this for everything.
Say, I have 200 actors in view, and each 1 needs a floating name.
I either draw hud it 200 times, or have 200 extra scene components that move with the actor.
I wouldn't use widget component for a floating name
you gotta profile it and chose your tool.
I just wasn't sure if you know/ heard of someone profiling it in the past.
Source code: https://github.com/PendingKill/Tutorial_RotatingActors
Today we're discussing different ways of rotating actors in Unreal Engine 4 (blueprints), profiling the performance of each method, and analyzing the results to find out which one you should use in a given scene.
TABLE OF CONTENTS
00:00 Introduction
00:42 Rotating Movement (BP...
from 20 fps to 160 fps
Crazy that at the end 336 draw calls from the material method still messed up FPS badly.
Is that just old UE4, or like some bad PC specs?
That seems crazy, that 336 draw calls tanks FPS. 😛
how exactly do you print it?
integer divided by integer and converted to float 0o
well those trailing numbers are probably just float rounding error
nah, those aren't rounding errors
total still comes out close to 1 = 100%
the problem is weighted probability values doesn't match the outcome, in fact they are off by 5 to 15 %
I fail to connect the two btw.
This is what happend on that blueprint node.
bool UKismetMathLibrary::RandomBoolWithWeight(float Weight)
{
//If the Weight equals to 0.0f then always return false
if (Weight <= 0.0f)
{
return false;
}
else
{
//If the Weight is higher or equal to the random number then return true
return Weight >= FMath::FRandRange(0.0f, 1.0f);
}
}
it just returns if the value you supplied (weight) is >= a random number from 0 - 1.
what are you saying?
Im saying I can't comperhend this code.
What's even the use ?
and how does have anything to do with the probability?
you do understand how probability work right?
this is the result compared against set probability values
so if I set something happening to be 30%. and the result comeout to be 32%, that is pretty close but if result come out to be 40%, then somethings is off
I don't understand how you come up with the calculation, but the code for the pure node is above.
If you want 4.3% chance to have something as true, then simply use RandomBoolWithWeight, passing 0.043 as the value.
Supplied value >= Random number between 0 - 1
No foul play whatso ever.
bro, you are dense
First of all, you don't need this spaghetti. You can return from inside the loop (if this is a function) and the loop is broken. So instead of setting the enum and going back to the loop to break it, just return the enum.
And what exactly do you mean by "is rigged"? What result did you expect?
And did you test several times what result you get from the probability? Since 20000 is not that much, it can differ from expected numbers
I see what is going on. You are approaching randomness in a wrong way
You are giving priority to one randomly generated number over another randomly generated number.
Because you are doing it in a loop with switch, the first conditions checked have an advantage. It doesn't show up much in the first two because it is more rare to roll them. But when the number gets bigger it is more common to get a good result in both rolls.
For example let's say you COULD roll the uncommon loot, but since the rare was checked first and it also rolled correctly, the uncommon check is ignored and rare item is selected.
To avoid this problem, you need to roll only once. Roll a float in the range 0-1 then compare the value with the chances for each rarity. Legendary will be <= 0.08, Epic will be <= 0.2 (0.08 + 0.12), Rare <= 0.4 (0.08 + 0.12 + 0.2) etc
Comparison of the result on 100.000 loop. The first output is form your code, the secod is from mine. Ofc it is an example, there is probably a way to make it better instead of adding numbers manually
So, as a conclusion: math works fine, you just didn't understand how the execution relates to the numbers you put in.
May I remind you to stay professional.
btw, your third image has different weight numbers.
Yeah I know, it is flipped due to how confusing his approach was
Reason for these results to be different is that Tony is rolling a new value every branch instead of rolling it once at the start and comparing it.
Because in his image it is 0.4 from the rest, not flat 0.4
Yus, that's probably the second reason he gets numbers he doesn't expect.
His test would probably look better if he weren't to return after one of the branches returns true, but to count each up. Cause he's not doing 200.000 rolls. He's doing 200.000 * 4 roles.
Or rather, he would in the worst case. But as soon as one of them branches fails, it produces an extra roll for the next branch. So the / 200.000 at the end isn't even correct.
In theory, for stuff like this, you just have an array of RarityInfo that has the enum and the weight (and whatever else you want). Then you sum up the weight and get a random value between 0.f and TotalWeight.
After that you can just loop over the array, accumulating the weight once more and checking if the current accumulated weight is <= the random value.
With C++ one would usually calculate the TotalWeight during Editor time when the array changes.
Hello can someone help me on cable component I don't really know anything about it and I am trying to make 2 players that are connected to each other on a split screen system. The split screen part and controls are done but I can't connect those characters with cable
I never considered doing it at editor time 😛
just doing it at runtime
float CombinedSpawnChance = 0.f;
for (auto& Mob : SpawnRow->SpawnData)
{
CombinedSpawnChance += Mob.Probability;
}
float Roll = FMath::RandRange(0.f, CombinedSpawnChance);
float CurrentProbability = 0.f;
for (auto& Mob : SpawnRow->SpawnData)
{
if (CurrentProbability + Mob.Probability > Roll)
{
// return or spawn here
}
else
{
CurrentProbability += Mob.Probability;
}
}
I use blueprints btw
I don't think the CableComponent itself offered any constraints. It would only be for visualization and you'd need to handle the actual constraint physics differently I believe.
Probably a quick search with "constraint" as a keyword might give you some answers.
Yeah, :D minus the auto and plus some consts.
Oh tysm
can anyone help me with my issue please. I'm having issues where some of my tiles aren't streaming in when they should
I am ending up with this for instance where from that point in the world the scenery tiles, Track Scenery tiles aren't streaming in yet anywhere else in the world stuff streams in and out fine
is there anything I can check which would cause something like this to occur
Hello
The Add spline mesh node has a static mesh option
how to put this as a public variable?
It is not clear what do you mean by that - what do you want to happen?
I want to be able to change the static mesh in the editor/viewport, not in the blueprint
you mean drag from "target" ?
Make a variable of the type StaticMesh, make it public and editor editable. Then drag from output pin on the add component, type in "Set Static Mesh" and use the variable to set it
you can also create the variable from scratch as long as you pick the correct type (among the 5000 lol) so it's easier to create it from the "source"
yeah i'm not sure which object you want to turn into a variable but yes
It seems there is no set spline mesh, the method uses normal Set Static Mesh, so not sure if this is all you need to do in this case
If I drag it from "target" it lets me choose an actor, not a static mesh
yeah target on add spline is the bp itself
but look at the outlet
is this what you want?
yeah I think that worked
I'm also not sure about "set forward Axis" , I don't think it works properly in my case
yeah usually when something is missing it's because it's accessible via the component itself..
any tips how to make this work?
I want to be able to rotate the axis
or what node do I use for that?
I'm not so sure that this is the right way to do
set world/relative rotation
get original world rotation, rotate by axie if you want
I'm failing to find how to access a widget component from the actor it's attached to.
I'm sure this is simple but I'm hitting a brickwall
Widget Component is a completely different thing than the Widget. It is like a container for the widget.
You need to first Get the Widget from it and only then cast what you got to your Widget class
Widget containers contain widgets, they are not themselves widgets. This feels painfully obvious now, thanks!
If I want to make a system like Dune Awakenings mining system, where a player is using a beam along a path... what key words am I looking for to search?
Is there a way to detect hits along a spline? is it just hit boxes? Anybody got any ideas?
What is the Multi Sphere Trace By Channel Node in Unreal Engine 4
Source Files: https://github.com/MWadstein/wtf-hdi-files
I'm trying to work out the best approach in making a multi-language system for my game. I'm thinking of using data tables with fields for each language but is there a better or more universal way of doing it? Thanks in advance.
wouldnt you just want to use the built in stuff?
There are built in language translation mechanics in UE5?
"localization" is the term
How does it work?
long time since i used it but its basically a fancy string table
let me rephrase. I've never actually used it, just tested some with it*
Is this a new feature in 5.6 or something? Can I use it in 5.3?
And how does it work to translate English messages that are in text to other languages?
you'd type in alternative language versions in a conversion table
I'm having a bit of a struggle wrapping my head around whether things should be on the character or the controller. I am trying to make a HUD for the player with icons from the character abilities but can't seem to get the timing correct between initialization and possession.
Maybe someone has some insight in the correct process of generating the hud based on the character defaults?
Im using unreal 4.27
single or multiplayer ?
i usually put the hud Widgets in the HUD class
Multiplayer
whats the issue ?
your hud isn't getting the correct data ?
something isn't valid ?
I'm not sure how to explain.
I have round in my game handled by the gamemode BP.
I respawn the characters and i can't seem to re-make the HUD with valid abilites for the new characters.
The character BPs have a default ability class array that i initialize on begin play.
On possess from the controller i try to grab that array but it's only working for the host who is client/server i believe
if you add a delay of like 1- 5 seconds does it work ?
meaning is the array valid after a delay
Let me try. But you mean to add it to the character begin play event. before the abilites are initialized?
i mean when you are trying to get this array, its not available so your saying your getting access none ?
The non host clients are not passing a IsLocalPlayerController check so the widgets are failing for them
Is perhaps the issue me calling reset logic within the controller and not the gamemode? I haven't got my head around what should be in charge of what just yet.
#multiplayer might know more about it
I will try there, appreciate it!
Hey, I'm new to this channel but I'm looking for help with my project. I need help with getting a turret to rotate using the Dot Product.
Show the code, what's the issue ?
All i need is to create a function that will make my turret rotate smoothy to follow the player on the Y axis.
I have doubts that my coding inside the function is correct at all.
I don't think you dot product for this
Probably look at, and rinterp
Its what i was instructed to do with this particular project
You want it to not rotate 360 or something ?
Anyway what is the dot product for then ?
Honestly, I don't even know what a dot product is lol. In other words I'm at a stand still.
Why would you be asked/forced to use a tool that you haven't been taught?
We were told this month is more of a figure it out yourself month. If it was taught, I missed it.
That's a .... choice ... to be sure.
It's possible but outside of a learning exercise I wouldn't do it that way
A Dot product gets the angle of a vector and then returns a value between 1 and -1 based on whether it's facing the source vector.
It's used a lot in cell-shading. Get the vector of your light source to the object it's pointing at (The normal direction of the vectors of the model) and set an if statement on which color to use. Guilty Gear uses 45 degrees I believe.
So right now you're getting the vector between your turret and your target, normalizing it, then running a dot product. So if it's a positive number the turret is pointing in a similar angle as the target, if it's 0 they're at a 90 degree angle and if it's negative they're in opposite directions.
Okay, so what i have so far could work? apart from connecting execution wires and maybe a few adjustments?
It's programming so it depends.
You've got to use a dot product and it's rotating on the Y axis?
Yes, that's what I'm aiming for. (pun intended) 😎
What is the RInterp (Rotation) Node in Unreal Engine 4 .
Source Files: https://github.com/MWadstein/wtf-hdi-files
is it a top down game?
So like.... if you get the vector of your target (You do this with the subtraction) and you get the DOT product, then if you get to 1 then you're aiming at your target. (-1 away. 0 90º)
On a top down game rotating on Y would do that.. if it's like... Call of Duty then your best bet would be to rotate on the Z or something... but if it's not a top down 2d game then... not necessarily?
I guess a real problem with your assignment is that DOT products never give a signed 0.... So like, I guess a question to everybody else...
If you've got to use a DOT product to aim, how would you avoid the problem of turning the turret the shortest path?
Because you could just tell the turret to rotate if it's not at 1 until a line trace overlaps. But 0 is gonna be 0 whether the turret needs to rotate positive or negative. I feel like I've seen games where turrets take the long way around.
I guess you could just make a variable with the last DOT product number that sets the direction to rotate... then it'd only go the long way on the off chance that it was at exactly a 90 degree angle when you first targeted it...
I mean, I've done it before, but if the assignment is to learn how to use dot products, I think Oliver is better served by just, experimenting, even just using print string to see what happens when he dot products - as opposed to me just sketching out a collection of nodes that works for him.
For example ||is the turret's forward vector the only interesting vector?|| ||maybe other basis vectors can be useful||
I think if you're looking for a direct answer for how you'd actually do something like this, RInterp is a great start and very likely sufficient
I've a project that freezes very often if i open a blueprints view port or try to phssically move something in the blueprint (using arrows instead of the transform coordinates), i just picked the project back up but i knoooow it wasn't doing this prior. I did update it to 5.6 from 5.5 but that went pretty smoothly so i am at a loss as to what this issue is
OnPossess is only called on server
for client, it do be AcknowledgePossession
that's not bp exposed but there's a bp exposed one.
OnPawnChanged something like that.
but onPawnChanged gets called on both server and client iirc.
I managed to flail my way to making it work.
Gamemode -> spawnActor -> possess -> call custom event(IsPossesed) from character BP
IsPossesed -> getController -> populateHud
This is what i did, it is probably not the best way
I would use pre-existing function as to not take risk of race condition.
I will try the node you suggested tomorrow instead i completely missed it
with OnPawnChanged and AcknowledgePossession, the character will guarantee to have valid controller on the calling machine.
i was trying the pawn possessed node as well but it's not what i need either
And i understand that then i wont need to call it in the gamemode_BP setup loop, it will happen within controller/pawn possession
Yup
if what you want is to create hud by the time the client have a valid character they possess.
then you don't need to involve game mode
My game is multiplayer and has rounds. i want to make sure the abilitybar widget has correct references to the abilites.
The round reset and initial setup is triggered through the gamemode BP.
But my error was trying to rely on the controller posses event
I think it's best to restrict the gamemode to only things it really needs
But i am really new to this all so trying to learn, thanks again to your response!
New solo dev here asking for help and tips! I'm really having trouble trying to reset the properties of these two classes in the reset tile event. I'm trying to reset it's transform to a box collision, re-enable collision and remove its physics. I can't seem to get the transform to work and the collision is inconsistent. Any help or feedback is much appreciated!
Some context to what your end goal is might be helpful, im having a hard time understanding the purpose of this code.
what should I do if I want to have a missile that has a limited turn rate?
not rinterp, the speed seems to scale with the angular difference
I'm making a memory tile game and whenever you step on a wrong tile you and the tile fall into a pit which has collision box. Whenever the player hits the pit collision box and gets destroyed, my goal is to get the tiles back to their state before you stepped on them. So whenever the player steps on the wrong tile hitbox it removes player input, puts physics on the wrong tile so it falls with you, delay to let the tile fall before setting the right and wrong tiles (the two array classes) to no collision just in case the player is still stuck on one. I'm trying to figure out especially how to reset its location back to where it was before it falls into the pit. I tried putting a collision box to mark its default position but it still doesn't want to teleport
Rinterp/Rinterp const with a clamp to limit the max turn rate? Use a float curve asset to define the curve?
what curve?
maybe I should clarify
I want to set a maximum angular velocity on a missile- like actor
I dont know what the TileBox is, but using its transform as the "reset point" for all swap tiles seems odd to me. Is TileBox a component on this actor? Could you show the actors hierarchy?
Also since there is alot wrong in general, if you want to just hop on a voice call, it would be easier to figure out.
Im not sure of the math to program this. Id imagine you wouldn't use an interp then but your own calculation for the missiles location and rotation.
Is this what you want to do.
yes
I think I have a direction to work with now, thanks!
Each tile would need to store its own initial transform it can reset too. I would also move the bulk of the reset logic to the tile itself (Resetting location, collision etc). This would also then allow you to reset the location overtime (animation) if you wanted in the future.
Additionally, I would keep track of the tiles that have fallen and only reset those.
You could try angular dampening. This can limit how quickly something can rotate.
Lol reading and answering to old text, Pattym knows whats up! ^
Let the tiles know and store their initial transform ^
SomeManager -> ForEachTile -> Reset()
This is normally a hardware or driver issue. (assuming you're not running on a potato) Check to make sure you're machine is actually using the graphics card and not the onboard. Check for driver updates. Lower the scalability settings.
I would check the logs, mabye you have some callstack or errors when loading blueprints / widgets/ anything really. If you check the logs after startup you should see what it is.
<@&213101288538374145>
Hey guys, I have a weird problem. I have a spaceship with turrets, they rotate towards a target using "find look at target" and "invert transform rotation". For the turret that is on the upper side (using yaw for the base and pitch for the turret), the rotation always works..
But the turret on the side of the spaceship (using pitch for the base and yaw for the turret), it only works when the spaceship is not rotated. Otherwise the aim is always vastly off..
Is there any reason why this is happening?
Do I need to do the rotation in c++ using quaternions?
Hello, I have an issue with nodes I can't link any node to anything, whether it's blueprints, materials nodes etc nothing work. I'm on Linux with UE Source 5.6 does anyone had an issue similar to that before please ?
The issue is that you're applying world rotation as relative. Set the turrets world rotation instead and it should work.
I tried that, it will totally mess up the rotation
Did you also change where you're lerping from the component relative rotation to world rotation?
Yeah I tried that too, it's the same, it will override the rotation the turret inherits from the spaceship and rotate it as if it's detached
Show how you set it up using the world rotation instead.
one sec, have to recreate the blueprint
Like this, I think ^^
Or using the inverse transform rotation for the make rotator, which has the same outcome
What does this do? I assume there turret has different components for that handle different axis of rotation?
Yeah the base, and the turret body
Anyone know / have a tut to find the culprit here ?
4GB 👀 I'm no expert but are you by any chance using a lot of 4k/8k textures?
I have one 4k texture which is a "world map" but thought it wouldnt be causing too much damage as it isnt there all the time :/
So one handles yaw and the other pitch? Are you able to show more of the setup?
One wouldn't. Can you show what your scene looks like?
Hi everyone 👋
I’m a beginner working on my first Unreal Engine 5 project, a small FPS game where the player can walk around a spherical planet.
I’m using Use Controller Desired Rotation and a custom gravity system so the player always sticks to the surface that part works great!
The problem is:
The camera doesn’t follow the player’s orientation when walking around the planet.
It stays aligned to world space, so the mouse controls start to feel wrong as you move.
I tried this fix:
Get Actor Rotation → Set Control Rotation
That makes the camera follow the player’s gravity, but then I lose mouse look control (the camera can’t move anymore, since the control rotation is constantly overwritten).
So I’m stuck between:
Camera not rotating with the planet (wrong orientation)
Or camera following player but no mouse control
What’s the best way to make the camera follow the player’s Up vector (local gravity) while still allowing normal FPS mouse look (pitch/yaw)?
Any advice or example Blueprints would really help I’m just learning and trying to understand how this works. 🙏
It's the function shown in the first screenshot, for the turret I just swap pitch for yaw.
Very confused haha