#blueprint
1 messages · Page 151 of 1
Maybe it could be easier to attach the 3D Widget to the camera.
you want it to rotate with the camera ?
Why not if the camera rotates with the mouse it could be a good idea
if you want it to lookat camera, lookat is a good choice like mentioned
Yes, Find Look At Rotation could be helpful.
took me a while just to make this still wip.. and ill need to remake it cos it just uses actors, been a pain tbh.
so, I have a system of inventory where I have an inventory of items I've picked up, the inventory is built out of a background with a number of slots on it, the number of slots is decided by a variable attached to whatever actors have an inventory, then the slots themselves which are widgets that have a drag and drop mechanic built into them where you can move items around. When you click and drag an icon is generated that sticks to the mouse and then when you let go the icon goes away
The drag detected and the drop is built into the inventory slot widget, which is giving me a bit of a problem...
if I close the inventory while I'm still clicking and dragging, both the mouse cursor (which is supposed to go away when you close the inventory) and the icon are still on screen, is there a way I can clear them from the screen when the inventory closes?
@hoary junco I tried to do something similar following the // Drag & Drop with UMG | 01 | Live Training | Unreal Engine // might help but he misses a few thing in pt2 thats in pt3.. you should have your hud widget class with a canvas then, add you inventory widget to the canvas panel same with a hotbar if you have one. BUT a Alternative it just to have it when you right click on a slot show a widget that has (drop, use or cancel). but i would follow that drag drop tut by unreal first.. or skip to the drop part 🙂
I do have my widget with a canvas and an inventory widget that gets added to the canvas panel
it still does the thing of the drag and drop getting stuck if the hud closes while I'm still click an dragging
you mean if the inventory widget closes?
yeah
that's not how my inventory closes
you have a x button in corner?
no
it closes with keybinds
like this
what I want is to be able to essentially force the drop action to trigger whenever I hit the close inventory key before the UI destructs
and hiding/unhiding doesn't really work because the inventory and everything in it updates whenever the widget for it is created, so if I just hide/unhide it wouldn't update
on drag detected i would check if the inventory is open if false call on drop function
how do you call the on drop function though?
how?
like I already have this code in the ondrop function
this is basically just telling it whenever I drop the item, is it in an available slot, and if so move item to that slot
if not then do nothing
Hello. Can somebody explain me how to use modular control rig? When I'm working with default mannequin there is no problem (of course), but when I'm using custom character with modified rigify skeleton - all sockets is placed at the bottom of character. And of course it doesn't work - shoulders just placed at the bottom and don't do anything. Why is this happening?
Hello guys I have a question, making a melee combat system and I want some swords to have "special attacks" I don't know where to save the animations because if I save the animations in the character instance I will have more than 30 40 animations loaded and if the I save the same thing in the component, I was thinking of making a datatable and calling that data table every time I want to equip or use a special ability. what dou you recommend?
Having an issue with UE 5.4. After retargeted animation from mixamo to my own character I see blur:
bones and mesh working fine, but i see this issue... idk wtf. Any idea?
@hoary junco sorry mike.. i have been trying to look up to now, cant find on how to touch on your problem, just like when you drag widget too far offscreen. I don't think its possible unless you can somehow call the event if inventory was closed.
all I need to know is how to call the event in general, because if I can cause it to trigger whenever the button is pressed to close the inventory before the inventory actually closes I'm golden
like how can I force a drop event
i have the JSI open now to see if the goat has done it
apart from closing the active window what does ESC do by default in UE5?
that's so good, did you make it?
because I found something, whenever I hit ESC it cancels the current drag and drop event
I found it
there's literally a cancel dragdrop node
@trim matrix no its Technova45 on YouTube but its on the marketplace
@hoary junco thank god xD
so I ammended my close UI code to do this
on the JSI it just clears on inventory close like how you described originally
guys how can i make it compare with ±0,5
how do you mean compare with +/- 0.5, like detect if the float is within 0.5 of a value either side?
yes
@hoary junco good to know, because i might need it for in future.
so, idk if I'm just bad at code but, I'd do that this way:
the float == has an epsilon param
what's that
uhm so what do i use the bool for?
the error margin
to i make a branch and switch compares?
is it a node?
yeah but i don't need a boolean
this is what i am trying to do
but when i move my mouse slowly it goes 0 to 0.07 multiple times and it somewhat lags
so, what you could do here is, nearly equal between A and B, set your tolerance to 0.5, then set a branch from weapon sway and from false go into compare float, which means that while the ialook value is within tolerance it won't do anything but the moment it exits tolerance then it will go into the compare float and do the greater than or less than actions
something like this?
np
I messaged about this same issue couple days and got a lot of great responses. I do not really want to change from using Widgets to using PlayerSttates or anything though because I do not understand them and I already re-did the entire CardUI system once. I just do not know why this does not work. Image 1 is Widget A and Image 2 is Widget B. From what I have read about through forums I think this should be correct, but I get nothing, so if someone knows something please let me know. Thank you.
i mean what is send to widget b, just this event you got here ?
it's just printing string
I have logic I want to implement, but the event in Widget B is never triggered, to figure it out I made it simple by just to learn what I am doing wrong
At least it seems like it is never triggered
so your target is self, so the event is in the same bp as A ?
The Event "Event Send to Widget B" is in Widget B, but the Function in Widget A "Send To Widget B" says Target is BPI DealCards. I guess I am just a little confused and I do not know how to reference Widget B inside of Widget A
i put all my widgets in the hud
to call the event on b, you get a reference to the widget, and then use that
i feel like your calling an event in itself because target is self
so do you have that event setup in a ?
idk how you got the node if you don't
Do I have the "SendToWidgetB" Event in Widget A is what you are asking? If so, I do not
how did you get that node on there ?
but you need a reference to widget b, then you can drag off that and call the event
I implemented the BPI in Widget A to call the function and I also implemented it into Widget B to create the Event
how do I do this? I have create a variable of type Widget B and then when I run the game it does not work. I close it and get the Accessed None error or something
accessed none because you just got an empty variable
when you create the widget, set the return of that to your variable
or just promote to variable
and use that as the target
i c so you can put an interface on a widget ? thats what you did ? but thats an event not a function ?
i'm still learning so idk if it matters but i thought interfaces were just functions
My understanding is you can use them to talk between blueprints and you can only set the iinput and outputs. There is no way to implement logic into the BPI as far as I know. This is when I guess Function Libraries would come into play
ya they are functions, that you override on the bp that implements it
So you are saying something like this?
but you can call a regular event also, but interface is good if you are having multiple with same functionality
omg that f*****g worked
Well I can continue plkaying with it now because I got the text to print! Thank you so much!
Why is it that on random occasions, I can't seem to create a comment, delete, or make new nodes?
has anyone experienced this for 5.3?
I have to exit and reopen the blueprint :/
Hello, working on a simple POC here, any reasons why my Get Game mode cast to currentGameMode is returning invalid when called from widget?
I've had this same issue multiple times in 5.2, I just assume it's a bug.
widgets can't get the game mode
game mode is server-based
hold on, there's a neat infographicc for this
Since when? I did a full project in widgets in UE4 through Widgets only and its never been a problem before?
Hi, I have a construction script in a parent BP that creates some static meshes from a data asset. If I create a child class from the parent and set the data asset it does not create the static meshes in the editor window - I have a 'parent:construction script' node in the child class but it does not seem to be working - Is this usual behaviour? Is there a way to have the parent construction script run in editor?
wow that needs more pixels my bad
yeah lol
as u can see widgets exist on the client side
if you're looking for something that can be accessed by player controllers and the server, game instances or game states are your best bet
thats a UE5 change right? cause I did it 100times in the past and never had an issue before
Anyone have a better method for doing bullet spread?
Well that's disappointing news, thank you
maybe get random points within a box?
np
here's a better infographic
This wont be spherical though.
idk sorry
firearm spread is a game design decision
no necessarily better method
I was just asking if anyone knew a better method I might have overlooked.
Wait, that framework doesn't work lol, cause Game mode is accessible through default BP_ThirdPersonCharacter which is a pawn
but that just gave me a good idea to solve my problem
yea maybe that infographic isn't good, but pawns exist in the server and on client
(from the vynn diagram)
minor issue but something I've noticed is whenever volumetric clouds is on, if the game pauses in the middle of the camera moving, the clouds start glitching out and flickering, is there a way of fixing this?
like they start doing this
Creating an Ai for testing, it is meant to follow the player, but it isn't and I cannot figure out why?
Any help would be appreciated!
does the pawn have an AI controller tied to it?
I have a problem with spawning pickups in world partition. If they are far away from player start they don't seam to load, or are they falling through the unloaded map? PS: I am using spartially loaded on them all - pickup actors and spawn point actors.
Drag out of GetPlayerPawn and GetActorLocation and put in in destination. And do not do that delay loop.
You might want to run that on OnPossessed instead.
Not sure if the AIC has time to be created on BeginPlay
No it does not, can you not make a pawn move to player without one?
if so we have our issue XD
You need an AI controller for that node, too
Use timer to achieve what you are trying to do
Did you set up a NavMesh?
you need an AI controller before all the rest of this XD
without the AI controller it won't move
makes alot more sense that way.....
Fixed it, I don't know wtf I was thinking.
Thanks guys!
np 🙂
think of pawns like dummies and the controller like a motor, if you want the dummy to move you have to put a motor of some kind in there, otherwise it will just sit there. This applies to AI and to character pawns too (their motors being their movement components)
gotcha
I keep the information of my items in data assets. I change this information at runtime.
How should I use SaveGame? I can't save the data assets because they are objects.
Rifle, Battery, Food, etc... each of these has different variables in DataAssets. I can make the variables in them struct and save them into SaveGame object. But what if I have hundreds of different data asset classes? I will have to use "For Each Loop" for every struct type i saved, and this means hundred of "For Each Loop" nodes. I am not sure what way i should follow here. Any comment appreciated. I can describe the problem more detailed if you ask.
Aight so, HUD cant call Game mode so I called game mode from the HUD owner controller and that solves the problem. Thanks for the help!
I have a repeating event track in sequencer and I want to lerp a float on a UI element via the event track and I can't seem to figure it out.
Just curious, but what information do you need from your gamemode?
GameMode stores my API class that handles the calls to the database
So I'm using the widget server connection to try and connect the player with the registered informations and return his account Id which grants him access to his characters
This is not correct.
@still breach Your issue is that you cannot RPC within a widget.
Widgets are not networked.
Wym? The infographics say otherwise
I actually tried without RPC and it didn't work either strangely enough
so I am correct
I don't care what infowtfever says. You can get the game mode within a widget.
can you provide a simple example, everything I tried returns null
You cant if its a multiplayer project ^^
Listenserver.
You could in UE4 cause I did a multiplayer project back then fully UI and I used Get Game mode about 100times from a widget
I didn't say it was a good idea. I said it was possible.
🆗
oh it was listen server, so thats probably why it worked lmao
you mean a custom event on the widget that runs on the server? or when the client is both the client and server
when client is both client and server it works 100%
Good day everyone.
Is there a better way to set data inside a blue print that is read from a data table?
I mean that makes sense, I assumed you were just client side
yeah new project is dedicated server, which is why i was surprised it no longer worked
@queen sphinx make a Gun Stats variable struct?
how do I curve the interpolation so that the animation slows down toward the end?
dedicated servers are a pain to ship lol
@craggy flicker So I heard, but im up to new challenges 🙂
i hope you're developing on UE from source lol
This said. Yes you can get the GameMode on a widget. But in most cases, no you should not get the gamemode from a widget.
Even in the case where it might be a server related widget. Generally speaking even if you were to make a cheat or lobby style widget you should make systems that allow you to network that to the server regardless of who is using it.
Making dynamic components on your playercontroller, or playerstate can help a lot to manage these without linking the widget to too much and keep your code clean from muddying other systems.
so I'm currently working on my gun, and I'm trying to add a delay for when you shoot you can't spam shoot. the "fastershootsupgrade" is currently at -0.1 per second but I have no idea on how to loop the code from set waitshootime back to delay and to stop once the variable waitshoottime gets to zero, could anyone help. Please @ me because i have this sever muted for too many pings
feel free to help the other person first
@maiden wadi care to elaborate on that last part? Would love to learn a bit more on that approach
consider using enhanced input
i have no clue what that is could you please explain?
@safe rain SetTimerByHandle is what you're looking for I believe
ByEvent*
i assume this pressed does not hold,. right?
yes
lets say this is a shotgun right
i cant exactly hold down on a shotgun
but thanks for trying
i could try using a branch, then if waittoshoot is not = to 0 then it would repeat?
yep
ill let you know if it works
there are a lot of approaches to go around it so i dont know whats the best one, but starting with enhanced input setup is my best recommendation
A good case might be for an admin widget. You need to server rpc to do most admin related stuff. To server rpc you need an actor or a component on an actor that is owned by the player controller or that the actor is the player controller itself.
Putting components on PlayerController or PlayerState allows you to do a basic GetOwningPlayer call in a widget to get the controller and a GetComponentByClass. This lets your widget only care about the component on your playercontroller largely.
So you put something akin to an AdminTools ActorComponent on your playercontroller, use the above to get it. Then you can call serverrpcs through that component. That component can internally get your game mode or whatever else is necessary to do whatever it needs. It also has access to it's owning controller via GetOwner->CastToPlayerController to gather anything it needs to know about the user of the command or to determine if that user even has admin privilege.
Another case is a lobby widget. You need to serverrpc data to the server for your selections. Same idea. Drop a component on the playerstate, let the widget gather it and use it to RPC and replicate data to others.
you could try this too @safe rain , im sure it works, it might be more lightweight than spamming boolean check (?) and might give you more control if you end up making things complicated later on
and it also wont require enhanced input, since you can stop the timer on mouse release
@maiden wadi Yeah sorry, I should've been more clear. I get the actor component principle part. It's the "dynamic" actor component that you stated that was bothering me. To me dynamic means instantiated runtime, so I was failing to understand how a "dynamic" AC might work with a widget.
That being said, does fetching an actor component from an object instead of the object directly improves performances?
Ah, yeah lobby was a case for that. If you wanted a lobby within the same map as the game and not a specialized lobby map. You can throw the component on when necessary, remove it when done. Doesn't necessarily always need to be dynamic.
Gotcha! Thanks a lot!
So I'm using timeline's to move this train, and whenever I'm in windowed mode (or not in Fullscreen) the train stops further down. However, when I'm in Fullscreen the train stops in the middle. I am beyond confused why Unreal does this, can anyone explain? My guess, is that whenever I enter Fullscreen it slightly lags the game and messes with the timelines timing
Timeline logic?
Is that why?
oh
Executes on Begin Play. It's not much an issue for me, I'm just curious why this happens.
You're using Add Relative Location I see.
yes
You could probably make that use Set Relative Location and your issue would be solved.
What's the difference?
**Guidance request on spawning logic. **
I want to spawn (using player controller input keyboard 1,2,3) a corrresponding item (banana, monkey, car) at their predefined location likely via spawner bp.
What is a clean outline/workflow** to prevent having my player character** need to hold a hard reference to banana/monkey/car spawner blueprints or viceversa (forcing the banana spawner to need a reference to player controller) or viceversa so I can** reuse either the banana or the player character in different projects** without having the export carry with itself the opposite assets (banana carrying player character / pc carrying banana) on export?
I am familiar with ACP, Blueprint Interfaces and Dispatchers, but not sure how I should properly apply them to this spawning scenario to achieve this decoupling.
If you add to the location of the train, you make it dependant on the number of times that timeline runs.
However, if you Set the location, you'll arrive at the same result even if it only runs the very last timeline tick.
Because it's absolute.
Makes sense, appreciate the help 😅
Anytime!
anyone know what the issue is here?
I found 1 post on it from last year on the UE forums but there were no replies :/
Hey everyone, i have a projectile ive made and it works when it hits the player and applies the damage and all that, but im trying to destroy the actor when it hits a wall or other thing, and it either despawns immediately, or goes through all objects. any advice?
top portion is the sphere collision, bottom portion uses the mesh itself as a trigger
the despawning immediately sounds like it's despawning because it's inside the collision box of the gun.. you need to have it ignore the gun and the shooter
So i got it to stop despawning on being fired, but now im noticing if i have projectile movement in my blueprint for the projectile, its always phasing through walls. I have my collision settings to block all collision, but its still going through walls
is the projectile set to collide too?
So i figured it out a little bit, but if there is a solution using just the mesh, id prefer that. I was just using the mesh, but it didnt let me, so i added a sphere collision and now it works
thing is, even stuff that's set to collide, if you have it moving by code and it's not physics moving the thing, then it's going to move through stuff.
rip, oh well, guess ill be using the sphere collision instead of the mesh
just a round ball, i had the root object as just a mesh, and a seperate sphere collision for the player
yeah that's the thing, you need a collision component on any kind of actor or component in order for collision to be registered
I mean the sphere collision is pretty tight to the model so I don't see the issue with it
true, I just didnt realise i needed one, now that i do though itll be fine lol
Should make the sphere collision the root. And remove collision from anything else. Scene component transforms are costly enough to update, and collision stuff on top of that is even worse.
Sphere collision costs less than even a sphere mesh.
**Guidance request on spawning logic. **
I want to spawn (using player controller input keyboard 1,2,3) a corrresponding item (banana, monkey, car) at their predefined location likely via spawner bp.
What is a clean outline/workflow** to prevent having my player character** need to hold a hard reference to banana/monkey/car spawner blueprints or viceversa (forcing the banana spawner to need a reference to player controller) or viceversa so I can** reuse either the banana or the player character in different projects** without having the export carry with itself the opposite assets (banana carrying player character / pc carrying banana) on export?
I am familiar with ACP, Blueprint Interfaces and Dispatchers, but not sure how I should properly apply them to this spawning scenario to achieve this decoupling.
Out of curiosity, this seems like a really strange thing to be abstracting into modular code?
Just that controls are normally project specific. And a system that spawns something is usually either very generically abstracted to allow data to be passed in, or project specific too. Base classes with the core logic would help.
The door keeps changing sides when i walk through
Any ideas for how to return True if 2 actors are rotated to face each other?
Trying to make it so snap points can only snap to each other if they are facing eachother, aka absolute opposite z rotation of each other.
um how would thou do such thing
well there's 2 ways of doing it
doing a line or sphere trace out from the actor to make sure the 2 are looking at one another directly
or if you want to specifically go for Z direction, get the world rotation of each, split the struct pins, draw from the Z value of the rotations and minus one from the other, if the result is either 180 or -180 then they are facing in opposite directions
if(abs(a.rotation - b.rotation)) == 180)
Alright noted! Saw online somehting about using a dot product but dont understand it lol. Will try this instead
abs is global correct?
absolute function
I actually did dot product on one of my recent projects, it's not as hard as you think XD
will always return a positive value
ah ok
so if you get -154, you actually get 154
like so?
that should work
Hey so I'm trying to make a mission table system where when the player interacts with the actor it gets the position of the player camera relative to the table, sets the table's camera to that position, then switches the cameras so the player sees through the tables camera. I got the last part working but I cant make the second camera move at all. Would anyone be able to help me out?
do you want it to be absolutely it has to be EXACTLY opposite in rotation or do you want some give?
frickin awesome! wasnt expecting to solve this today.
because there is a way of adding a few degrees either way too
I probably should have some cuchion incase decimals are thrown in.. seeing as how unreal handled rotating, seems to add decimal values sometimes.
I am rotating buildings by 45 degrees.
truncate it to int
after absolute?
yeah, will get rid of decimals
or if you want give in a whole numbers like 1 or 2 full degrees too you can use a "nearly equal" node
That would force it to be exactly 180?
yep
ahh nearly equal too sounds like some wiggle room
yeah that's the point of nearly equal
to give you error tolerance so you can be a bit more forgiving
nothing more frustrating in a game than having to be EXACTLY on point XD
yep
very nice
PM me your venmo Mike and Ana. Will send like 10 for helping. thanks
saved me time. g2g
I don't have venmo 😦
I always pay people for helping me here so.. if you set one up, will be able to do it
I'm in the UK venmo doesn't work here
I dont need your money, just glad I could give back to the community a lil
if you move countries, then i can pay for helping here
jk
ok no worries
thanks for the help anyway
you're welcome
I like to give back too lol
I mean the ultimate way to give back is to learn the engine and then help other people
I'm pretty much a newbie myself trudging through the engine but the little bits I pick up on the way I feed down to the next person who was in my position a week ago or whatever
just so happens right now I'm at war with the UI XD
Offset = A.Location - B.Location
return DotProduct(A.Forward, Offset.Normalize) > 0.9 && DotProduct(B.Forward, -Offset.Normalize) > .09
You want to use dot product for "how much is this vector aligned with this other vector?
and you just gotta check both cases and if both are close enough to looking at the other then it's true.
Don't use rotations for this, roll would affect it but roll doesn't affect your facing direction
Hey , is there any problem with downsizing on a landscape scale?
Thanks for explaining!
Does anyone else have a gimbal lock issue with a directional light if you give it a RotatingMovement component? How to get around it?
Thanks
I have tried using add rotation, then tried getting and adding then setting rotation.. all 3 of these cause the light to lock at 90 degrees.
Suddenly converting the other axis y and z form 0s to 180
Seems like it's a known issue and people can't solve it
https://forums.unrealengine.com/t/directional-light-stops-at-midday-in-day-night-cycle/427138
Hi there. I have a day/night cycle created using this tutorial - A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums Here is what it looks like in my blueprints - It works when the sun speed is set high enough, usually 2 digits like 10 or 30, but when set to something like 3 or .3 to which the sun speed ...
whats the value of sunspeed?
I learned of the radial force component today, that allows you to push / pull physics objects. I would love to do this with characters but of course they can't simulate physics without breaking movement. Does anyone know if there's a component / simple setup for this, or it's a custom thing that needs to be made?
how can i make my ai open and go through doors
ez
ok?
I am trying to enable interaction through a function call, I have tried using boolean and enum and even setter and getter, but for some reason. the changed varaible is not saved as when I call get or use the property later after setting it, it is showing as not updated.
It seems to be lossing the value some how.
Anyone know what I can do?
Show code
Hey all, I made a small (free opensource MIT license) plugin that adds a few extra BP switch statement nodes, such as 'switch on float' and 'switch on float range', a brief search shows that occasionally people in this channel seek this functionality so I thought I might post the link here: https://github.com/Amir-BK/ExtraBlueprintSwitchStatements
I'm surprised I haven't seen more complaints about this (maybe I haven't searched well enough):
What is the logic behind having nodes dragged off into "duration" as opposed to "print to screen" (when typing "print string" in context menu while dragging off) ?
I can't fathom how "duration" would be chosen even 5 percent of the time ...
it probably just matches pins based on type.
True, as it always has to convert
in the first Image I am trying to play a montage using the jump event and in second Image is the anim blueprint and in the third is the montage, the thing is I am trying to play a montage with the default Unreal First person character But is not playing the animation at all
Any ideas here
if anyone can help me this
please
The montage, The event and the anim blueprint comes all default with First person character content
Try #animation
ok
Hey, im trying to setup a dynamic uniform grid panel, where it spawns as many buttons as there is "items" or what not... Currently im on stage where i make multiple buttons based on my dataset data, but i have made WBP Button (which spawns in grid) and now question: I want button to display the text and other stuff regarding the dataset, how do i set it up all of it?
basically, how do i put my dataset data into a button itself...
as your button is a custom class you just need to add members to it that represent the data you want to pass, set the variable to 'instance editable' and set the value on the button, you can also set it to 'expose on spawn' and then just assign it as you create the widget blueprint in the graph, an easy way to keep things organized is to store all the relevant data in a struct and pass that to the button when you create it.
You make a variable of the struct type your data table uses in the button and set it to instance editable and exposed on spawn
Welp a second too late
Might need to refresh the create widget node to see the pin showing up
The Delta between the two rotators seems to suffering from gimbal lock when the angles get near +- 90, and it just flips the actor back around the opposite way. I assume the only real solution would be to convert the rotators to quats and then calculate the diff between them.
@inland crystal what you mean, is, go to my WBP_Button, add Text to the button, then mark textbox as variable, and then make a setter for it? After this I go back into my where grid is, and then set data for that button? (pseudo thinking rn)
kinda wish UE5 would just use Quats for everything
hmm even with converting to quats I'm still getting weird side effects
without confusing things too much, to avoid making too many events and functions on the widget bp you want to have the relevant data available when the 'construct' event for the widget is called, so you create the variables for the data (like 'Text', or 'St_MyDataTableEntryStruct') and mark them as 'Instance Editable' and 'Expose on Spawn', now when you refresh your 'Create WBP_Button' node that you already have in the graph it will show the pins for the new variables you created, you can provide the data as you create the button, then 'use' this data (such as, assign the text to your button's text box) in the construction event for the widget, and that's it.
would this be the right way finding the difference between two quaternions?
I'm just subtracting one from the other but I'm pretty sure that's wrong
oh ok... will try hehe, im kinda new to blueprints and stuff, and now im trying to find that instance editable and expose on spawn (where exactly those are and what you need to highlight to get it?)
They are in the settings/details of the newly created variable
hm...
You gotta get the basics right
Adding a fully on TextBlock widget to your Designer is not a variable
It will create a variable, but that's a side effect
We are solely talkin about the EventGraph and the variables you can create there in the Variables menu
Hello, was there a UE4.27 update? Now all the parent variables are visible in the blueprint actor variables and it's kinda messy. Is there a way to hide them again?
ah ok, I think this too programically, i will try to see and refer to some docs and tuts then. Also now understand that you need variable seperate to set ok...
It also now shows all the variables that were accessible through "Class defaults" only before which is quite redundant.
4.27 o.o
There is most likely no update anymore to a ~3 year old engine version
You enabled the parent variables
Yes I think there was a hotfix update recently
Either way, you just need to disable showing parent variables
it's somewhare at the top of the variables menu
Show Inherited Variables or so
You're right, find it, thank you
oh yeah, i did all, works well, but maybe you know how can i set like a picture inside the button (which would be a mesh with added texture), my dataset data has texture path's and its names, and my mesh is static same thing anyways, is that possible?
like character skin selection, one mesh, different textures
You can display Textures, not Meshes. For Meshes you need a whole different setup.
You may also want to consider making a special Button for this kind of stuff, cause otherwise all your base buttons will have the image stuff and the exposed struct pin
But either way, if you have a UserWidget, you'd add an Image Widget to it, where you want the image.
And then given you have the Struct with the Text and Texture as a variable, on EventConstruct you can take the Image Widget (Variable) and the Struct Variable and call SetBrushFromTexture on the Image, passing in the Struct's Texture variable.
ah, thats pretty straight forward
i kinda wish i could have my mesh and applied texture, as a skin selection for character
That's a lot more involved if you actually want the mesh. Also heavily depends on how the actual UX should look like
i seen some guy on youtube make, but he made each seperate BP of each different outfit/skins, well that works, but if its material and mesh, im thinking that way
There is no straight forward way to render Meshes in UI
hm, thinking pseudo-code, what if you take mesh, apply texture, and then make it into photo* ? (i dont even know if thats possible?)
Do you want to preview the Outfits on a Character? Or should each button have the mesh ?
And should this be live or just static images
hey im trying to make a stress bar that goes up everytime u see or stay around the monster and the more the bar is full the more agressive the monster would be does anyone know how i could possibly start making this like a yt tutorial or smth
you know how in Fortnite, one char has different outfits*, so think same way here, my char outfit is more of a diffewrent materials, so i want button to display a whole mesh with applied texture of it, so player can choose with texture he wants to use on player, but instead of texture on button, he sees a whole mesh with texture (a whole player with that skin), if i make sense
Cut the feature into multiple parts. The Bar is just the UI showing the Value (Current divided by Max).
The Value itself can live in the Character.
i got a float for it so just make a ui bar for it
Yeah
But as a Static Images
oh yeah... hes not moving
i could just create images and just put them in 😄 tbh, but im tryna see capabilities of tool (if the player with skin can move in the selection part, that would be cool)
Idk if there are available plugins, but you can theoretically make Thumbnail Images (which are then just UTexture assets) from a scene
We have something like this internally to make images for a Building UI of an RTS
oh... that sounds like a way for what I want
Designer opens the "ThumbnailCreator", selects a Blueprint and then presses CreateThumbnail, which creates Texture
But that's a lot of custom C++ code
But maybe you find something online that can do the same
ok got the ui now what should i do after that?>
Where is your float located?
in my player
Then in the Widget, do "GetOwningPlayer", which is a Controller.
Then "GetControlledPawn" (Or GetPawn, can't recall if they renamed it).
Then cast to your Player BP and get the Float
Keep in mind the Bar probably uses Percent (0 to 1), so if your float is > 1, you gotta divide it by some max value
yeah i can do that and code, but I think i will leave it as a on side, i think its more convienent just to make each picture and put them in, just trying to see how far this tool goes 🙂
Our Thumbnail stuff creates those Textures in the Editor. It just takes pictures of the Asset in a Scene (with light etc.) and an alpha channel.
So nothing runtime. The Textures are then assigned to the Assets and simply displayed in the UI.
Showing the custom outfit on the character after clicking on it is a different story of course.
Either you design your UI in a way that the actual character is visible and you change it on that
Or you gotta get some fake mannequin BP that you change the outfit on that you get into the UI with a SceneCapture
But again, that's more involved
yeah, I guess setup level and UI where buttons are, and in level have character blueprint, and selecting button it calls function to change the characters texture etc
The sanest ways is to have space in your UI where the in-world Character is visible
Rendering the Character in the UI is just not that fun
Lyra has a "PocketWorld" plugin that does some heavy lifting for this
Which you could use for your own project by just copying it over (matching Engine Version of course)
But not sure how much it offers
@surreal peak is this correct i did this in the Ui
We use that in a custom form in our project to render a preview of the Building in the corner of the screen when hovering it
im trying to understand, what you mean is that, i can only use UI and inside of UI have a BOX, that renders character, and other way is to have like UI and level setup with ball?
The preview is somewhere in the scene where the player can't see it
If you want to actively show a moving Character (idle anim or so) with Texture/Material/Mesh changes you have two options:
-
Use the Character the Player is controlling directly by for example zooming in on it and leaving the center part of your UI blank so you can see the actual character.
-
Use a fake Character BP that sits somewhere in the world where the player can't see it and use a SceneCapture + RenderTarget + Material + ImageWidget to show the Character in "2D" in your UI.
Yes that is correct for getting your Character. With the little requirement that your Widget has a valid owning Player which you usually specify on the CreateWidget node
You way want to check if the ControlledPawn is valid before accessing it, cause the Widget could exist without a Character being possessed
Im doing first approach yeah, having a whole in UI 😄 but 2nd one seems more efficient. 2nd option renders in real time, so character moves and everything?
And then you have two options:
-
Naive way of creating a Binding for the Percent of your ProgressBar, getting the Value and Dividing it by Max and return it.
-
Create a proper Event Based system, where your Character has a Delegate (EventDispatcher) that it calls whenever the Value changes and the Widget can listen to that. This is a lot more involved but the preferred way if you want clean code and not rely on Tick-based Bindings.
Second option is less performant
Cause the SceneCapture renders the scene again
Even if only partial
so whats the point of second one then? If i can make same wthing with 1st one and easiedr
Second one would render the scene to a RenderTarget, that can be placed into a Material and the Material can be assigned to an Image Widget
Which means you can place it wherever you want into the UI
Instead of having a hole that just shows the actual scene
Probably not, no
I would suggest designing your UI/UX around just showing the character directly
Without any RenderTarget
Pretty sure Fortnite doesn't use Render Targets
last question for now, if i want to make, character "coming into the view" in a level, do i use like animation (i want char to come into a view of UI, and then you choose its skin)
imagine, you press "select outfit" and character walks into the scene (in front of level camera) and you choose
yeah, so its animation?
Yeah that is ani mdriven I guess
Here is the example of not using a Render Target
The UI has space to show the world behind it
The characters are standing in some small room
More performant, less fiddely with lighting, FOV etc.
That's the first option
yeah, i will basically make UI have nothing in middle, so character stands in middle and theres UI button on right side smth
level -> Char BP -> UI
Character is clearly behind the UI
do you have any examples of 2.?
This maybe. I don't know if their UI is in world, but I doubt
You can see the Character is in front of the UI, so it must be in the UI layer
But that's not necessarily Unreal Eninge of course
Other engines might have an easier time with this
But the result is the same I guess
couldnt you do same fiddling with Z?
Right side Character is in UI I guess
Or rather, rendered to something and displayed in the UI
Screen and World don't share any kind of Z value
whats this game?
Screen is always in front of World
so you cant put UI element inside world/level thats interactble?
what would be a better option
Diablo
You can, via WidgetComponents. They were originally made for VR UI.
But in traditional games, you usually don't do that
yeah, i was literaly thinking about how in VR these UI are
Most people calculate the ScreenLocation based on the Projected WorldLocation
but you could use for traditional and have a cheat way to do it 😉
RiderLink aint installing to engine after new update
btw exi how could i make my ai open and go through doors
- In theory, but if you are a beginner, 1. is easier for now.
would you by chance have a guide or smth i could follow for that
Yeah sure, but the 3D widgets are basically meshes that render the UI on a Plane
So they will have resolution and AA issues
And might also not scale properly to different screen resultions etc., so they might be tiny for larger resolutions
I wouldn't use them outside of VR fwiw
No, you just need to add the Percent Binding on your Progress Bar and add the code you showed me into the new function that opens and return the 0 to 1 scaled percent.
You'll find tons of stuff on google for this, cause every Healthbar works like that.
Well, every ProgressBar based one at least
anyone know how to fix this error when installing RiderLink in engine?
i cant find much stuff on this as i either find one that only opens doors or moves around
Yeah wait for jetbrains to fix it to work with 5.4
I don't think it's compatible yet
You quoted the UI response, not the AI one
No clue about AI opening doors. Not really an AI person
XD
Check #gameplay-ai I guess
ok
damn ok
alr thanks, I will go setup my ui
how come every time I open my project through the unreal project browser it says I needa rebuild from IDE cause the project is made on a different version, so then I do rebuild from Rider, and it works. But then the next time I open it from the unreal project browser it says it again
you have multiple versions of unreal installed, the uproject is set to one but you are trying to open the project with a different installed version via the browser.
you can right click the uproject and select the 'switch unreal engine version' option.
I've had this issue for a year, I only build from IDE since then
can't even fuckin use rider, for some reason it's just started eating all my ram as soon as I open it
didn't work, plus it already displays the engine version as 5.4 in the browser
and if I ignore the warning and continue anyway, it just says it can't find the module and the project doesn't load
how can i get the instance of the BP_MarbleSelect that is in level and use it inside this WBP blueprint to change its material?
Custom nav links. There's not much on them but there's enough to get the basics of how to make them and use them.
Alternatively, you might be able to use smart objects but you might need c++ for them.
Are you compiling with DebugGame in Rider?
I think so...
One usually does and those aren't the binaries used when starting the Editor outside of Rider
Starting the Editor outside of it uses DevEditor
So if you never compile those, this doesn't work of course
That actually makes a lot of sense
nah it's using dev editor
The not sure. That's the only reason I ever got that
Aside from literally using 2 different engine versions
Yeah same for me actually
But then again, in C++ projects I never open the project outside of Rider
Right, aside from the problem, you should use DebugGame
Gives more info when hitting ensures etc.
I just never need to debug :^)
can't even use rider properly cause it's taking all my RAM
How much RAM do you have in total?
i know c sharp and thats abt it lol
16 gigs, but it takes whatever is free
Hm, 16 gigs is possibly also the lower end
so I could have nothing else running and it'll take like 15g
yeah I needa upgrade but can't really do that right now
I mean it was working fine a while ago
I was at 16gig a few months ago too, I had to upgrade for the same reason you're describing though
Rider does get a bit weird laterly if you have it open for a while
It just gets super slow and laggy until restart
But the RAM usage idk
fwiw, the PC I'm using here atm (from a Client) has 128GB Ram 💀
pain
Throwing money at it until it works is also an option, lol
The project is quite big, so this is probably even needed
I think our own machines are at 64
And not even all of them
I also noticed that some of the GPU can't handle our artists requirements for having Engine + 3D/2D softwares open at the same time
But GPU are way too expensive atm
(at least outside the usual gaming requirements)
Then look at custom nav links, they might be called smart nav links. You can do those just using BP.
I made dynamic buttons (which creates depending on dataset), i create buttons like this, then make button have onclicked, i want button to have function to change material of the BP that is dropped in level. How can I access Level references within the button or is there no way to do so?
Something like this. It's an actor manager that allows you to register an actor using a name and then retrieve a ref to it somewhere.
Welcome to this tutorial on how to create an actor manager system in Unreal Engine 5! In this video, we'll go over the basics of setting up the system using Unreal Engine's powerful Blueprint visual scripting language.
Whether you're a beginner to Unreal Engine or an experienced developer looking to better manage actors at runtime, this tutoria...
Haha saves me writing out an essay. 😛
i kidna tried, to get reference, so in Level BP, I init the UI_BP (which has variable of Marble BP) so it passes to my UI_BP. Inside of UI_BP i made fx which changed the material (thats what i need) of the BP_MarbleSelect. Since button is the child node of UI_BP, I passed UI_BP as var to each button... (i think there shoudl be a way to get parent node ref????) and then i called FX from button using the UI_BP ref i passed inside of button, on press, from button passing the required material...
But something aint working the way i tried to do... maybe something with ref
I get "Blueprint Runtime Error: "Accessed None trying to read property WBPParent". Node: Set Mesh Graph: EventGraph Function: Execute Ubergraph WBP Marble Button Blueprint: WBP_MarbleButton". Bellow is my button on_click
Hey Can Anyone tell How I can move my NPC Randomely and in a specific area only
through blueprint?
How do you set wbpparent?
You can use EQS to get a location that can be reached in a specific area, once you've got the location you can use the AI move to node.
can you please explain more or share images and nodes of blueprint Actually I am new to unreal
How to check if variable is not null in bp? I know how to do it in cpp but I cant find it in bp
This is a starter guide to EQS. It's best you give it a good read.
Thank you
Assuming it's an object/class ref you can use the is valid node.
I got yellow ducked 🙂 yup i didnt set that sucker...
how do i get "THIS"
it's string. Im getting held item name. If none is held then it is null.
The 'self' node.
Is not empty and is not equal to null.
It depends what you're doing. I prefer it for scripted type events.
As an FYI comparing strings can be slow. Its normally best to use a 'name' if you need to check its value.
I am having an issue where my enum property change is not being saved and so when later I call get enum and compare it, it does not show me the updated value. It seems to loss the value assigned some where along the line.
Addition to that, I have also tried using bool and many other method and am keep getting this random result where it works probably sometimes and sometimes it doesn't.
How can I fix this?
I can't see anything wrong. How are you calling 'set interact' and the 'lmb interact'?
Sorted
Thanks

trying to manually control the view target is driving me insane in multiplayer. why does it just throw the camera in the center of a player when it switches possession before ive set the view target to anything
It's been a while but I think that the player controller has a camera manager attached to it, and that by default this camera manager has some behaviors, like automatically switching the camera to the possessed pawn on posession, but I'm not 100% on all the details here, I remember facing a similar issue in the past.
What are you calling when it kicks the camera to the centre of the character?
FName?
Anyone know how to implement pan camera movement with middle mouse button with enhanced input system (>5.1) ?
Yea
Hi, i've recently been trying to make a rhythm game, and to make some of the workflow easier inside the sequencer editor, im creating a editor utility widget to automatically copy, shift, paste, and bind a selection of keys to a new section.
Currently I have successfully managed to copy and paste and shift the keys to a new section, but i cant figure out how to bind them to an event.
Thanks for any help!
https://blueprintue.com/blueprint/k5nepf3s/
you want to bind animation keys to an event?
I remember seeing a video about this, but can't find it anywhere now
yeah, and i cant figure it out for the life of me
Hmm, so I have spells in my game and heroes, something like in league of legends / warcraft. Now I want to add spells to the BP_Hero_Base (from this I will have all the heroes). Now I wonder If should I add the spells to the Hero_Base (like array of spells that can be casted, and each key on keyboard activates different number from array) or should I maybe create actor component as SpellComponent so it's more modular? will this make sense?
never added something like that before but generally for my systems I always make an actor component (I am a beginner in UE so take it as a grain of salt)
Are you using GAS?
No, I'm making kind of very simple spells, should I use GAS?
wait is GAS even supported in bp?
Like you know, spawn sphere with radius 200, and people on contact will heal from it 20hp every 1s per 20s.
It's a rts/moba type of game. Should I use GAS then? I didn't have time to check out GAS, I found some tutorial and it kind of fits what I need, but maybe GAS can do it better?
GAS is a pretty big topic, it depends on the complexity of your game.
A plain ActorComponent to handle your spells would also work for a simple game
Partially
Yea SpellsComponent does make a lot of sense. If I need I can give this to any even ''minion'' I want in the future and he will get access to spells 😄
yea, I used actor components for my inventory system
thanks for help ❤️ always good to hear someone elses opinion
Does it make sense what I'm doing?
I will have 5 spells, and I need a way to check where was the cursor, or where will be the mouse in time of casting. I think I have to put it a little bit further and of course add more things so I will have previev etc, but so far I just want to if click 1, spawn spell in mouse location. Since I will have 5 spells and I don't want to put the same code, I made it into event that I will call when needed. Makes sense?
@dusky cobalt, Event doesn't seem appropriate to me. I'd use a GetTargetLocation Macro, but it probably doesn't matter.
Is event heavier than macro? I forgot about macros 😄 I guess they are best for things like that? or maybe a function?
Unlike functions, flow wont wait event to finish before flow moves to the next node. So in some conditions, Spawn can run before Set
I'd use a function
a function that you pass a class, and it gets the location and spawns the actor is what i would have
SpawnAtMouse or something
Hey so I'm trying to make a mission table system where when the player interacts with the actor it gets the position of the player camera relative to the table, sets the table's camera to that position, then switches the cameras so the player sees through the tables camera. I got the last part working but I cant make the second camera move at all. Would anyone be able to help me out?
Hey what does this mean?
makes sense, thank you for idea!
Looking for help in trying to bind a event to an event key for sequencer
I guess thats what thats how complex the different shaders are, it shows it in the nottem bar near the white area I guess it's a thermal camera but for shader complex. I don't really know it's just a guess, it's proly for optimization stuff.
What?
Should i clarify or am i wrong?
The only time that is ever even the case is if you use a latent node like a delay.
Hmm, yeah I think you're right. Could be a UV mapping thing
proly
The flow does not proceed to the next node unless the function returns something. But events do not return anything
So it runs event and directly moves to next node
Btw does anyone know if I can use Quixel Bridge assets/decals in my final game? I had packaging issue with it on my last project and had to publish without all quixel assets/decals.
Your wording is just really confusing. Are you trying to say that if you put two functions in the same event that there's no promise that one function will run before the other?
This is just shader complexity. Like Ryck pointed out with the question, Transparent shaders like glass cost more than a masked or opaque.
can anyone help me out with my thing?
Multi or Singleplayer?
single
Couple different ways to manage it. Could just possess the table if you made it a pawn. Would be the fastest way to get both input and view.
Alternatively you can do largely the same thing by enabling input on the table, applying a special input mapping context and then your set view target you already have.
Then the table itself could manage moving it's own camera.
Should I be worried if my interior of the same color as the glass ( and the interior isn't glass )
It's not the same. Move into the train.
You see the same color because you're looking through the window.
Oh I see, my mistake 😅
Ight thanks I'll give them a try
hello friends how can i use a randomly node choice?
i try to say after the "move comp to" it gos to patrol a again or to patrol b how can i do that?
i have the patrol event for patrol b but how to implement that?
random Int?
ok let me try thanks
Also AI Trees. 👀
Hey so I don't think thats what im going for, I need to move the tabels camera to the players camera so it seems like a smooth transition, what im having trouble with is getting the player's camera location and moving the tables camera there.
Why not just use the blending option?
?
The node you're using. SetViewTargetWithBlend. It has a BlendTime. If it's zero it's instant. If it's > 0, it'll take that amount of time to transition between two view targets.
Just tried it thats not what I mean, when the player interacts with the table the table will get the players camera world position and then set its camera to that world position, then when the camera switch it looks seemless and I can apply animations and stuff to camera 2
Ah. Well if you need something more complex than the lerp that provides then getting the player's current view is pretty easy. There's a GetPlayerCameraManager. If you get that you can pull off of it and do GetCameraLocation and GetCameraRotation. These should match up with any camera the player is currently viewing.
Maybe make sure you’re actually using proper blend time tho, sounds more like you’re overcomplicating it and using it wrong tbh
Thanks for the tip
For an Randomly chosen event i use "switch on int" with the "random integer in range"
sOLVED
W
I got it to work, thanks a ton, turns out I was over complicating things lol.
This gives me error. How to ensure that ItemName is not null?
doesnt work
cpp is easier
you mean if it's empty ?
wdym null ?
if the variable doesn't exist ? or it's value is empty ?
If player has item then ItemName is something. If it doesn't then FName is nullptr
Hmm, maybe "isValid" check?
okay got it. My bad. I forgot that I must check if item is valid first. Then name will be valid too.
I know that feeling very well. 😄 Happy it works.
hey guys somebody knows why that is not working?
I want that before the unit moves into my player char a exclamation mark appears but why i get an error an nothing happends ingame... 😦 i have unclick the hook for hidden ingame by the unit
any guess on why this is happening when pressing the interact button I made?
Presuming you mean the red lines, it looks like debug draws from a trace or overlap call.
The reference to the player character is invalid. You haven't set it to anything before that execution ran.
no, the thing in the bottom, it looks like it changes the aspect ratio and shows this in the bottom
i try it now in that way but still not ok...
Oh, I completely overlooked that like it was the windows bar. 😂 That's a new one though. What all does your interact key do, and what hotkey is it? Does this happen when you play in Standalone, or only PIE?
you set the variable to itself
It's set to nothing. You're setting nothing to nothing expecting it to be something.
your basically saying set A to A
hmm ok let me try thanks guys
This is one reason I hate the idea of saving refs. They really are confusing to work with initially. It's a lot more easy to prototype and learn if you understand where and how you can get global references, because it'll also teach you how to create systems that allow you to store and get global references.
PlayerCharacter for example can always be pulled from GetPlayerCharacter as long as the player's controller is possessing a character.
thanks
I made the interact button to pick up things and put them in an inventory, it works well but it makes that visual glitch and I dont figure out why, it also happens in standalone but the visual glitch changes to a white box with 2 black lines in the middle
What is the hotkey you have set for Interact?
E
In respect to this I'm still working on I learned about navigation system agents, added one and named it, and put that cooresponding name in the world settings and changed the color of it so I can tell it's using this new data. I set the nav agent radius and height to the same as my capsule component, check that it can walk, and set the default query extent to the size of my capsule component as well. my character still moves up 10 units of Z when I use AI Move To >.<
if you take out the try add call does it not do it ?
i'm guessing it's probably something to do with that
also curious is you can rebuild the recastnavmesh without like deleteing it and the bouinds volume and putting it back down
so I'm trying to make a system where depending what key is assigned to an input action, a UI element changes, so if you want to interact with something and it's assigned to the E key, and you look at a box and you're in range to open it it will say "E - Open Box" but the E will be an image, like I have a bunch of icons for letters and gamepad buttons.
but if you rebound the interact key from E to F then it would change it to "F - Open Box"
how would I do this?
I have the linetrace set up to look at the item and it already causes the UI to pop up, but I just need the changeable icon based on what button is assigned to the interact action.
Hey, I asked this question a while back in a different channel but got no response so now I'm trying here. I'm working in unreal 4.27 and every so often upon starting up the project at least one of my timeline tracks will have disappeared, does anyone know what's causing this and how to fix it?
so if I wanted to do this in a way where it will switch between gamepad and keyboard, I'm guessing as long as in the array I do the keyboard as the first entry in the key binding list and the gamepad as the second entry then could I set up a variable for the index in the get a copy function to where it's 0 if the player is using a keyboard and 1 if they are using a gamepad? if so how would I detect that?
try the 2nd pic
I am doing the 2nd pic
I know... that's why I asked...
I can do the rest what I'm asking for is how to detect if a player is using a keyboard or a gamepad
because then I can switch the index to where it will pull up the keyboard entry in the bindings if they are using a keyboard and the gamepad entry if they are using a gamepad
nope, still happens
what's the Return Value text when using a gamepad?, you could look for a substring ?
Can you only use timelines on an actor? Is there a way to create a timeline in a gameplay ability? or in a component that can be added to an actor?
you can make your own timeline
Timelines themselves are actor components so they can only be added to actors.
I have a weird issue... in the first pic, Killer is filled out, in the second, it's None. What is going on here? 😮
Here is a basic Timeline with 1 Float track in it
useable in components
Issue is not clear. What is None? If you mean the pointer is not valid, what are you passing it Killer? How are you testing that it?
How to get vector length between the character and the first object beneath it(I wanna enable ragdol when length is more then a specific value)
When the execution gets to the first picture, Killer has a reference to the killing character in it. This calls the event in the second picture, but there Killer is None, and further logic fails because of that. 🤔 Is it possible that calling an event makes the code no longer synchronous and that's why the reference is lost?
I am trying to move some audio along a spline ahead of the player but my math isn't correct and it keeps sending it really far - any idea what's wrong?
Not really. Not unless you used a latent node. But without a clearer picture of the code, it's not possible to state.
Try something like this.
The bottom node being what your component location is set to.
thanks
if these two variables "Camera Previous Location" and "Camera Current Floor" both have the same value, and the timeline is just two points (0 sec 0 value, .2 sec 1 value), why does my camera display some movement when jumping up and down? both camera component and spring arm maintain the exact same location throughout the jump, yet there is clear camera movement. also if instead of using the lerp i just plug in camera current floor to z value, no camera movement when jumping
disconnect the tick
it stops working as intended, the camera just becomes fixed to my character rather than the variable camera current floor
What is this for? It looks like you're trying to do something on a timeline that should just be a tick interpolation.
im trying to have the camera become "platform-bound", but also have a smooth transition when changing to new platforms
previously i had this horrible set up, where it would switch to a "move component to" node shortly after triggering a new camera location, but then maintaining a "set world location" afterwards. the current method i linked above is much simpler and handles the transition in a cleaner fashion
What is Platform Bound in this sense?
Cause I still feel like this would be easier on a tick interp.
basically im trying to create a camera system similar to super mario world. platform bound generally means its locked to the floor, and my characters Z movement doesnt move the camera up/down. in certain scenarios, the z axis "unlocks" and follows the character, and in some situations its "roof-bound"
it might be the case. I had no idea how to implement this and so im just experimenting with whatever came to mind
I'm actually doing exactly that and was about to ask a very similar question haha
what I did is I created zones which send the camera mode and information about a spline to the "camera man"
whenver the player enters them
Gotcha. So you basically just need a floor point. And to interpolate the spring arm to that point. Similar to what you're doing now. Granted what you're doing now would probably work, but I'm assuming the camera movement is due to the spring arm being attached. You would need to detach the spring arm from the character and manually move it with the character.
My camera man is constantly doing a vinterp on tick though
So I've made these camera zones for my side scroller which basically tell my "camera man" component whether to freely follow the character, be fixed on one point, or follow a spline, when my character enters them. I'd like to be able to include something in these, particularly the free camera version, that prevents the camera from moving outside the bounds of a specified box. Or to explain it another way, I am trying to find a way to restrict my camera to a 2d plane, similar to how I can make it move along a 1d spline.
I'm wondering what the best way to pass the limits of, say, a collision box to the "camera man" for it to use as a limit for when I'm at the edge of a screen etc. would be, and how I would best use that information to allow the camera to move freely, so long as the movement wouldn't cause it to leave that box?
hey this worked - thank you so much!
Does anyone happen to know why I wouldn't be able to edit the CMC in one class but I can edit the CMC in the other class? They both inherit from the exact same parent
Thanks for this, ill try to look into tick interpolation as ive never used this. whats strange is that using the exact same inputs (in theory), of X and Y values coming from get actor location, and Z value connected to "Camera Current Floor", the movement im talking about doesnt happen. so im thinking its related to the timeline or the lerp, because thats the only difference. however, both values connected to the lerp are identical, and i tried setting the alpha to 1.0 and not related to timeline, still same thing
however, i tried just bypassing the timeline altogether, and suddenly it works.. so it seems the issue is coming from the "Update" output on the timeline
no idea why though
this is what im referring to https://streamable.com/cypw8c
Yeah. Not specifically sure what is causing it. But it definitely looks like something that would be better as a tick function. You already pretty much have it. It's basically... something like this.
Thank you so much for this, truly appreciate it
Thanks for letting me know the issue was unlikely to be what I thought it was. I looked at it some more and the event got triggered by some legacy code elsewhere. Thanks 🙂
Guys, can you recommend any tutorials on a simple inventory system? Just want to be able to add items I pick up in a list that I can check as an inventory.
Hello
Someone has a Solution for this Problem? When i walk against a moving object with Collision my Player is bugging around
im pretty new so grain of salt on this, but im also looking to implement something similar. couldn't you add a "min (or max) X value" float variable, and have your camera logic check the actor's X location value on tick with a branch. if the X value is greater than the float, then set camera's X location to "min X value" variable, and if less/equal to float, then just use the actors X value or whatever it was already using
Thanks. I think what I'm gonna try is passing in the transform of the box, figuring out its outer bounds based on that info, then clamping the x and z values based on that. If this works, the next problem I'm going to have to solve is finding a way to make sure the distance from the edge of the map is consistent. But I don't think that's a problem I'll be able to solve until I decide for sure whether I'm using paper2d or 3d walls/ceiling
I'd like to not have to manually set the size/scale of the box to be exactly a certain distance from the wall every time I put one of these "zones" down but I'm sruggling to think of another way
hmm yeah you're clearly way ahead of me on this haha. How do you clamp the x /z values?
"Clamp" is an actual series of nodes. I'm pretty sure I can use that. When I'm actually working in the editor I may find that it's not applicable but I can't say for sure until I've tried
you can give it a maximum allowed value. It basically does exactly what you said
If I make a custom event and put a delay in it, then call that event, does the node after that event call trigger immediately, or after the latent is finished and resolved the event that has the delay in it?
I was in the middle of building out a series of branches checking if above max X, below min X, or inbetween, creating those 2 variables as well as an integer variable, and a Select using the integer as index to select between min X, actor location, or max X.. sounds like the clamp already does all that in a single node... though if the function is somehow the same, i wonder if the processing requirements change a lot
looks like the answer is it goes immediately. Is there a way to make the call of the event also be latent?
What were you trying to do? Sounds more like you were trying to recreate InRange than clamp.
When i try to set show mouse cursor for the client from an actor it doesnt work or sets it for the server
you could make it a macro
Cause you've set it on the server. You are on the server from the moment of that ServerRPC
Yeahn but when i put switch has authority and go on the remote its not calling
basically to add "camera walls" to mark the end of a level or prevent vision beyond a certain point. so for example, when im near the left edge of the level, the camera no longer moves to the left, its X value stays static until the character moves further to the right beyond the min X value specified
or same thing for a roof/floor using Z values
Cause you're on the server. SwitchHasAuthority is just a check like a branch. So Remote will never run.
Cause the client doesn't own the keypad.
Do you have any solution
so rather than this, i can simplify it to this.. but considering they seem to do the same thing despite visually appearing simplified in the clamp, i wonder if theres a big difference in processing/computing demand
also thanks for pointing me to the InRange node, i was using a combination of greater, less, and And booleans to check this in other situations
Unsure of best result. I always handled this with a bit of back and forth. I don't use interfaces. One component traces to find the best interaction target, gets a second component off of the hit actor. Based on the data on that component it will run local and or server functions that the actor itself can run. But I rarely need both.
EG if I need to interact with something like a keypad or chest it's as simple as me throwing up a widget on screen because the actor itself is already replicated and ready. For a chest the RPCs to interact with it are done via the inventory components, as there's always one related to the player you can RPC through. For a keypad I'd likely do a generic RPC of an actor pointer with an instanced struct to pass generalized data through the RPC to the keypad like the key pressed.
And in this case when the user interacts with the keypad and the widget is put on screen, their inputs are changed to match like showing mouse cursor etc. Most all of this is handled for me via CommonUI stuff but you can largely do the same thing yourself manually.
Anyone know how to get the sun disk location?
trying to make a solar power system.. if trace hits sun, generate power.
im probably wrong but, i thought the sundisk was set by the directional lights rotation
why not avoid the headache and use if is day generate power. Would also increase the performances by a ton since traces are expensive to use to some degree
I would be inclined to say simply trace in the opposing direction of the main directional light for a little ways.
Cause Solar Panels don't work inside even if it's daytime.
@maiden wadi I thought about that, and in that case yes, do a trace from the object, not the sun
Also don't work on the side of larger buildings.
I want it to matter where you place your panels. If you have them against a cliff or near a tall building, thats a choice you have to make.
Lot of complex cases
And as long as you're not on a PS4, a couple hundred traces in a second or so isn't going to cost much.
I would have the trace start from the object then, would be much shorter and easier to handle; if collide with visible then return false
Because I feel like having a giant Trace that tries to covers the whole map isn't the way to go
There really should be a way to get the sun disks location though
it is a thing that exists in the level I thought
Well the skybox is your sun technically, its just a texture, the object doesnt really exist
can you add image to button using blueprint and get'ers?
howd you do it? I was thinking of getting actor forward vector and mult by neg 1
hahah nice
yeahhhh
dang. nailed it
In this tutorial we explore the creation of a solar panel, complete with independent cells that harness the power of the sun. This lays the ground work for batteries, energy weapons, and other goodies in a complete electrical framework (i hope).
i dont quite get why we would do - though
the sun disk is not in the positive x direction?
cause the directional lights location isnt going to help at all. the sun is so far away that regardless of where the actors location is, all that matters is its rotation / forward direction. no matter how large your map, anything using the opposite of the sun's forward vector will basically point at the sun
What is something that would use the opposite of the sun forward vector?
The directional light.
What's the simplest way to get an element by index from an array? there doesn't just seem to be a GetAt(index) type node within its context
There are two Gets. Get(a copy) and Get(a ref)
oooh I see. keep forgetting disk is part of the directional light.. got lost in the "its" and the "anything"s in the explanation.
hmm i don't see the ref one, and it's an actor in the array so ideally wouldn't want to copy it
You do want to copy it though.
You have an array of pointers. Not an array of actors. Unreal would absolutely shit itself if you copied around objects everywhere.
ah that makes sense, thanks
Hey all.
Question: I have multiple actors as part of an array, is it possible to get a specific component of an actor out of that array? Like when I call the actor from the array, can I then call a specific component that is part of that actor?
yep!
How would I go about this? I am having trouble finding the correct node in BP.
GetComponentByClass
I can't believe there is no "GetComponentByName" where you just pass in the literal component name from the BP editor and it looks into a map to fetch the component efficiently instead of iterating
I forgot about these nodes. I would have cast to :/
general question guys, is there a way to mark an input binding as "release key"? or do i have to juggle with logic to get it in ue4.27?
Enhanced input plugin can do it
Thank you very much for the help, that solved it! Have a good day 🙂
Literal comp name 😔
You don't really rely on names so much. Tags are much faster and more dynamic.
I dont wanna care what someone named a comp i'm looking for
If i do want a specific comp, i need to filter it somehow anyways
It's a very rare case to need a very specific component where there might be multiples. Handling rarely causes this kind of necessity. Usually you either need to get a special component like the ability system, or you need to iterate over all skeletal meshes for some reason or another. It's rare you need to care about one skeletal mesh in particular by tag or name. You'd usually care more about the bone it's attached to if it isn't the primary skeletal mesh or care about what mesh it's displaying, etc.
Sure, but tags require iterating over all components + iterating over all tags
But considering we're not talking about 100s here it's probably fine anyway
Even if we were, class and fname comparisons are incredibly fast. And since it isn't looped in BP, it's fine. Remember that FNames compare nearly the same as integers so it's insanely quick.
Hey yall, I got a bit of an issue, I'm trying to make a input for Gamepad controller and it's trigger and when I use it (Axis1d) it always returns an Action Value of 1 for some reason, is there any fix to this? (5.3.2)
Are you using the axis key and not the cardinal direction one?
I am so stupid, thanks for helping I've been looking around for an hour 🤦
😄 Been there, facepalmed that.
Hmm... Another issue.
I have a camera attached to a bone but the camera does not move with the bone and stays entirely stable.
Any idea why this might be?
I would like to limit camera rotation, however checking the world rotation to be within a certain range (< and >) leads to the camera overshooting and getting stuck. How would I get around the overshoot problem?
Not sure if anyone will run into this issue, but if you do: I had an addition plugin that had references in the details panel of the CMC. The plugin was uninstalled, but the reference still existed. Unreal doesn't throw an error or anything or (from what I can tell) have a way to deal with this scenario. I had to reparent the blueprint to AActor which lost a bunch of settings, then reparent it back to the original parent. I then looked at the DIFF from depot and tediously replaced all my settings in the newly re-reparented blueprint. This fixed the error in the CMC display window and I'm able to see it again. Interestingly enough, the reference viewer did not have a link to this reference when I originally uninstalled the plugin.
The only way I was able to determine the plugin was the culprit was by re-creating the broken state in another file. Basically retracing my steps over like 8 different revisions
not sure if this would apply, but maybe use a clamp. that will lock it between a minimum and maximum, or otherwise use whatever value its at if in between
Depending on the use case, you can also set min and max values in the player's camera manager.
im trying to make a platform that has collision from above, but not from the sides or below (so you can jump through it from below/the sides). Any suggestions on how to implement this?
I had thought of using overlap events and comparing character Z value to platforms Z value, and based on that, disable or enable collision. however, this would mean other actors would fall if i disable collision while jumping through. is there a way to disable collision for the specific actor rather than the object type? Or any other suggestions on how to do this?
I think the built in player camera variables won't work as I am using a floating movement pawn
What camera style though? The movement component doesn't usually matter.
the project is top down
Is the camera on a spring arm?
However I created a custom camera pawn.
so the camera is detached from the character
It does have a springarm
If you can enable pawn control rotation on the spring arm then you can use the limits in the camera manager.
Alternatively. You'll need to get, alter, clamp and then set the rotation values instead of adding to the rotation by an offset.
I am not sure how the clamp fits into this. Each input action adds to the local rotation. and what also confuses me is how the camera even overshoots
maybe instead of having the platform change its collision, the better method is to change the overlapping actors collision, so that no other actor is affected
It overshoots because you're adding to the local rotation without a clamp.
7 pitch minus 12 is -5 pitch. Add does not care about your check until next time it ticks.
7 pitch minus 12 clamped to 0 to 90 is 0 pitch.
The thing is that you can't use clamp with the add call. You have to get the current axis value, add what you want to it. Clamp it. Then set it into a new rotator and set that rotator.
Question, I just added an exponential height fog into my map, but it doesnt seem to affect anything regardless of settings, but the local height fog does work. is there a specific bounds or something else i need to have to make it work?
I could then intercept the total degree value before using it in local rotation and correct it?
Correct. Something similar to this in idea.
how can I have a dynamic "Cast to" with a target depending on whoever triggers the event?
Depends on what you need to do with it. Can use composition with an actor component or interfaces usually.
Interfaces!
ok, never heard of interfaces.. something new to learn haha, thank you!
composition also sounds unfamiliar
on component begin overlap, i want the other actor to set their collision response to world dynamic to overlap, and back to block on end overlap
but im realizing that the component it calls to would likely be different for every actor, as its based on the component rather than the actor
Sounds interface like if that's all you need. Just be mindful when reading up on interfaces related to Unreal. There is some really stupid info floating around regarding them.
how to: String + " " + String
append
roger that, ill keep it in mind. thank you!
thanks for the example I spent the last 10 minutes adding it and understanding how it works.
very nice node unreal
so this is more a question of general preference but, figured I'd ask to see if anyone has insight on it. I have a system where there's a sphere trace that comes from the camera on its own channel, if anything blocks it, and it's not overlapping a wall or an object that would block the view to the thing in question, you can interact with it
generally what's the best range in terms of length and width of the sphere trace for interactables? Like how far away should be the maximum interact distance?
Obviously I don't want you to have to shove your face into every object in order to open it, and I don't want you to have to look EXACTLY at the item, I do want some leeway but I don't want it to be too far
any suggestions?
Depends on game style. First or third person shooter?
first person RPG, kinda elder scrolls style
Then I would say one of two things. Either specifically at the distance you intend to allow interaction, or that distance plus say 30-50% where the name shows but not the interact key yet.
well what I'm trying to get is what would that distance be?
I've figured out that 160 is the distance between the person's face and the floor if you're looking straight down
Hard to gauge without playing. I think most of my personal testing ranges are around 300. But I'm not sure where I would finalize that. 300 is a bit far. Feels like you can stretch arms. I'd assume 160 is too low. Need to pick up things on ground without crouching somewhat easy.
I have a hard time putting into numbers what the actual interact distance should be and I've been playing around with a few ideas but none of them feel.. right if that makes sense I'm having difficulty pinning down a number
Just depends on game though too. If you're going for super realism then like 120. Make them crouch to grab things on the floor. 😄
realism isn't my top priority.. I want the game to be a bit more casual
like I'm absolutely enamoured by TES4: Oblivion and it has been a dream of mine since it came out in 2006 to make my own game in that style, obviously an open world game of that size for a solo dev is a near impossibility so right now I'm making a tech demo of a single city with a small amount of surrounding environment and a couple of dungeons to really kick off the project and gauge interest
200-220 might not be bad. Not in an FPS project to test though. TBF this is also something you'll get some community feedback on.
that's true, I'll try 220 for now because 200 is what I'm sitting on atm and it feels too short, I think I tried 225 and it felt too long so 215-220 might be just right
thanks for the input, hopefully I'll have something to share of this project soon
😄 Feel free to tag. I like Elder Scrolls.
is there anywhere in this server to self promo? I've only been at it for 3 days so barely got the inventory and some basic UI done, but I've been thinking of recording dev logs and uploading them to YT
I think either #1054845120236757103 or #1054845218723209226
aah thanks they weren't on my channel list
like I said there's really not much to show right now, I'm still using the default first person map and character, I really want to see if I can show the full body and feet below the character instead of it just being empty eventually, but everything's gotta start somewhere 🙂
I am still getting a weird bug with volumetric clouds though... if I pause the game by opening the inventory UI they do this
Is it possible to change the collision of only a certain part of the landscape?
generally you'd put a gap in the landscape and fill it in with some kind of mesh that has different collision I'm pretty sure....
someone will correct me if I'm wrong but, that's how I'd do it
Pretty much. Default landscape in Unreal is largely terrible. It's good strictly for basic terrains made at editor time with no runtime changes.
is it possible to edit datatable, is is straightfowrad? I can GET datatable stuff anywhere, but i dont see set?
datatables aren't meant to be updated during runtime
oh...
generally you pull a base value from a data table, store it as a variable, then change that variable during runtime
i made a character picking (with a store idea kinda), and made datatable to have booleans like (own it, etc), so if i cant edit those booleans, then datatable are just static mess?
like how would i make it, that i choose this char, I buy it, i apply it, and then when i press play game this will be the characte i will be as***
Array of the datatablerowhandles of owned characters maybe. 🤷♂️
yeah I Was gonna say an array
Stick it somewhere you can save/load it related to the player.
then what shall I use in this situation? To have player info (stuff he has, currency, unlocked characters) during life-cycle of game?
im trying to understand how data is being stored in ue
variables... lots and lots of variables.
so what do i make then?
like... where do i strore that data during life-cycle of game?
I think a step back is in order.
What kind of game are we even discussing? What kind of game style? multiplayer, singleplayer?
so what you'll need to do first then is create a save/load system, then as part of that save data system, have an array of characters with a boolean attached as to if they are owned or not
what you mean save/load system? could you explain a bit in detail?
I've not tackled that part of UE5 yet, look up some tutorials on how to set up a save/load system
like you know how in most games when you hit the save button it creates a save file? I'm talking about that basically
Writing to hard drive and loading from it. You make a child class of SaveGame. You put variables in it
doesnt that expose to exploit?
Lol. You're making a singleplayer game. Just accept defeat there already.
heh, nevar
then you're going to be spending the next several years treying to exploit-proof your game only to have it cracked in 2 minutes.. it's not a game you can win
there's only 2 options to saving data
1: have it be an online only game that saves its data on a server where the player can't access that data
2: save the data locally and no matter what way you do this, it's prone to save exploits... there is simply no way around that.. As long as the data is on a player's computer, they can modify it.
I mean... that makes sense, any application you code, you will store either HDD/DB etc and user could edit unless you crack it up and encrypt sht
even encrypted save data can be broken really easily
You don't necessarily need access to the saved data. You can edit the application at runtime too.
because that save data has to be unencrypted in order to be loaded into the game... which means someone can just create a socket between the encrypted data and the game itself and translate it.. that's how public APIs are generated for games that don't have them innately
i mean yeah sure... now it makes sense why sp games need internet connection
Wait, should save data be encrypted?? Im confused
there's no point in encrypting for reason I pointed out above
2: some games can prevent you from changing that data
yeah, basically, everytime user launches app, you give him a hash key from API, he then hapily decrypts data, everytime you save data, you encrypt it with different hash, so even if app is closed, its hashed with last key, and you store that key safely in DB 🙂
only if the data is stored on a server
Realistically it's a bad dev move to care. If you're making a singleplayer, and people want to abuse it, let them. 🤷♂️ If you want a competitive game, put it on a server with authoritive data.
what if I don't have a server?
Refer to the don't care part. 😄
but I don't want them to exploit lol
but its like, if i put in a store, where i could get a bit of money from you know... if kid with notepad++ can edit my stuff. man...
there's no possible way to prevent people from exploiting
there's one 100%, how does AAA games do it then?
By using backend servers
isnt current AAA games require you internet connection even though theyre single player/
they don't XD there's cheat tables for every single player AAA out there
Thing is, players can exploit multiplayer games too. But they just can't do it in a meaningful way if they're coded well. This is the reason stuff like EasyAnticheat exists for client side hack detection for aim bots and such because you can't reliably detect it from a server, and making aiming server auth feels bad to the player.
unless its android game and you have store and stuff
Well there’s a lot of reasons they don’t 😂😂
your options are
1: server
2: your game can be exploited
there is no third options
This isn't a cheat prevention. This is a piracy prevention.
Which also doesn't work.
yeah DRM can be broken really easily
server = backend server? Does it mean an actual physical server or a virtual free one?
only custom DRM like rockstar are tough ones as i know
basically Game <- API <- Your Database (API and Databse can be in one computer/server hosted)
there's no such thing as a truly virtual server, the data for that "virtual server" is being hosted on hardware somewhere.
usually on a server farm
generally game devs that host server authorative games buy or rent out their own server farms to host the data on
So I'd need to pay for servers?
yep
ew
if you keep your pc open 24/7 you can host on your pc 🤷
I don't see why it's even an issue.. like I said if it's a single player game who gives a fuck if it gets exploited it's only ruining their own fun
They really aren’t as expensive as you might think and if your game makes money can be offsetted
but if it's a co-op game host system multiplayer..
It's a giant waste of money for a singleplayer game though.
mhm
I meant peer to peer
Unreal has no P2P
And even a lot of Coop games don't really need cheat prevention honestly.
I mean you could run an anti cheat but why?
a lot of ppl told me there was, I'm curious about that
Realistically the only time you need cheat prevention is for public servers, or a competitive game.
if your SP game has in-app purchases or ads, then you need server so you have tamper-protection some kind of... not that people that edit will actually buy something but yeah, better this than indian tutorail how to get all paid skins on your game
then there's ways of doing client authorative servers
have 1 player be the host, or allow them to set up their own dedicated servers
then the host/server client stores the data.... that does mean if the host or the server client wants to cheat then they can... but the player clients that aren't hosting can't cheat.
but TBH if you want to stop the host/server client from cheating, that's bad because it also stops them from modding the game which... most co-op games survive the long term exclusively through modding
Yeah but you are likely going through a backend for that
Huh?
i mean... ofcourse its backend (API and DB)
Thing is, that stuff is still hackable. Like even in a multiplayer game with skins. You can force equip skins locally. Others won't see it , but you can.
the host will be able to do anything anyways, so yea, that's what I want
Sorry platform. You aren’t really hosting your own stuff for that
then yeah that's possible... there's still ways to exploit it though....
how is that called? peer to peer?
oh, i was thinking of writing my own API and DB with Google services API's
it's called client authorative
it's not peer to peer
TBH when you are doing in app purchases use a platform. Will save yourself a lot of headache and liability
true, but platform could be more pricier* but i will see
thing is, let me put it this way.... Final Fantasy 14, second biggest MMO in the world (or biggest depends who you ask) does not allow mods of any kind in its EULA, it specifically states no mods or addons
they have a huge modding community because it can all be done clientside and the server can't do shit to stop them, though it's mostly cosmetic changes that get made
Oh yeah rest assured they will take their cut. But it’s better than your business going under because your server got hacked and all that credit card data is places XD
nah, you dont store any credit card details... everything is handled by Google API's or STEAM, or whatever you use, and tokens
That’s a platform
Storing it is entirely a different can of worms
cheating happens in video games it's just a fact and even the biggest AAA corporations in the world can't stop it with their best efforts and in the end (like capcom) just end up hurting their modding community who actually loved the games and just wanted to change them a bit
us plebs just getting into game dev aren't going to stop it....
i thought you meant platform, as in... your whole database and game api's you want is some kind of company "easy unreal API" services...
nah but Mario kissing Luigi is bes... (Nintendo knocks on my door)
You handle credit card processing on something that’s not you. Your game/server says “user a wants to buy X” and the waits for the api. The api returns “yep user a bought x” continue you aren’t processing it yourself is what I mean
I mean people have modded nintendo switches 😛
did you read what happened to the ones that released those mod's? 😄
nothing