#blueprint
1 messages · Page 187 of 1
Does Common UI or Unreal itself have an implementation of RadioButton or something similar?
Is there a way to get a text representation of an event graph? Or some sort of pseudo code?
Nope, only header
that's the worst thing with BPs, not diffable
Found the documentation... Wow... amazing! this was exactly what I was trying to do in the end.
Hi, Can someone help? My character is being spawned far away from the map and I'm trying to understand why. How can I use a PlayerStart to select the spawn location?
How can I get the c++ header preview for a blueprint that's not saved as a file, but attached to a level?
what
Attached to a level?
The Blueprint Header View is an editor tool to provide you a method to convert Unreal Engine Blueprint Classes,Components and Variables.
Or is that not a thing?
yes it is, but what do you mean with attached to a level
I opened a levels blueprint. I'd like to get a C++ header preview.
c++ header preview of the level?
Of the attached blueprint.
the level blueprint?
Correct
You can only do it with stuff from the content browser, unless you write a tool for it
And don't use the level BP.
It'll just show the vars of said BP
Would be nice to see
Hi does anyone know how to make the camera stop following hmd device in Collab viewer VR template. In the normal VR template I have an option to disable lock to hmd but I can’t find something similar here
Asking here as well.
Is it possible to debug blueprints in an Unreal build?
I know you can attach to process from the IDE to debug the code when running a build, but not sure about BPs
is there a way to make this async load stuff work without c++? completed callbacks get last DartPart param that event was called with, breaking the intended behavior obviously
Anyone able to explain why I get multiple loops of output to my console log when I compile a non-looping blueprint with only one actor placed in the level? I've Googled it and only been able to find conflicting or uncertain information. Most reasonable answer I can find indicates that UE thinks there are multiple instances of my Actor, but it doesn't go into more detail than that.
And even then, that answer wouldn't explain why some instances are listed multiple times per compile.
Hello I'm trying to do something strange, when user grabs a component and removes it from the collision in the image I'm uploading I want to do something/function/rest of the Blueprint. Now I know I have to use OnComponentEndOverlap but I've used this method with different Blueprints. For example I had a keycard system which when player grabs and brings BP_Keycard to BP_Door's box collision(which is the scanner) it opens the door by using Other Actor, but I couldn't figure how can I use it with the mesh that I've already have in the same blueprint.
this is my BP_Door's event graph
or is it possible to use with mesh at all?
may or not may get the last dart
the order is unreliable here, it is what ever get loaded first, pretty much
You can probably do this with a component. Create a new component and do the async load stuff there and bind delegate on completed
otherwise use CPP and make use of Handles
c++ is the plan now, thanks! though didnt consider the temp component route, might give it a shot
building a simple game clock/calendar/daynight cycle. I have this bit to update the minutes variable, and when I'm inspecting the values in the bp they are changing but when I check the actor in the game level and its variable details it's not updating at all.
Some good samaritan helped me implement it if you want to look at the code
The code will let you load the last one that you set. Because if it's currently loading something, we just cancel the process and start loading the latest soft ref. This is done by getting the handle which isn't exposed to bp afaik
Make sure the actor have tick enabled then print string delta seconds
that?
Aside from that the code doesn't make sense to me
Nah
Type tick in detail panel and look around.
Then print strings delta second to see the value
oh yeah. start with tick enabled is checked
Print string the delta seconds then
I'm printing and it's fine
but it doesn't reflect in the variable value in the editor when the game is running
And don't rely on watch, they r pretty buggy. I never use it my self
Just look at the print string and move on
well at some point I will want to adjust it manually to test the daynight cycle stuff
but I guess I can do that in a different way
also, what was the node that could combine multiple inputs into one string output?
i'd like to get ss:mm:hh printed out together (for now)
append?
Delta seconds is the time it take between last frame and current frame.
So you can get time by doing
Time = time + delta second.
Minute is just time / 60
I would just use the in built date/time variable for this.
and how to calculate it?
Get seconds/minutes/hour or something you will have to look at it
I think it's just a matter of storing the data, it works with separate ss:mm:hh variables too, but I guess DateTime is cleaner
however for some reason can't add the values to it yet
Am I updating the values of CurrentTime the wrong way or something?
if seconds >= 60 -> add 1 minute to currentTimeMinutes
oh well I'll just stick to the separate variables for the time being. this is a little too confusing.
Maybe this will help you a bit
Do Input Actions work inside CineCameraActor event graphs? The BP is compiling but when I go into gameplay the controls don't seem to work.
hey that's awesome, thanks
Hey, I would like to make a "fear" bar system, what I mean by that is a gauge that increases depending on the number of enemies and the distance, if for example an enemy close to the character is filled the bar at 50% I would like 3 enemies rather far away to fill the bar at 50% too. My first idea was to do a get all actor of class of my enemies and then compare the 2 distances, the problem is that it would have to be done in the event tick and in terms of performance it would be catastrophic
onoverlap
make a sphere around your character and spheres around your enemies. when enemy sphere overlaps the player sphere it adds +1
you could use an overlap, and just loop through the ones that are overlapping
Get ref to your enemies, loop and check on tick. You shouldn't get any "catasthropic" performance issue.
Your assumption must have been based on youtube myths.
Checking the distance ? Tick
Fill up bar? Tick
i mean get all actors of class on tick can be tough if you got a bunch in the level
seperating them with a collision box that surrounds player sounds better
I don't have much enemies in my level, something like 10 or 15 but the map is huge, with a lot of asset
Just get a ref to your enemies. Store them in array or w.e. you shouldn't get any performance issues. If you do profile it
Then don't matter
You are only getting actor of the enemy class
what if you have 200 enemys, and you calculate all the distances
sounds inefficient
ig it doesn't matter but would probably see performance boost if you have a lot of enemies with some sort of proximity
200 enemies you do be looking at other things to optimise
Animations, material, etc
Just profile and check your fps
Im looping thru 30 enemies, I didn't lose 2 fps
@engage my map is kinda big, is that not a problem cause the overlapping sphere will overlap a lot of actor
Doesn't matter how big your map is tho
it was more to say that the spheres will be huge and that there will be a lot of actor overlap
Meh
But thanks you guys for your quick reply i'll try both solution anyway !
How big is your overlap, a dome?
And even then prob no performance concern
Just try it first, if no performance issue. Don't micro optimise
Ppl get sacred with even line trace on tick
Which is relatively cheap
you could also shoot line traces from enemies towards your character and check their length I guess
can confirm
i do a lot on tick and it's pretty smooth
I was kinda scared cause i have arround 70fps on viewport ,it's the first time i'm working with a bigmap( the same size has the openworldmap template)
having something like this to have a button to set the time to "h:18" should work out of the box or do I need to put that function somewhere in the event graph of a blueprint?
save a backup, give a try you won't really know untill you test it
Yup i'm working on it ! 🙂
if your sphere is huge and just about the size of the level then idk if that would be more efficient
the point was to try and get the loop to be smaller
Could someone please help me with this? I have a bodywork that is like a child actor, everything works correctly except that it seems to have a “tick” at some moments, I don’t know what could be causing it, if anyone knows about the subject I would greatly appreciate the help
are you talking about the sound ?
oh i c it's glitching
There is like a momentary delay at times in the bodywork, if you look at the video you can see that there is like a strange movement in this
what sort of camera setup you got ?
it looks like i have seen the spring arm collision glitching ?
but it's just a guess
I don't know what it could have to do with it but here it is.
in your spring arm search collision
is do collision test checked ?
its possible it's the spring arm collision making it go forward then back real fast
🙂
ah, no no, it's a problem with the physics of the bodywork, I've already tried most of the configurations that I know but nothing works, tick group, constraints, configurations with the collision, substeps, I really don't understand what it could be
did you try to uncheck do collision test ?
of the spring arm? yes, I just did it, it doesn't work either 😦
hmm
I could package the project so you can see what it could be, I have no problem with that
well the video is enough, i know very little about physics
the only thing i could of thought was that spring arm colliding
I remember that I had the same problem with version 4.27, my solution was to put the bones of the bodywork in the base mesh, that is, that of the vehicle, but it doesn't seem to me to be the correct way
I'm sorry if I'm not understanding anything, I'm translating this to comment haha
you may have better luck in #chaos-physics channel
ok thanks
Hello, how can I replicate 'MaterialParameterCollection' for multiplayer? I've been trying for 2 days and couldn't find any solution or resources. Can you help me?
Put a value in the GameState that is replicated. OnRep set the MPC value.
Unfortunately, it didn't work out. I am getting the same result again.
Did you set it on the server?
I do over a thousand per tick no problem
ye
But it's not that hard to move systems to C++
it's the glue code that's annoying to deal with in C++
Hello! What is the best way to do a nullcheck in blueprints for an actor variable? 🤔
This one?
IsValid is pretty good, theres also the not pure one
I like the IsValid Exec (grey one) cuz then u don’t need to do the branch node as well
Anyone ever encounter a component not saving on a blueprint? Aka there when you add it but after saving, closing editor it is gone.
Could be some form of bp corruption. Is the bp a character ?
yeah, from the 5.4 FPS template C++ version
Is the CMC details panel blank by chance?
no, but it is doing it with a custom C++ class, but that was working fine/saving fine in all versiosn prior to 5.4 I guess I'd have to make a new project to see if something is up with my custom C++ component and 5.4
Either way, try remaking the char bp. And if using cpp, make sure hot reload and re-instancing are disabled in settings
See above
Yeah if I make another pawn it does seem to save it there
and if I add the component via C++ via the Characters C++ class it shows it there and the regular BP added way shows up then as well
Prly just bp corruption from a hot reload then
Sounds like load order issues of some kind, somehow. EG component not available when BP is loaded, so not added?
ok, so im very confused. I'm trying to package game with exclude editor content. I don't use anything from editor but i got this problem:
UATHelper: Packaging (Windows): LogCook: Error: Content is missing from cook. Source package referenced an object in target package but the target package was marked NeverCook or is not cookable for the target platform.
UATHelper: Packaging (Windows): Source package: /Game/ThirdPerson/Blueprints/Assets/Terrainmat
UATHelper: Packaging (Windows): Target package: /Engine/EditorResources/S_VectorFieldVol
UATHelper: Packaging (Windows): Referenced object: /Engine/EditorResources/S_VectorFieldVol
but in that material isn!t anything like that
something is referencing this texture in your material, find it and remove it.
I already did but still same
DOes anyone know how i can make this work? im working with VR and im trying ti make it so that if you;re overlapping with the poster AND grabbing on the controller, it deletes the actor
im very new to unreal so im kinda noob
I want to show the amount of money I have to each of my widgets. I have a integer variable (money) that's binded to text. How can I commicate this to my other widgets by using other binded text on the other widgets.
Ive tried to research widget/blueprint communication but every video just shows a player character casting ui method and I dont have that. My game doesnt have a character. (its 2d with a bunch of images and buttons)
I am new to unreal engine, so hopefully I am thinking in the right direction, and hopefully my explanation made sense.
Left - money system that gives you auto money for purchasing a multiplier and it subtracts the amount purchased from the total.
Right - integer var (bacoins is the money) binded to text
Use get overlapping actors instead, with a for each loop where the element is plugged into the cast . Your event overlap is not connected to anything so it won’t run
Even though it's 2D and probably entirely UI. You can still use gameplay actors for things. EG you still have a player controller and a PlayerState. And you can store money on them. For example if you store money on the PlayerState, Any widget related to that player can access it via GetOwningPlayer->GetPlayerState->CastToYourCustomPlayerStateThatHasMoney->GetMoney
Even in a fully UI game, UI is still the same as like a particle, or decal. It's visual and should not hold gameplay critical state.
Need help! I like to organize my UE static meshes into folders that I then collapse. However, if I select a static mesh in the world, it automatically uncollapses that folder in the outliner.
How do I turn this off? It's so annoying and it makes keeping the outliner clean and easy to manage impossible
hey, trying to launch a blueprint character using the launch character node but it doesnt launch anything but the player. any help?
so your bacoins variable is on the widget ?
probably store the money in game instance so you can access it from any bp
alr ill try that
I'm missing something. My time system starts from 00:00:00 whenever I launch the game and increments the seconds/minutes/hours properly. I wanted to have a "button" to increase the time by 1h each time I press it for the purposes of testing my daynight system. The button does in fact increment the hours by 1, but after I restart the project the variable values in inspector don't reset and start from 0.. what am i doing wrong?
the same issue - the variable doesn't update in the inspector for minutes/hours/seconds like it does "behind the scenes". am I missing some variable setting/parameter or something?
Hi. Any idea why groom binding doesn't work?
How does BP deal with Circular Dependency ? For example Gamemode <- PlayerController <- Gamemode. I took a look at Lyra and Cropout, and they don't seem to mind this kinda dependency.
IIRC, the engine didn't support that many versions ago. It was later added and is primarily handled by the underlying loader. Do you really want the gory details?
LOL, no.... i'll let the engine handle it
just making sure I won't have complie errors when I go to publish my project
Hey guys! I want to replace my score digits with fancy images with digits. But i cant find any information about it. All i can find are youtube videos about setting up custom fonts. But i need this. How should i google it? Maybe it has specific keywords? I do understand i should tell untreal somehow that 1 = image with digit 1 somehow. But i dont know how. Do you have any ideas ore experience in such things?
Launch uses the character movement component so it won't affect other actors that don't have it. You can use an impulse for those / instead.
If you've got the images, set these up in a custom font
you don't replace a font with individual images, you only see custom font stuff because that's how you do it
@thin panther the thing is that if you use font it jist white black text. You can color it but what if i want digits like these?
says who?
i know it sounds silly, i ve just never worked with fonts before in unreal
so how can i onvert these separate images into a new font?
There'll be plenty of guides for font creation online
It's not something I have experience with personally, never needed it
I just know you can
You can use them as a sprite sheet, but if you want a real font to handle variable text then you need to use an actual font file type.
but overall its possible to convert this images into fancy font with digits and it will be like UNCLE SAM above?
It should be afaik
so i should google pipline of turning my pngs into font?
Converting images (with watermarks) into a font seems kinda sus. Why not just buy the font?
i just spent the whole day asking ai how to do that and it suggested me to create dynamic material and bind it with digits
the cookies were an example, the real images were above
nah its just an example i will not steal those
ahhh
it does have the character movement component though?
...and my Blueprint is corrupt again
Is this a common thing that happens?
Twice in 3 days
The target dummies have that?
yep
never happen to me
Are they simulating physics?
They should not be simulating physics...(I think)
No, only have issues when dealing with physich assets and bp structs.
hello I add a boat at my project and it can swim at ocean but I wanna move it with left click button. I tried many things but I couldnt can anyone help me about that ?
how do you wanna move the boat? is it like a drag and drop situation or are you making it so the boat moves forward while holding the left click?
actually I want click and point + holding left click both
they will be there, but the choice will be in the hands of the user.
so you want the boat to either be able to path to a location that you set by clicking, or you can control the boat yourself by using the mouse to steer it and left click to move it forward?
am i understanding this correctly?
yes yes both of them
hey, I want to spawn rnd amount of items (actors) after a stone is destroyed
the items should dropped like a "fontane"
so a bit pushed in diffent directions
maybe someone has a tip how to do such stuff?
okay, so the pathing would be some sort of ai, so i'd recommend you look in #gameplay-ai or look for youtube tutorials on that. as for the second option, the most basic thing i can think of would be rotating the boat alongside a camera that your mouse controls and then adding impulses to the boat actor. There are also most likely good tutorials on that on youtube as well, but that's the first thing I thought of.
Is there a way to set multiple values in an array without having to chain them like this?
I know you can have a for loop in blueprints that you can hook up to a "random integer" block to spawn a random amount of items, and you can hook that up to an event that is sent when the stone is destroyed. Then you can add random velocities to them if you'd like a "fountain" effect.
dude I really couldnt find any tutorial. Actually I found I applied them on my project correctly but it didnt work. I couldnt apply move and gravity on ocean both
probaply my blueprint mistaken
I have all of this, only the velocity stuff is missing
Loop and select node
question about this "LineOfSightTo". How can I modify the radius?
Though if you have something like socket one, socket two socket three .... socket six, it sounds like a design problem.
@fleet hemlock haha, my actually test was funny now the mesh of the actor are flying around but the widget (loot text) hanging around on its origin
there's a way you can make a velocity vector from floats, and then you can hook up random floats in range blocks to the three pins so you can have "random motion". Or you could have one motion (that looks like a fountain) and then have the velocity be rotated around the yaw axis. So you'd get the fountain motion but have the items go in different directions.
You might have to enable gravity on the actors for this effect to work tho, idk.
@astral wyvern
how would i add a boost jump for when my character shoots his weapon in the air?
yeah, thanks for the input - it works I will try to adjust some things
ohh nice
this is my itemspawn function
I have a random for loop
where 2-5 items are spawned
but they stick together
xD
i can loot the items 5 times but they stick together
sounds like your items can collide with each other, try looking into your collision settings for the items and maybe even add a specific category just for items, where they can collide with all the normal stuff but can't collide with each other (use ignore, unless you're planning on doing specific things when the items collide, overlap doesn't really do much for you that ignore can't)
oh
how can i set parent socket for the camera actor inside character blueprint
when there is no skeletal mesh in the first place for the mesh so ithas no sockets either to recognize
like if I have a parent character class, and child class needs the camera to be attached to the head socket. for some reason I cannot modify the child parent socket
in my head this stuff was so easy 🙂
I got it
I set the physics stuff after the spawn
its not perfect but at the moment the best way
is it possible to add sub levels to a main level dynamically?
I mean, you start with only the main level, and at runtime it spawn a new sublevel as part of the main level
most stuff shows sublevels and level streaming from the editor as static, I would like to make it more randomized.
Currently I'm spawning a blueprint, and the blueprint itself is the level, which I guess has the same effect
Here's how to dynamically load and unload sublevels at runtime in your Unreal Engine 5 projects!
Get access to the project files and more on my Patreon: https://www.patreon.com/MattAspland
Check Out My Game Studio: https://www.copagaming.co.uk/
#UE5 #UnrealEngine5 #UE5Tutorial
__________________________________________________________________...
this still static set at the editor, already watched
you want it to be procedurally generated?
yes, that is what I mean when I said I'm using blueprints as the level for now.
I make my main level, which is just empty with sky, then I have a blueprint that generate the ground, and use some pcg to add other blueprints around, like hose and other stuff.
which will be the entrance for the next level, but for that I need to dynamically add the levels as sublevel to the main level.
At the editor time, the main level is blank, has nothing in it.
everything leaves at runtime
"blueprints as the level for now" that isn't a level, that's just a blueprint.
It's a blueprint that generates a bunch of stuff to make up what you'd call a level sure, but it isn't technically a level as far as ue is concerned.
But if you were to make empty levels with those blueprints inside of them then you can follow that tutorial and just instead of hard coding the level name you can replace it with a variable, but you'd still have a finite set of levels.
You'd still have to save the levels as something like "level1", "level2", "level3" ... etc or whatver naming convention makes the most sense.
@crude helm
does anyone have experience with making crafting recipes only appear in the crafting ui when the player unlocks them? i tried adding a IsUnlocked bool to the struct for the recipes but i must be implementing it in the wrong spot because it turns all the recipes on when unlocking one
would that allow me to "move" the level? because if I can't place them where they need to be, it won't work.
I was hoping we could just spawn a sub level just like we can spawn anything else from blueprints.
With your suggestion I could have like 50 levels or any number and randomly choose some of them to make the level string name
but I still need to place them at the right location
So I'm having a weird problem, for some reason when I remove the repetitive eqs query and add the one time one, it works, but like this it fails. Does anyone have any ideas? (also also do ping me if you have a response please)
Well there's this way to load a level and set its location but it doesnt use streaming.
Try asking in #gameplay-ai
gotcha thx
What's the proper way to set up a timer in UE4? I'm trying to have an elevator wait at a station for a period of time before returning back to the previous station.
Not sure if this is correct
and since your level could be ultra light with just a blueprint maybe its not so bad, either way if the blueprint uses PCG to generate stuff there's gonna be some sort of hitching while that runs as you scale up the complexity
I was about to try your plugin, will this work in packaged builds, too? I've noticed that the module is only loaded in "UncookedOnly" according to the uplugin file!?
You don't need to run it on tick just call the start timer event when you want it to start again.
That's how K2Nodes are set up, I am not an expert on the system but basically K2 (or Kismet) is a compiler, the switch nodes ultimately compile down to a series of "bool terms", if you'll look at the rest of the k2 nodes (like the regular switches) they're also in uncooked only modules, I think.
ok, i thought it would maybe at least need the static bool methods (i'm not familiar with K2 stuff)
also thanks for sharing
tho, currently running into a crash with it 😄
Really? Well that sucks, well, probably not something that'd interest the rest of the channel, if you could DM me the crash details I'd definitely look into it.
Or actually for something like an elevator that continuously runs with pauses on either end I would use a timeline for that with a float value which lerps the Z position of the elevator. You could make it loop back into itself once it completes the route. The curve value would start at 0 and remain there for 10s then after 30s it goes to 1 then stays at 1 for 10s before returning to 0 after another 30s.
I'm having it interp to a Goal helper
Trying to engineer an ease in and ease out system
basically making something that can be an elevator or moving platform
or both
interp to is nice, but it kind of rockets from the start
only an ease in system
oh, there's a whole goddamn node that does that lol
though, doesn't seem to accept time
so not sure how that works
Hey, I build a Top Down Prototype and search for a smooth solution for objects and trees to fade / or / highlight the player character
I work with a marketplace camera and that have a blend mode
thats the actual result
do someone know a strategy to take a look? maybe with some videos for explaination / tutorials
You can dive into their material and look
Tick is Miliseconds since the last frame right?
Ok so next big step is Take a Look into Materials
Assets are actualy only placeholders
Hey, is there any way for me to check if multiple keys are held down? I'm just fucking about with unreal, there's no proper use case here yet, but basically, there's input actions for E, R and F; how would I make it so that I can hold down all 3 and do a unique event basically
So I can still have 3 individual events for E, R and F, but if all 3 are held down, a unique 4th event fires instead
The only proper use case I could see is for a special cheats menu for testing, or for some sort of like password thing maybes? Idk
figured out the ease node, I was just being dumb
this seems to work well
now I need to figure out how to do a starting offset
is there a way to trigger multiple animations in BP using one timeline node? for instance 5 different meshes that move at different points using the same timeline?
Why does the button of my WBP only switch materials of 1 BP Light Actor even when there's multiple in the scene and i've made sure it gets all Actors of class with an for each loop??
im confused do i need to use the Get Components by Class which isn't available in Widget Blueprints? in the array instead for it to work because this should already right?
Can be simpler with select node I reckon
Don't need to make array
And don't need to declare variable either
Yeah select node will deffinitly eliminate 30% of the code here
I see that you fixed it too. At least the random point is not set only at begin play anymore but before spawning
Pretty bright for someone that only done blueprint for 3 days
Because the button doesn't loop through anything. In its current state it's basically using the last cached value from the loop that was executed on construct.
yeah i just realized the array elements weren't getting saved anywhere 😭
i fixed it tho
kinda
Is it not possible for a BP variable type to be of an Interface type?
i.e. here:
I don’t think so. Why would you need to create an interface variable ?
I guess to guarantee that the instance variable is referring to something of that interface. That's how I would code in C++ I guess.
Is the convention just to assume it's hooked up correctly and call the interface method anyway in the Blueprint? I know it's a no-op if it doesn't implement that interface.
Yes, if the interface is not implemented it’ll just fail silently. If you want to make sure it’s implemented you can use doesImplementInterface
Wdym by that?
Interface never been a variable even in cpp
It's pretty much just a class
And you implement it to your class via multiple inheritance
hi, I want B to call a function/event that is in A, this event will take a while and return an result to B. How should I implement this
functions don't support delays, you can't pass values in timers
macros have local variables but they make the graph very messy
you can't have outputs for events
maybe use global variables instead? will that also be messy? especially if you have 10+ graphs with their own variables
how do i set a limit for how many enemies can exist at the same time ?
You can simply count how many enemies exist and check if it's more than the allowed number before the spawn.
Get all actor of class and get the length to get the number of enemy.
Compare that with an int variable and use the condition to decide Wether to spawn the enemy or not
hello, does anyone know where i can find this content sample? i get 404ed on the link, or a similar course covering blueprints that is from epic, besides stack o bot,content examples,blueprint communication?
https://marketplace-website-node-launcher-prod.ol.epicgames.com/ue/marketplace/en-US/product/working-with-data-in-blueprint-part-one
Like in C++ you can have a function signature where the param is of MyInterface or a member variable of type MyInterface.
Yeah that makes sense. Does that never cause problems in practice? I guess it shows up quickly in gameplay.
But I like invariants
whoops sorry I meant MyInstance -> MyInterface
I have no idea what this is
Anyone encountered this bug?
To implement interface for a class
Class AMyActor : public AActor, public IMyInterface
{
}
class IShape {
public:
virtual ~IShape() = default;
virtual double area() const = 0;
virtual double perimeter() const = 0;
};
class ShapeContainer {
public:
ShapeContainer(std::unique_ptr<IShape> shape) : shape_(std::move(shape)) {}
private:
std::unique_ptr<IShape> shape_;
};
Like you can specify the member variable implements an interface
Oh sure. If you can't do it in BP not a big deal
I have nothing declared in bp personally
Oh really? My use case is that I have a Lever that connects to a OpenableInterface. I made a variable in the BP so that in the editor I can connect each lever to like a Door or a Chest.
How would you implement that without declaring variables?
I don't see any bug
You are trying to connect an input param to another input param
The f
The door or chest can have an actor variable
Then you can point to your lever
When you want to use the lever, in your bp door just get the actor -> interact/use
No, I’m dragging from the initial pin
And for some reason it’s selecting the pin from another node
All I see in the video is you are trying to connect an input param of a pure function node to another input param of another function node.
I’m clicking on the normalize A pin that you see in the beginning, but the cable that shows up is one from another normalize node
I see
Compile your blueprint and try again I guess
If presist, meh just plug manually
This is my "time manager"
now, whenever I want to add hours/minutes manually it doesn't act like I'd expect it to
For example, I want to have some logic to "prepare a new day"
like setting the hour to 12:00:00 when a new day starts
so I'm triggering it in Event BeginPlay
and it does literally nothing
what am I not seeing here?
preciate it this works great. is there a way to visibly show the radius of my spawner tho?
So I am working on a metroidvania game and trying to implement an equipment system starting with a sword. What would be the easiest and most optimal way to implement a system like this? The equipment would add stats to the character and the way I have it set it up (for now) is to create a parent BP for the equipment and then add the stats to it
something tells me it's the "Get game time in seconds" is the issue here, because even if I add something to "hours" variable it's overwritten with the next pass of UpdateTime. How can I resolve this?
That begin play function call is pointless because you’re immediately overwriting it in UpdateTime every tick
yeah. because of Get Game time in seconds node
Yes
I need to calculate the passing time in a different way
Yes, get game time returns how long the game has been running for
I'll calculate it with delta seconds
You can ADD that to an int if you want to start at 12:00 I guess, but that won’t roll over when it reaches 24h
Calculate what?
well I really need to have the doors open whenever I need to modify the time
time passing
For debugging or visual for the player?
for debugging
I mean that does it for you, but not sure what exactly you’re trying to do with it
For debug, draw debug sphere for something with radius, for visual, you do have to look at special effects materials
I want to set up the game each day the player wakes up, it has to start at certain time, and I also want to tie the daynight system to this timeManager BP I'm working on. I need to be able to speed up the time as well, so I need to have the control over the SS/MM/HH variables
I mean time dilation is a thing but yeah, for prototyping just do it manually.
I can't if I use the node I mentioned earlier 😉
I’m saying Don’t.
You can
hi, does someone have any idea on how to make the AI climb the wall? the "move to" doesnt work....
You can get the second, time, min, hour , day from the variable
i dont think AI can "climb walls" by default
Use something simple for the time being, like a Timeline that changes the hours using an int track, so you can tie it to your day time cycle
See #rules on crossposting
Im sorry for that, I just needed to know
even if I add "10" to hours the "get game in seconds" will do its own thing and disregard those added hours
I don't know what you do tho
this stuff
But the variable is just a structs
basically I want to be able to interact with my time system manually and change the values of Hours/minutes when I need to
Then do so, btw why do you have individual variable for second day etc
He is overwriting the variable instead of using a +
I advice to get fammiliar with structs before tackling your date system
Regardless using that function will not do what he wants, not at this level
yeah I figured it after a while
Make your own time variable
I already tell you before tho
🦕
Time = time + delta
Do that every tick
I have difficulties with attention/focus, if I missed something I'm sorry
Don’t you have to multiply it by delta and add it to the time ?
You can have a setter too for the time
Don't think so
Delta is the time it takes from previous frame to current frame
No help?
🤷♂️ I haven’t dabbled with delta in a bit, timelines are frame independent if done right so I tend to use those
If you want your game time variable to be in real time seconds then that'll work. It'll be equivalent to just getting game time in seconds.
There's nothing built-in to do that.
You'll have to make that movement mode
any idea how I could make my own version of soemthing like that?
Depends on how you're wanting to do your movement to begin with. Physics, CMC, Mover 2.0, custom movement component, fully custom system, etc.
Yeah but he wants to change the time to anything he want
So setting the time to game time all the time not gonna work as that is fixed
Yeah you'd need an offset for that
*Waits 12h IRL to debug” 😀
I want the AI to come to player and If i am on the build I want the AI to start climbing the build I have set up the state switching
How is the AI going to be walking to begin with?
What is your movement system.
by using AI "AI move to" just simple character movement system
Yeah you won't be climbing walls like that.
oh balls I wish I hadn't deleted the system I made yesterday, the entire thing I got working now will need to be scrapped.
yea I figured that out,
You'll have to really dig into movement components or the character movement component.
I think Ai Move To basically commands the movement component and it does the pathfinding. I'd start there.
Although, you can probably do some hacky shit like making the climbable areas technically walkable
So climbing is just walking with different animations. Not sure if it's doable but maybe.
yea and it can only if it is navigatable and the walls are not considered navigatable
Heheh it’ll look like absolute shit but maybe with increased step height, tho that has limits iirc
They aren't considered navigatable because of your maximum slope. You can maybe do some hacky stuff to get around that but at the end of the day, adding climbing is pretty tough.
yea by leaning it so the "nav mesh bound" treat it as navigatiable point but sadly I cant
Could maybe use a climbing animation, stop the movement, animate, nav link proxy
I have shitty vague idea, what if I attack a socket to the root and once I am near the player I run an event and inside that even you move the socket to the player (by timeline or something) and while you do that animation would play
Yeah it's tricky. If I was to try to tackle climbing, I would first just start with the actual movement. Make it to where a player controlled character can climb. Then I would worry about introducing pathfinding
The generated doc is always garbage
It’s meh. Not much more garbage than before but now it looks like a forum which is weird
always has been
it doesnt even find nav link for 5.3 or 5.4 lol
hm.... I would have to look into it
anyhow, maybe this helps
https://docs.unrealengine.com/4.27/en-US/Resources/ContentExamples/NavMesh/1_2/
yea i know this, but its not what I want tbh
it would fit for mantle and stuff like that
What your asking is too specific, you won't really get a real help on such matters.
The only thing you can do is figuring out the movement code and navigation by reading the source code and then implementing your own algorithm / math
yea that would the last option
maybe it will be best to get it working for the player first, and then derive an AI version from that
but I see a ton of vids and example of people making movement like this but all in UE4
Relying on tutorials will only get you soo far.
Once you have to do things on your own, you won't have the skill set to problem solve
Im not relying on tutorial but my brain is stopped on how to do that
yeah, dont be like the KSP2 devs lol
I dont know what I dont know
It takes a lot of reading, research them implementing on your own.
Read read read
EqS, navigation, path finding, how movement is done
“Trust me bro, this is just a simple rocket ship game with realistic graphics, physics and functionality”
What do you want to do anyway? Wall running? Wall climbing?
i am making a VR game and there is barely any tutorial about VR
wall climbing
VR is kinda a dead end in terms of game development imho
Gimmicky af
nice for engineering, but not for gaming
But hey, join the hordes ig
Does your character use character movement component?
Most people dont even have a clear defenetion of "Dead" and attach it to end of anything the dont like/have
most people who overcome the starting motion sickness of VR cant get back to playing flatscreen game
people who like complex games cant play VR because its so dull
Most people don’t want to shell out a grand or so to play a handful of “decent” games
kinda true since it doesnt have that much button, but games like "Rumble" which has gesture are something which flatscreen game can never have
sure, there are some things that work nicely for vr, but in general, its inferior to normal gaming
somewhat true for current time, but im sure not for future
Yes, gimmicks tend to have unique features but still gimmicks
Fidget spinner of gaming basically
You’re right, idk what I’m talking about, like I said join the hordes
i mean, the lack of tutorials speaks for itself, its not like VR is new
lack of something doest make it worse
Like sheep.
Well it's not like devs that actually publish a decent game, implement their system with YouTube tutorial
VR hype is sort of gone imo, but some things are just better there.
I have like 4 to 5 sets of vr headset, dusting in the shelf
I had that stage too, but once i got over motion sickness it was very fun
yea lol
I played Arizona Sunshine with a mate for 4 hours straight
Ugh why so many lol
The moment I took the headset off I get really sick
I can remember working with the original oculus dev kit (v1) when it was first released when I was at Uni. Its very easy to trigger motion sickness for most people if your not careful.
I was in the hype train way before vr is a thing lol
he fell for the hype and bought all the shitty headsets 😛
bruh chill out
I hear if you get any fps drops it’ll make you nauseous instantly
Headsets get better and better so naturally I buy a new one 🥳
So you’re saying it can be used as a weapon 😈
Kinda need the hardware to support it too
No comment. 😅
i still hear my brother running into his furniture from time to time 😛
yea and thats why in future VR is going to be the future
Cool story
Skill issue
Who knows
Just like the Zuck you don’t understand the simple concept of freedom
what is freedom...?
right how do you guys feel about coming back to the subject of calculating time in bps'
;D
Most people don’t care for the complete sensory deprivation and lugging a headset on your head
There may well be things that replace KBM and controllers in the future but VR headset is doubtful. Unless it becomes microscopic
You already given the formula many times
Maybe Neuralink games lol
haha was about to say lol
Yeah good point we’re way off topic
yeah, but I have a different question.
Anyways like I said start with small steps.
Ask the question then
Write it on paper
I'd like to keep the from seconds/break timespan nodes in just for clarity, but
do you want to get how much time/second has passed?
Is there a reason you're not just using a timespan to store the time? It makes it easier to add and remove time from it.
no reason, seconds, hours and minutes will never be a float
Seconds is a float
It needs to be a float or it will not work, for the representation you can round it or w.e
lack of knowledge most likely
do you want to store the second?
Does anyone have any idea why I can't see the parameters from my shader in my material instance? Honestly, I don't know anything about programming and Unreal Engine is new to me. I'm learning environment creation from a course and didn't realize that any programming would be necessary. I'm trying to convert blueprints from UE4 to UE5, and everything was going well until I encountered Absolute World Position. I had to use a component mask R G because I had issues with vector 2 and 3 that the previous author in UE4 didn't have. Everything compiles without errors, but I can't see my scalar parameters in the material instance that I wanted to modify in my shader. Could anyone help me? 🥺
if you want to do that you can use something like this. it will add 1 after every second has passed.
I want to store seconds, minutes, hours, days. I'm creating a daynight system and it will also include a callendar system. I also want to be able to manually affect the time (add x hours/days via a function).
and I made it too complicated in my mind
why are u using all this integers instead of a timespan variable?
you can use this but just change the delay duration
I don't know, never heard of it
ints and floats seemed like the way to go
you literally got one here
thought you were talking about the variable type
yes
its so confusing what youre doing
just make your own timespan variable, then u dont need all the ints
This will do time. It uses a 'DateTime' variable so it'll automatically wrap the values so 60 seconds will add 1 to the minutes etc....
What's your desired time ratio? Is it at real time, 10x faster, 60x faster, what?
adriel coming with the big guns
For real time this is perfect. Multiply tick time by your desired ratio if you want it to be faster.
Add a timespan struct for the start time if you want to start at a certain calendar date.
about 20-30x, and I need to be able to set the time to a specific hour manually
Tick
GameTimeSinceGameStart += Ratio x delta time
GameTime = GameTimeSinceGameStart + GameTimeAtGameStart
Break out GameTime, trigger dispatchers if the Day has changed etc
That way you don't start at January 1st 1970 every single time you fire up the game.
I want to be able to set the date & time when the game starts, as well as each start of the ingame day
Set GameTimeAtGameStart when the game starts
Have event dispatchers that fire when crossing over midnight etc. Done.
right I need a minute to process
In that screenshot Time is of DateTime type?
Yea
I can't use "add" for DateTime
You add a time span to the data time. (thats the + node) The from seconds creates a timespan which is added to the date time.
You want to make sure you're using the right add node. There's two add nodes and they look the same. When you hoover over the bottom pin it should show it's a timespan instead of date time.
I'm encountering a couple things, so I'll just start with the main bug I'm having trouble figuring out.
I'm creating a 2D platformer. The player can fire a projectile, however it only fires in one direction, to the right. I've tried all the suggestions in different forums, but I believe the way my code is built, the typical get actor rotation, forward vector, etc, wont work?
Here's screenshots:
"Seed" is the projectile
oh, awesome, I didn't know about this. thanks
i dont see you setting the speed or direction anywhere
The other issue is that when I jump, it only plays the "Jump right" animation, regardless of the direction the player is facing. I'm certain this was working properly before I added the projectile mechanics. I'm using paperZD animation Instances.
I have the projectile speed set in a projectile movement component. As far as direction goes, how would I implement that with the code I have?
no idea, never worked with that plugin
maybe you can invert the speed or something
hmm.. I'm not sure. I'll try what I can. As far as changing the direction, that would be done in the projectile blueprint though right?
sorry, I meant the character blueprint
actually the projectile movement component should have a direction setting
I found "rotation follows velocity". Unless it's one of these other settings
could it be possible using a "tag"?
thats the direction
or "on component activated"?
just change the X to -1 and it will go the other way
I was thinking that, but when I do that it just makes it so the projectile only fires to the left
well, yeah, the idea is to dynamically set that variable based on where you want to shoot
would I use "get velocity"?
no, you would use set velocity after spawning the projectile
bruh i think i actually messed that up in my project lol
in the projectile blueprint?
here
I see, so I just see the option of "set velocity in local space"
i think u need to get the projectile movement from that and then set velocity there
gotta go now though
Hey thank you, you've got me pointed in the right direction!
hi, does anyone know what node i can use to condition a specific component?? exaple only open door when interaction is with specific door component and not the door frame
i know i can make separate blueprint for door and give the interaction to that but there must be a way to do it with only one blueprint
to have better perspective on it, im making fuse box but whenever i interact with any part of the fuse box the door opens. but im planing to put bottons inside and i dont want the door to close every time somone miss click on the box boddy
how do i disable the dialogue widget from getting created when pressing the talk button before the shop widget is closed?
We are having some physical animation issues where the characters are flopping around for some users with bad performance. However, by artificially tanking our framerate we couldn't replicate the issue. Does anyone know more about this? What are the things to look into/account for here?
At the start of the 'Talk' event, add a check to see if the shop widget is valid. If it is then do nothing, if it's not valid, proceed with the dialogue.
Pass the hit component over in the interact call
"hey actor, I want to interact. I am me (pass over pawn ref of self), and I hit this component (pass over primitive component ref)"
Then the actor can know what component the caller is interacting with and proceed
how exactly? tried this before but it does not work
So I have a problem as you can see I’m the video I have put a collision to set destruct on the ball once it hits the collision but it doesn’t delete itself also I want to respawn it at a set point can anyone help me?
If you don't clear the ref when the shop widget is closed, you could instead check if it's in the viewport.
Is there a way to force a call to the constructor or so ?
You can't call the construction script via BP. You can however, pop everything you want to call in the construction script in a function and call the function instead. 🙂
My issue here is I want a thing for the marketplace, without using C++, and got some splinemeshes here, but once I call for example a exposed function to the details panel (a button) the construction isn't called, so the splines etc don't refresh
You could use a call in editor function the user can click on to refresh the actor when the make some changes.
yeah the only way is to add a bool or so, right ?
Pretty much. There might be a way if you're using blueprint editor utilities though as that does give you more flexability for doing stuff just in the editor.
So I have a problem as you can see I’m the video I have put a collision to set destruct on the ball once it hits the collision but it doesn’t delete itself also I want to respawn it at a set point can anyone help me?
did u figure it out?
No, but I think I may be on the right track. I found this thread:
I'm not sure what to do with this "Actor moving right" variable I made though
i guess its exposed on spawn and then set before the projectile spawns
best to just watch some tutorials and learn how all this stuff is used
thank you sir
it needs to be there to say, 'this' character,Bp is messy tho hard to read
so like a
side step or something 🙂
what is the better practice:
- keep mechanics related to rotating the directional light inside of my TimeManager blueprint
- create a separate blueprint that will have a directional light that will be rotated based on a variable value taken from TimeManager?
I would keep them separate and have a BP specifically for the sun. The 'TimeManager' can have an event dispatcher that is called when ever the time is updated that the 'DayNight' BP can bind to. It can then handle what it should do when the time changes.
This also allows other systems in the future hook into the time system without it all becoming a spaghettie mess.
Yeah I need to read about event dispatchers a little..
I now have a directional light inside of a blueprint but when I start the game the light is not visible. I did troubleshoot the visibility, rotation etc. It shows in the editor, but not in the game..
If a lot of related things are going to care about time (and weather etc) it can make sense to make an EnvironmentActor
which contains the sky, sun light, fog, post process volume, all sorts of stuff
that can contain the time logic or just hook into it.
Also you'll want to look into Material Parameter Collections
you can publish the time to an MPC and any material can just opt in to it
It's bizarre because even if I adjust the parameters manually in the inspector when the game is running it's not affecting anything.
probably because it's being instantly set back
but when I inspect the values they do change inside the blueprint, and that's not reflected in the inspector
show a screenshot
If you have a logic chain like:
Tick -> update time -> set directional light rotation based on time
Setting the directional light rotation manually will be overridden next tick
unless I should be rotating the parent not the directional light
what are you trying to do?
I'm trying to tie the directional light to current hour to immitate a daynight cycle
And this doesn't do it?
nope
what does it do?
btw I think yaw is the only euler angle you can smoothly keep incrementing to make a thing spin
as you can see it's very bright in the editor and game window looks dark
I have no idea where this discrepancy comes from
ok there has to be something wrong with the rotation script. when I unplugged it and tried rotating the sun it does rotate the light properly.. I need to go get the kids, and when I come back I'll try to figure this out.
help?
I cant connect anything to the target on that Set Text, its not letting me do that btw
If you have a blueprint with components and you move components in editor, how does this work in relation to the construction script? Is it called after the translations or before? I get the impression that it is before?
well you got two problems, you try to cast the player character to a game mode, and you need a target in that set text, are you trying to set the text of a widget ? i think it's a different node but you need the reference to the item
it's saying self isn't a valid target
you need to pass it the actual component
get the reference to the component, drag out and do set text
It looks like they want to set text on a widget element, so it's just the wrong node
that "target is X" is telling you what the node is for.
If it isn't what you want, you've got the wrong node
How to use D-Pad to switch between UI elements?
D-Pad from console joysticks like Dual Sense etc
I don't think there is anything built in normally, but i have heard common ui has it
but you'll have to build it on your own ig if your using normal ui
Hi does anyone know how to make the camera stop following hmd device in Collab viewer VR template. In the normal VR template I have an option to disable lock to hmd but I can’t find something similar here
No need for CommonUI on that. It works by default if you just set focus.
Hi guys the delay node I was using with sucess in widgets to delay certain processes before blue print continues. I moved this logic to an object but objects do not support delay node. on objects what can I use to delay the event from conitueing?
What are you using this delay for?
you could set a timer?
basicly just a pause of for all the tick timers to completely stop before the next battle starts, idle fighting between character and NPC
There's no reason for that delay to be built into your UI
the SOURCE of that delay should be somewhere in the game-controlling code
The UI should just show state, not be the source of state
understood, but I moved this logic now to an object, and the delay node is not available to create on there. is there better way to delay something for instance doing a post with http connection to db and setting a delay
Timers. They allow you to call a delagate/function after x amount of time. (even loop if needed)
I will give timers a try, I havent worked with it yet, thanks
Adding to what Authaer said, UI navigation it handled by giving something focus. UE already has keys setup to handle this automatically. You just have to make sure the relevant widgets are focusable.
If you want to change the default UI keys, you'll either have to jump into C++ or get a plugin that allows you to do it. (They are hard-coded unfortunately)
probably set timer by event, move it on the timer, clear and invalidate on completed
or tick with a bool
You can't clear and invalidate timers from a uobject. 😦
I can clear timers on player controller and get reference of the variable to clear it. or will figure something out
is this on tick ? wdym "tick timers" ?
i usually use booleans to switch things on and off on tick
That's what I normally do. Outsource the clearing to somewhere that can lol.
timers ftw
Do someone know how i can make a chair slide with physics unreal
well a couple things, but for one your timer is 0.0
another thing is thats not how you clear a timer
promote to variable the return value which is the timer handle
then when you want to shut it off pass the handle to the clear node
it will shut it off
Hey guys! Im trying to allign my images inside the horizontal box and i want them to be right side alligned, but they are all left side alligned. And i cant do anything with it. All the images have right allinging switched on.
#umg maybe
the return value from the set timer
I've created an Actor Component, and added an interface to the component. Is there a way to automatically give that interface to actors that have the component? Rather than manually having to add the interface to the actors?
that's not timeline territory
that's tick territory
timeline implies a constant time for the thing to happen
you want the thing to happen until you let go
The general form should be a bit like this:
Tick -> fork position += bool * ForkSpeed * DeltaSeconds //You can just get axis values, not sure if you can just get action values but if you can then do it like this. If not, just set ForkSpeed based on input
tick
no timers for this
you want it to be smooth right?
ig if your timer is close to tick, might as well use tick
But some youtuber said tick and cast was bad
That was sarcasm, if only people knew how much work gets done on tick in the engine already
tick is pretty much the core tech in most engines, at some point theres a tick going on that you use
took me too long to realize tick is fine :\
avoided it like the plague for like 2 years
as long as you try your best to make it efficient, and it isn't actually effecting the fps that much
pretty much good to go, might as well try it before you just believe what is said
true, i just assume that people who speak on things are knowledgable :P
I love that so much
i mean theres legitimate reasons why doing too much on tick can be bad
or even not that much code but it's inefficient and doing a bunch
people probably just don't understand the reasons and say it's bad
Can anyone confirm that this is enough to turn a SceneCaptureCampera OFF off?
I've gonna have a lot of these but only one needs to be active at a time, so in theory the perf is no worse than having just one active all the time... assuming I can turn them "off" enough that they aren't using resources
Do you think it's possible to export light maps from UE5 in formats like PNG or TGA? For example, through Blueprint or C++?
I tried creating a Blueprint that captures information about light maps using a render target and material, but I'm a complete beginner at this and couldn't get it to work. Has anyone encountered a similar task? My goal is to export baked light maps as textures.
Here are my attempts using Blueprint:
As a result, I just get a transparent texture. I understand that I'm very far from the right direction, but maybe someone has already managed to do something similar and knows how to export light maps in a proper format?
I created a test scene with one material on static objects. The material has a default gray texture, and I baked the light.
Is there any way to manually set the "isfalling" variable, or manually tell the blueprint that your character has landed on something?
You might be able to set isFalling but if your char is still in the air, your CMC will prly override it
You want it to land, make it land by blocking its collision
Yeah. The problem I'm having is I want the character to mount the vehicle via jumping, but if the character can collide with the vehicle then it impedes the vehicles movement (cause it's a physics actor and I'm using physics to move the vehicle)
I wonder if the CMC stops operating when you unpossess the char
Tho tbh using physics to move the vehicle might not be ideal
Anyone know why I get four blocks of output per compile, and only one of them has the correct variables in it? Closest answer Google finds me is something about running a client and a server, but my brain tells me that only implies TWO blocks and therefore isn't the whole story.
Weird to me that 3/4 of the output blocks are throwing the same values (4 is the default MinArea, but RandArea 7 is supposed to be a seeded random integer so it's extra weird that it'd be the same in three random instances).
I'm getting that impression as well. Guess I should do some more research into how vehicles are normally handled in Unreal and see if that can handle my case. Thanks anyhow 🙂
Look into chaos vehicle
Thanks! I'll look into that ^.^
Is IT possible to make Gras generated by Landscape cuttable?
And that IT can be regenerated after x time? Or after an Event?
well I know, as in 5.4 snow is going to generate vertically as in additive, don't see why grass wouldn't also.
so you'd just tap into that system, and remove Xx
I've created an Actor Component, and added an interface to the component. Is there a way to automatically give that interface to actors that have the component? Rather than manually having to add the interface to the actors?
In my level I spawn a car pawn which, in turn, spawns an array of cine cameras attached to the car. I would like one of those cameras to automatically be Previewed and pinned, just like when you click on it in the Outliner. Can anyone guide me on making this happen?
no
why did you add an interface to it?
what does this component represent?
It's an "interaction" component, the actors I give the component to are meant to be interacted with in some way (picked up, activated, etc.) and I want the actors to implement their own logic for what happens when they're interacted with
Why do you need a component at all in this case?
Why not just add the interface to the actor?
yeah you just described an interface
Imagine that, Epic made that for you already
yea i said im giving it an interface, i already have the interface, i want the component to give/grant the interface to the actor
I dont know how else to say that'
Ah, taking the venereal disease approach
You want your component to infect the actor with an interface
But at that point I’d prly just have the component call a dispatcher event, which is implemented on each actor however you want
so is the thing i want to do not possible?
I'm confused, you can't add a BPI to an object at runtime
Yeah, it is not.
are you making your own kind of interface?
ok
But it doesn’t have to be possible really
I think what you need to do is rethink the solution to your functionality
because the way you're looking at it atm isn't correct
You can have BPI_InteractionInterface on all actors the can be interacted with and have whatever logic within them already
Your component can just send the message then
Why need a component at this point to handle interaction? if each actor has the interface with the proper functions
Idk, there was talk about components and BPIs
I'm asking him x)
I think he wants something that can be dynamically attached
anyone know anything about audio components?
what about em 🤨
do yk how to stop the audio from cutting out whenever i leave it's attenuation radius?
make the outter attenuation radius bigger
there's 2 attenuation radius's
you have inner radius, and falloff distance
falloff distance is where you draw the line
Hey, I'm using the "Launch Character" node to make the player jump for a wall jump. I've run into an issue where fluctuating FPS will cause the z-axis of the "Launch Character" node to be inconsistent. I'm pretty sure this is because that node is run every CharacterMovementComponent tick. is there any alternative or way to fix this?
oh alright then
i just wanted the player to be able to go in and out of the range with the audio still playing
but it's fine, not a big detail anyway
I'm confused, why not just make the falloffdistance really big?
Itd make things much louder the closer you get but you counter that by changing the inner radius, it's usually just finding the right balance
Unless you are some attenuation master and are willing to play with the 100 other settings
how is this feature be named? actually I work on 5.3 because of some systems that are not updated at the moment
thanks for your answer 🙂 I will read this later because I will sleep for now
Does anyone know how I would go about creating something like this?
It'll be an app to create cards using different formulas to calculate how much the card would
Is this even something I should even be doing in unreal?
😂 it's fine dw I just expanded the outer radius
it makes sense
I just thought about it a different way
thanks tho 🙏
What could I spawn that is the most light thing in the world in thousands of numbers? I want to spawn something like grid over the top of my map, and when the unit collides with one of the tile, it set's that tile to be invisible. Basically fog of war system. I tried with render target and on a big map fps drop is from 45 to 5 which makes it unplayable. I think this is similiar approach to the one in league of legends, but they are using something like triangles? Like they spawn triangles and set visibility of them as well. Maybe I shouldn't really care about the spawning because it will get handled by loading the game, and once it's loaded then that's it? Can someone point me?
The lightest thing that can be spawned is an object, but that doesn't exist as a physical object in the world, the second best thing is a blank actor, which would still cause a notable frame drop during the spawning process. There's no simple solution to spawning thousands of actors without some loading process happening either before the game starts, or during the game.
The approach I'd use is to load a certain amount of actors per second
it avoids issues where the game freezes for x amount of time due to loading everything on the same frame
Makes sense. like the process of spawning we can just simply take care in the loading screen, I just wonder if having like 100 000 actors that are empty with just material and static mesh (or something else?) will cause big fps drops?
someone at some point will probably tell you that you should be using niagara instead
hmm, can I spawn 100 000 of niagara ''tiles'' ?
I don't know anything about niagara, except it's often used in place of spawning 100,000 actors
I don't know the limits of how many actors unreal engine can have idle before it poops itself but I'd imagine the number is pretty high assuming you use as little as possible
yea i saw somewhere videos about spawning big armies with niagara, hmm that could be usefull
assuming you use Hierarchical instancing for the static meshes with like no collision at all, I think you might have a chance
and are you familiar with triggering niagara on overlap or something like that?
the only collision would be on a collision sphere on unit, it would trigger event overlap which would hide actor
I do know, fortnite has over 100k actors in the level, but a lot of that is likely unloaded on players when they aren't near/looking at it.
You could apply the same concept to your game
your performance is gonna be annihilated sucessfully
btw how would you achieve that? i tried spawning once like 50k actors and the lag was hard, and you cannot really put delay into forloop right?
spawning them at once sounds like a bad idea to begin with
doing that in BP sounds even worse
lol 😄
you can
so how would you deal the spawn time between like each 100 actors?
your real problem is thinking you can get away with 100,000 sphere collisions all running overlap checks
I'll show you the node
but if they are not overlapping then they are still ticking?
if they aren't checking for overlaps they wouldn't know they've been overlapped
so yeah
maybe instead sphere collision I could do sphere trace or even line trace
100,000 line traces per frame will still obliterate your frames
but it would be units shoting line trace and if they hit tile, it would turn invisible
This is a macro I created to allow me to for loop x amount of times, after that number has been reached it will delay x amount of seconds, and then continue
you can apply this same logic to a foreachloop if you want
but considering you are spawning things, you'd want a for loop, not a foreach loop
so you can literally just copy paste this code into a macro and it should work for you
setting the delay to 0.0 would essentially be per frame
im gonna start testing this tomorrow. if anyone also has any tips on spawning tons of actors/tiles with material to be changed on runtime ill be happy to hear, i tried doing this fog of war with render target but seems like it works on small maps only, or my other option is to divide fog of war ''managers'' into smaller chunks
if you really wanted to try, I'd start by creating a grid of actors across the entire map, and designating the spawned actors to each grid actor. the grid actors would act like managers to be incharge of the smaller actors or whatever... Whenever the player was standing close to a grid, that grid would then start checking the distance of the player and the nearby actors it owns, if the player was within a good range of the actor, the grid would turn on/off that actor
idk if that's hard to understand
@fiery swallow would line trace in cpp be cheaper than if it were to be called on bp?
People mention about bp overhead but I am not sure what the cost actually is
https://i.gyazo.com/8238a6a70217d98cbb822ff00be4ef4a.png
this is kind of what I meant
so I think it's pretty small, but the overhead is real, have you ever taken a look at erins github about what's actually happening behind blueprint code?
Rotators: I'm trying to get D such that A+D=B. Is D=delta(A,B)? And is it correct for combine(A,D)=A+D?
Nope but I doubt I would understand with my very limited understanding of cpp right now 😔
the overhead is so small it's incredible, but when you get into 100,000 lines, I'd bet c++ would make the difference
Credit to: @dense mica
https://intaxwashere.github.io/blueprint-performance/#blueprints-is-essentially-something-like-a-machine-that-calls-c-code
Even if you can't understand half of it, I'd highly highly recommend you give it a shot and read it.
Thank you I will read it now
Good read, I will keep it in mind when something have expensive or considerable ammount of param
Why not just use math
Why have anything spawned or hit tested at all
What does No Debugging data means? When I add a breakpoint and try to see the value
https://i.imgur.com/Uwer48e.png So when I use this logic, the top branch doesn't seem to set "Is Stopped" properly, but the bottom branch works correctly. Any ideas what might be causing this?
When I print the value to console, the Is Stopped flips every tick I evaluate it
now I found my issue lol
Is there a way to set all materials on an object to be the same material?
set material only lets me set per index
are you running ue in debug mode?
oh wait
this isn't c++ nvm
It normally just means its unable to get the value in the context you're trying to view it. For example, if you hoover over an output of a function that hasn't been called yet, it won't have any data to show.
Hi does anyone know how to make the camera stop following hmd device in Collab viewer VR template. In the normal VR template I have an option to disable lock to hmd but I can’t find something similar here
Hmm, I’m not saying not to math, was wondering what could I use actually and if there is alternative to actors. How would you go with math about it?
Did you understand any of it lol
Thank you so much for taking time. That may be good idea to distribute the fog into smaller managers. I went to sleep now it’s time to try some things. It’s gonna be fun 😄
Like get actor location and from that location set things in radius around him hidden? But what would be the matrix for the fog in this case?
Everything that's yellow and white are essentially fogged, only the active (red) fogs would be hidden or whatever from the player, so the player could see
Maybe I should have flipped it
By active I meant the player had vision in that area
I'm not sure if that is what you were asking
Yeah, I'm sorry it was follow up to the math approach. I get your idea totally. I'm gonna test first performance test with just a ''tile'' like on the whole map fog, then I will try to divide it into sections (so like grid of managers) and then maybe I will understand how to do it with math 😄
it may miss some and may have some additional, but the majority should be on there
Hi.
Please see screenshot.
I can't find it - "vector * float" - anybody know that is called in UE5.3?
I've been searching for it for over 30 minutes. haahha
you can use a vector * vector node, rightclick the 2nd input and there should be an option to change the type
if you want the old behavior you have to disable auto cast nodes in the editor or project settings, i can't recall where it was exactly
Hi does anyone know how to make the camera stop following hmd device in Collab viewer VR template. In the normal VR template I have an option to disable lock to hmd but I can’t find something similar here
Hello! I currently have this to make sure I only do stuff for keys: 1,2 and 3. Which I then put in a switch on int to do something specific for each of the 1,2 and 3 keys. But I hate it and I'm sure there needs to be a better way. Anyone knows?
I dont want to use the key events 1, 2 and 3 because that would create a lot of double code which is a shame as well
Well you don't need to do the branch test. The switch will by default handle that. And you can add the 'default' output in the switch if you want smth to happen when it is not 1-3.
Fair, but I feel like this is so heavy to check something on an Any Key event, or is that not true and is it fine to use the Any Key event
hey guys, i had a bunch of meshes that made up a house in my game and i combined them into a blueprint actor. problem is when i place it in game all the objects show up in the center, any ideas how to fix this?
your current way most likely performs worse
Do you mean they spawn in like half deep into ground ?
no for example lets just say in the middle of my house is the living room, every single part of the house ends up where the living room is
open the BP, are those all child actor components or static mesh components?
you need to reevaluate the buttons you click xD
because that was a bad life choice...
LOL
do you still have the original arangement in some level?
i have it revision controlled
good for you, create the blueprint again but this time pick harvest components in the dialogue that shows up when you create a BP from a selection in the level
that should make the same thing but with actual static mesh components instead of the child actor bullshit
I need to set this up, what revision control do you use? For my work I use Git, but that's just c# code. Do I need to take something different in account for UE?
i use Git too
pretty simple
or if you need to connect some static meshes into one, go into modeling mode, xtransform, and mere all selected meshes, you will get new mesh that
gonna try that thank u!
i havent tampered with modeling mode at all yet so im gonna stay away for now
it's 3 clicks literally 😄
you click merge when you have all static meshes selected that you want to merge
and it creates new static mesh
Is there no repository size limit or something?
If enemy can be pushed, stunned, interrupted, hit. This would be best as component on enemy class?
Push should also be in that component - best way to do push? Launch is not so good because I want to control distance and speed, but I also do not want enemy to get stuck in a wall if he hits wall at very long angle but slide alongside wall - any tips on how to best approach that?
i paid the $5 for the 50gb
yeah its awesome
there is also duplicate one that is usefull and bake transform if you want to have 2 variants of one mesh in different scales
so the merge just creates a mesh of multiple meshes, not a blueprint correct?
no
it creates a BP with multiple static mesh components
instead of multiple child actors
merge mesh also exists tho, but i guess for a house you wouldn't want that
also keep the reference level around, in my experience it's easier to modify stuff later on (since you may figure that some things don't work as they are right now, etc..)
am i doing something wrong, i dont see a blueprint option
yes
naw i got it, just went with the harvest components in the convert blueprint
thank you guys that fixed it!
Not for Git. For GitHub, yes.
For Azure DevOps, no.
Git is just the software
Github is the remote host, and it's pretty shit compared to the competition
Azure will give you a 250gb soft repo cap, but unlimited git lfs space
I was gonna say, we transfered to Azure, but I didnt see that option in the revision control of UE
Yeah that's because it uses Git
`Right
you shouldn't use revision control with unreal either
you would set it up outside of UE
unreals internal GIT stuff is garbage at best
can anyone see something off here thats causing my game to significantly drop frames. im running a 4080 with like 15 frames...
Alright this is something I'm sure is obvious but I cant get it to work. Basically I'm trying to make a line trace "bounce" of a surface by doing a second line trace from the impact. Of course this makes the bounce weird because its coming straight out of the normal, but how do I get the angle to be mirrored to the incoming trace? I'm fairly sure I need to use the dot product in some way but I'm to stupid to figure it out
hi guys,
anyone experience a blurry decal when its "not loaded fully"?
If I go closer, than the blur disappear, but the problem is that when i render its blurry.
Hi how can I destroy the previous spawn actor and replace with new one?
hey i came up with a way to save the players money and tried it for the health aswell but it does not work. any solutions?
someone can help me?
how can I achieve this with Widgets?
I tried with Z-Order, but the last widget is always above the first :/
Is it possible to make the world position offset for an object only visible on the client?
So on the “server” it stays the normal size
z order works only for direct children of a canvas panel
don't think UMG has a mechanism that will allow you to have widget 4 over widget 1 but below widget 3 either
do the widgets ever move? or is this a static thing
cause if it's static then you could just use an image instead of 4 widgets
or split the widgets in half and then set one half to be lower than the other
Which approach use to melee attacks? Anim notify doing a some type of trace or setup collision query?
I keep having issues with my function library.
One function just returns a static map of enums and Data Assets.
While the other takes an enum and returns the value from the map.
However, from time to time the second function always returns null and the only way to fix it is to clear the static map and remake it.
When I remake it I am using the same keys and values for it and it ends up looking identical to what it was previously except it is working again with no other changes required.
I don't know what is causing it but remaking the same map constantly isn't ideal.
I have blueprint where Directional Light rotates to make day/night, it works great but only on server, on client (without Global Ilumination) is night too bright. I tried setting intesivity but no luck in that
the directional light's rotation probably isn't replicated then
that's the weird part, it is. The sun goes down and raises after specified time, just that lighting is weird
nvm, i got it. Sky light component was the issue. I forgot it in the scene 💀
your Server Day/Night should be replicated to client not server
you've got it the wrong way around
ZOrder is not a gradient. It's a solid number so one would always be above the rest entirely. If these need to be clickable you can hack up a BP masking implementation but it'll be slow. C++ allows custom hit rects. But C++ won't help you at all for the visuals unless you actually change the widget's vertices and custom draw it which can be costly vs just doing something in a shader.
hey can i get help?
here i have a sphere us a actor
i want the sphere to move up
i check V on simuilate physics
and on event graph i add impulse
and its not working
i saw a video and that now working to me and i did the same and that work for him
How much impulse? It can take a lot sometimes.
Any tips for logging an error in BP?
I occasionally have situations where I have a "should never happen" branch because i know the component / animBP / etc is going to be assigned to a certain actor, and so the cast should always pass for example. So I'd like to log an error in the failed branch as it means I've probably made a programming error
PrintString or PrintText usually.
Doesn't do anything even at like 100000? If not I'd say your thing isn't simulating physics for some reason despite the checkbox. Some things can turn that off like attachment code.
Unsure how you mean? There might be ways to throw better errors but it isn't engine default and would require C++. Usually you just printstring with the class and function name in a PrintString node. Makes it BP searchable at least.
well i did now 100000
and that work
why ot works on 100000 and not on 1000
Not entirely familiar with the mass system, but I'd guess it's too high. Needs more force to move. Like the difference of kicking a football vs a boulder.