#blueprint
1 messages · Page 373 of 1
Hi, How do you setup a material parameters for a specific material when you have multiple material on a mesh ?
You get that material as a dynamic material instance from it's index and set the parameter on just that one.
You can use CreateDynamicMaterialInstance to get or create. If you do not specify a SourceMaterial that is all that function does.
Ok will try like that
Amazing,, empty level in standalone player, GetAccurateRealTime on tick takes 0.17ms in BP VM. Never noticed until finally had time to open profiler
A question, when I sapwn a projectile and run authority checks on them it always return as having authority even if I created them on owning client. How can I actually check if it was created on server or not?
IsServer
HasAuthority is based on the local NetRole of an Actor.
what's the equivalent in cpp?
Dont have any IsServer in c++
A replicated Actor that is spawned by the Server and replicated to one or more Clients will have ROLE_Authority on the Server and ROLE_SimulatedProxy on the Clients, with the exception of Client-controlled Actors (e.g. Pawn/Character), which have ROLE_AutonomousProxy locally.
Right now im jsut doing const bool bIsServerWorld = HasAuthority() && (GetNetMode() != NM_Client);
If you spawn an Actor, replicated or not, on the Client manually, then it's local NetRole will be ROLE_Authority, cause that Client has authority over that Actor (an Actor that also only exists on the Client and has no mirrored version on other connections).
You are in #blueprint :D
my bad
Check the NetMode of the World.
GetWorld()->GetNetMode()
NM_ListenServer NM_DedicatedServer and NM_Standalone fwiw.
Or, depending on how they are ordered, just check < NM_Client.
Worth the general note that IsServer does exist in C++ too.
Yea so I guess im doing it right hmm (I'm doing GetNetMode() != NM_Client)
I would give you the tip to properly cover "non-Client" as opposed to your specific Server-model, cause if you ever end up wanting to support Standalone or the other Server-model, you gonna have to fix a lot of crap.
Outside the Kismet Libraries?
Cause I would always avoid including those monsters.
Very very often they just do the exact thing one can do without them.
IsServer might just get the world from the context object and check the netmode.
Just with the added "benefit" of including half the engine and CoreMinimal alongside them :D
does anyone know the GAS system?? id like to ask a couple questions for guidance if possible
#gameplay-ability-system You'll probably have better luck in the dedicated channel for it.
thanks!
Hey, I have a quick question
If I have music for the environment, and I want to pause it when you get to the boss, would I do that in the level bp? If so, how would I make it stop when the boss' music starts playing?
I would suggest making a singleton manager for the music. Meaning an object where theres only one instance of it.
You can derive from an actor. That way you can place one in the world and set references on objects in the level (e.g the boss arena)
Example:
Begin Overlap with boss arena box-> get actor of class (music manager) -> play music.
The music manager can hold audio component. Use that to play / fade / replace music.
I am the problem
anyone know how to fix? I have a pcg grass preset graph, for leaves (then just flat static meshes i got from megascans, I also using a pcg preset grass for actualy grass too, but anyway..) and for some reason it doesnt put my shadow on the leaves, it just puts it on the landscape through the leaves.
I want to export render target and then import the created texture but I am not having much success in this. Any one know a good tutorial or how to do this?
yow what the hell 😭
It's fake.
I know an actual spaghetti pure chaos graph that is used in a published game. lol
Hello.
Why is my object cast to an incorrect type?
Context Sub Class is BP_GOAP_Blackboard. However, output of that node is BP_StateMachine_Blackboard.
This is how have defined the GetContext function in C++.
UFUNCTION(BlueprintCallable, meta = (DeterminesOutputType = "ContextSubClass"))
URpStateMachineBlackboardBase*GetContext(TSubclassOf<URpStateMachineBlackboardBase>ContextSubClass)
{
return StateMachineBlackboard;
}
What is going on?😟
Where do you create StateMachineBlackboard?
In the BeginPlay function of the C++ base class of the blueprint.
The blueprint call is also called in BP_BeginPlay after the C++ class has created the StateMachineBlackboard.
void URpGOAPComponent::BeginPlay()
{
StateMachineBlackboard = NewObject<URpStateMachineBlackboardBase>(GetTransientPackage(), StatemachineBBClass);
Super::BeginPlay();
}
What is your StatemachineBBClass set to?
Also why are you creating this with transient package as the outer instead of the component?
Oh my goodness. I am such an idiot.
Thanks for pointing that out.
What's the correct way to do it?
Just swap that for 'this'.
StateMachineBlackboard = NewObject<URpStateMachineBlackboardBase>(this, StatemachineBBClass);
You should only use the transient package when you don't have a valid thing to outer something to, or you want it to be managed by something not in a world. Since it's part of this component, it should be outered to it.
so it's just a subsytem that throws a UWidget and keep it alive X_X.
because that's what I write my self for my own loading screen solution b4 someone mention Lyra.
now replacing it might be a waste of time.
there's a hitch but quiet tiny on my end. I used Open Async level to load the world.
My entire world loads on a persistent level due to some pass inexperience of team members, the loading is so heavy and indeed some thread was crashing that appears to have stopped a long with some errors that couldn't really be explained
kudos for loading your levels a good way :
Happened way less on DX11 though
The Movie Player thing is a funny thing. Iirc it actually blocks and manually ticks the most important parts of the Engine. That doesn't include other threads.
Had to find out the hard way. Manually brought up a LoadingScreen with it, then kicked off an UpdateSession call which had to succeed before the game would travel and on the other end tear down the LoadingScreen.
UpdateSession with Steam runs on some AsyncTask thread and thus never progresses while the MoviePlayer blocks almost everything. Literally soft-locked the game with that.
How does one get the loading bar progress value for loading screen?
for both hard travel and server travel
There is no such thing as a progress value.
Some games fake it with bar that fills over time and then suddenly jumps to 100% if it took less time, or sits at 99% if it takes longer.
There's a loading screen in the market place that have a progress bar.
Not sure if they fake it
I will take a look at the source code later
You can probably get some numbers from the Asset Loader.
And base the progress on the Assets being loaded or not. But I don't think there is a progress for the travel itself.
There is also a lot of stuff going on, potentially even in your own game, that can causes additional "loading" of stuff.
In our game, we know that the game needs to load and spawn tiles and structures and how many of them. So we can show a progress bar for that.
But that's obviously our own numbers and that differs per game.
A LOT of games don't care about the bar anymore and just show a throbber to indicate that the game isn't stuck and the user has to wait.
Gotcha. So I guess its about structure and managing assets.
When I did some procedural generation stuff, I hooked into the different stages I setup for initial loading. Things like Loading Terrain Data, Generating Terrain, Spawning Terrain, Loading Terrain Fluff, Spawning Terrain Fluff etc...
They usually took different times to complete but gave me an idea where it's at.
@surreal peak hopefully this doesn't come as a random ping since we have discussion earlier.
I take a look at the plugin in the market place, they use
float FAsyncLoadingThread::GetAsyncLoadPercentage(const FName& PackageName)
to get the percentage. I guess it's good enough to check the value for the world being loaded?
Uh, I have some weird Static Mesh COmponent behavior.
I dragged a Mesh straight from the content browser into the blueprint hierarchy. I changed the collision to match what I wanted. But it somehow kept the old collisions.
After some work and testing it turned out it seems like it refuses to change the collision setting? But only on the SMC that was dragged from the browset. The SMC added with the +Add button works correctly. Even though everything is the same...?
On the screenshot I have set the details panel to display only modified variables but I checked with a full view myself and didn't see any differences. Restarting the engine didn't change anything.
Why???
Now I deleted them both and readded them and suddenly it works on both?
My mind is blow what the heck happened there.
I can't replicate it again lol. Only this one component somehow got corrupted and wouldn't have correct collisions for some reason.
Thanks for wasting my hour unreal.
But only on the SMC that was dragged from the browset.
Unless you made a custom StaticMeshComponent, you probably dragged a StaticMesh Asset which automatically added a StaticMeshComponent to the Actor and assigned the dragged Asset.
Yes, that is what I wanted.
But the collisions couldn't be altered in the SMC
I replaced it now, deleting previous SMCs and it works, even though I did everything in the same way
Just very weird, It's never happened to me with a basic component like this
In situations like this, i find that its the instance of the actor already in the level that doesn't update to reflect the default values in the actor. You normally just need to double check the values and reset back to default.
Hmmm, maybe, but everything else was updating properly
But yeah, I should've made sure to replace the actor in level too, maybe it would've fixed it right away
😄 And the best part is that fixing it usually involves fixing 90% of the rest of the game's initialization code cause it has a specific order expected held together by glue and luck and no good strict system.
Hello guys how can i connect scene component to bone of skeletal mesh with constraint?
I have been seeing some reports from about 3 years ago, that large data tables with custom structs can brick a project. Has anyone here experienced this or know that it occurs? If so is it still an issue or has it been fixed, and should you then always use DataAssets instead?
I've not heard anything specifically for data tables and custom structs but custom structures can cause issues if you try to modify it when its being heavily used.
Just declare the struct in c++ and your good
That is really easy and works perfectly fine even in a bp only project
You can also use uobjects instead of structs if you dont plan on having 1k+ of them
Anybody have a setup for making a widget sit exactly on the mouse cursor's XY position?
(not talking about switching the mouse cursor)
My current setup seems to not work properly in the viewport :/
Does this only work in fullscreen/final game?
Does it work if you uncheck the DPI scaling thing?
oh wow, thanks, last time I unchecked it, it didn't work also 😅
I wasn't sure if that would work, but it makes sense.
I have a collider that allows player entry to lift, which works great, but as that is ticked on, a pair of doors is slide open but it’s only supposed to open when player walks on collider inside lift, what might be causing premature aactivation of doors?
5.6
hey, im having an issue w setting location of my player, but only if the player is running rn, if they hold shift they can run, but if they hit a trigger in level its meant to warp them to another location, and it does, but if the player is running at it when they warp to the new location their speed continues even without input being pressed and the only wat to undo it is to press the movement input for the direction u were holding when running, ive tried to use disable and enable input setting velocity to 0, consume movement input, setting my running bool to false, but nothing works, the only node im using to stop the player is this, and then the warp calls another fucntion after warping on the player, how could i fix that?
Sounds like you're looking for flush input keys. I can't recall if that is bp exposed.
im not pressing any inputs just moving the mouse but its still moving me forward
FlushPlayerInput looks like a static you can call
Do you have code for this you can show?
ty seems to worked
what would be causing loading into a level ( like a bp using open level by name) to spawn the player outside the level away from the player start but playing in editor w the level open plays just fine
its only this one level giving issues, loading other levels by name works just fine w spawning at player start but this one spawns me outside of the map, player start exists and isnt colliding w mesh or anyhting
I'm cooking up some truly terrible blueprint work right now. Is there any way to combine the functions of the "In Range" and "Switch on Int" nodes so I can just plug one Integer into one node and have it fire like 3-4 execution pins based on multiple, custom ranges?
I don't think there's anything like that. I'm not sure there's much wrong with what you're doing. But would need more of a concept understanding to say.
You can just cascade > checks
no need for the in ranges
but what is this doing anyway?
seems sus
It's just tied to a very repeatable action. So every time the player does it, it increments the integer by 1. And then I want it to do something different for if that integer value is in different ranges, i.e 2-11, 12-21, 22-31, 32+.
Where do those ranges come from?
Is there math to get from count to action?
The ranges I just arbitrarily hard set. No real math should change the ranges themselves on the player's side.
To be fair if you could math it down, you could use a Switch case.
Count/10 for instance. 0-9 is zero. 10-19 is 1, 20-29 is 2
yeah (count - 2) / 10 or something of the sort will do it here, all depends on where these ranges are coming from
Hmm. I'll definitely keep that in mind.
So it looks like my play montage - on completed fires when the End section of my animation starts. not when the section is actually done. How do I set it up so it plays the rest of the animation and than fires the on completed execute?
You could use a float curve.
yeah curve might be the play here
although if it's fundamentally an integer at the base it might be a bit wonky
/authaer
when player rolls over that, its suposed to remove collision to gain access to lift wihich it does, but its also making the lift doors seen in red, quickly dissappear, go somewhere ODD I know.
also of note, in ediitor when I click highlighted box collider, it highlights everything in lift, is this the issue ???
also does it if I just click on lift.
lift BP
for whomever is left, its definitely the order of components in BP
click on the arrow in the components tab, and in its rotation section, should be a little dropdown to the right/ left, and it should have the option of relative, or world
make it world, so that only world rotation effects it, so relative model/ pawn rotation doesn't mess with it.
Thanks mate
will do that, thanks. Just to be sure, declaring them in c++ and having them be USTRUCT(BlueprintType) is fine?
It is.
perfect, thanks
Also exposing properties (EditAnywhere, BlueprintReadWrite.. etc)
Never ever ever use EditAnywhere on component pointer, otherwise you will break things including your bp.
hi, does anyone know how to change the cable model in cable component with a custom model?
I'm having trouble getting my Widget to show up on the screen. I have a simple HUD with an image in the center, but when I press Play, nothing appears.
Here is what I've done:
1․Created a Widget Blueprint (WB_HUD).
2․Added Create Widget and Add to Viewport in my BP_FirstPersonCharacter.
3․The logic is connected after the Enhanced Input Local Player Subsystem setup.
The execution line seems to reach the nodes, but the screen stays empty. I've checked the Anchors and Visibility, but still no luck.
Show code and your widget hierarchy
I assume you already checked with prints if the code is 100% reached there?
And that this character is the same one that is used in gameplay?
Do you actually call the custom event on BeginPlay?
You don't want to call this on beginplay. It'll fail in some cases. Character's Beginplay will run before possession outside of PIE
Can I somehow get rid of this warning?
"LogNetPackageMap: Warning: FNetGUIDCache::SupportsObject: StaticMeshComponent /Game/_TavernGame/Maps/UEDPIE_0_WIPLevel.WIPLevel:PersistentLevel.BP_MerchantStall_C_5.StaticMeshComponent_6 NOT Supported."
I think it happens because I attach a locally created static mesh to a replicated actor, but it is something I want to do for now
You should be able to attach locally created meshes just fine. That doesn't look like an attachment issue though.
hm
Looks like it might come from replication.
Maybe it is some chaining issue then? I have a MerchantCrate, it is a StaticMesh child. It is replicated and added to a merchant stall.
Then this MerchantCrate adds another standard StaticMesh with a price (Add Component to GetOnwer), this one is not replicated. It is spawned separately for listen-server and clients, I have checks to not duplicate anything
Hm, no, seems to be caused by attachment, but dunno why since it is attached locally separately
From what I can gather. This log comes from a function that runs when the server is trying to ask if an object is supported for networking. But shouldn't run if the object hasn't been marked replicated, or explicitly added to the replicated subobjects list.
Can you run with a C++ debugger attached by chance?
Good idea, I'll see. I haven't fully figured out rider yet though, so not sure
Just do a Ctrl+T and search for FNetGUIDCache::SupportsObject. Look for this.
Doesn't that only apply to replicated components though? His mesh that is throwing the error isn't replicated.
nope
unless he ticked Replicated
on the static mesh component itself
(which will never work)
Honestly I personally have no idea. Every time I need to use attachments in multiplayer I have problems. I could use some serious course about attachments and multiplayer ._.
I dunno. I'd breakpoint that function above for the log at the bottom of it. See where your callstack is saying the call came from and why.
its cause i assume this is listen server
and listen server is attaching it, which then it goes through replicated attachment on the actor
and that would only happen
if the actor is replicating movement
DOREPCUSTOMCONDITION_ACTIVE_FAST(AActor, AttachmentReplication, IsReplicatingMovement());
unticking Replicate Movement on the actor will stop it repping the attachment
@crimson briar
make sure no components have the component replicates ticked
in your bp/c++
like staticmeshcomp etc
Is the warning happening because a not-replicated SM is attached to a replicated SM?
What do you mean, they do. I mean, SM Components
well they kinda do but its not a normal thing to do. most people keep them all local to avoid issues
including ism's
but yeah possibly thats the issue
but never ran into it, cause we dont replicate SM Components, etc
Yeah, I was trying to be fancy with the solution here and it backfired as always
Thanks for the help, I'll mess around with it to see how else can I set it up
I know the other project we were on had some of those. But that was the other way around. Replicated meshes being attached to non replicated ones.
Yeah, after I enabled replication on the Plaque mesh, then I got the same warning on the text renderer mesh that was attached to the plaque.
I think I need to scrap this whole thing, I don't need so many things to be replicated, that was the point of making it like this. But since it seems to be an incorrect approach, I guess time to remake it
What was the original intention?
@worthy frost if you have a second more though, how would you recommend approaching something like this?
I wanted to make crates that are on a BP_MerchantStall, with some functionallity inside the crates. So I made the crates a child of static mesh and they hold a few simple variables (like a name and a price) and a dispatcher for when they were interacted with. And MerchantStall oin server spawns them replicated.
I though it would be a flexible solution, I could add crates easly and move them inside the stall.
But then I wanted to add an ISM attached to the crate with the items inside of it and a plaque with the price that didn't need to be replicated aaand a warning happened... And even though everything kinda worked the warning was troubling.
Now that I had to describe it it sounds like a major case of overengineering 😅
If you want the simple version. The crates can be their own actors that manage their own meshes(both the crate itself and it's contents) and just notify their owning stall when they're interacted with. And the stall can manage them.
If you have a ton of these buildings, and don't want to make the crates actors it's a little more complicated managing the meshes internally in the stall, but you could do it through some mapped data management.
So you're either replicating an actor with some data, or replicating data that the stall can create meshes from that aren't replicated but are index addressable for your interaction maybe.
Yeah, I'll probably see how much of a pain it would be to manage the meshes from the stall itself. I would like to avoid using actors for them since they only have 1 interaction and only teleport between 2 places (stall and a buy stack) that have predetermined locations.
I am looking for advice on an indicator for a minimap. The user is able to zoom in and out and when max zoomed in, the camera tilts to a horizontal view. The indicator for the minimap would be a trapezoid except for when zoomed in. I could swap out the indicator for the zoomed in max, but how can a create a procedural trapezoid widget?
hi question regarding
when i order another ai moveto, the unit stops and thjen walks to next target, is there a way to not making him "stop" current movement and just like change the destination
If you can breakpoint in C++, I'd advise checking if StopMovementImmediately is called when this is ran. And if so, from where. There may be overrides in the AIController or Pawn.
What controls the tilt?
Guys who can halp me with Blueprients? I need somebody who really knows everything about it, because all day i trying find answer for my question. but i cant
I made an Item system using a Master Blueprint with child classes. Some items can be picked up only once, inspected, added to the 'inventory', and disappear from the scene. The second type of items is just for inspection. They can be picked up, inspected, and put back in place.
PROBLEM: After I interact with an item and put it back, the next time I try to pick it up, it doesn't attach to the camera, but attaches to the location of the first interaction.
This sounds like you've detached it from it's original root and didn't put that back at detatch.
I show you
Can you show your pickup/drop code and the item hierarchies?
Kind of looks like some sort of state is set and not updated at the next pick up. Would need to see the inspect/pickup code.
I believe your issue might be that you're detaching InspectLocation.
Here. You want to detach the ItemToInspect, not the InspectComponent.
@buoyant walrus
You may also want to switch to saving and using world space instead of local space locations.
Ohhhhh i changed it, and now it looks so
With world location this iteam also go flying
In stratosphere
It is in the player controller. When the user uses the mouse wheel, it scrolls in and out, it uses a curve based on the zoom level to adjust the camera tilt.
hmm, why dose my Struct get reset each timer i open the proejct ?
(i do not change anything in it and save)
i have it on a actor component then the component is on my character :/
And your trapezoids. Does it matter if they're visual only?
Just something that will be used in a widget and placed above the minimap and moved via code.
Right. But I'm asking if it matters if they can be clicked or anything.
I'm also wondering if these are more than just an icon? If they're just an icon you can do this in the most amazingly performant way very simply.
is there something to check if a character is inside the collision that isnt begin/end overlap?
i would use this but if i have multiple bugs inside, and one leaves, that would break the logic and set it to false in theory
GetOverlappingActors
YOu could use a set. Add to set when bug enters, remove when it leaves. Also good in case you want to be able to keep track of what is inside
It is just an icon. I am looking forward to seeing your solution.
You can do a material for it. Set the icon as a texture parameter. Then that same material can use a MaterialParameterCollection to get the zoom level which you can use to drive some UV morphs. Should be some pretty trivial 2D math.
Then when you zoom you just update this MPC value.
You send a single value to the renderthread and your icons magically just work. No need to tick them or iterate them all every zoom change.
client side or not makes no difference what so ever
Running overlap every 1 second is indeed counter performant and unnecessary.
Have an array of actor. In begin play, add all the current overlapped actors.
From there, just have BeginOverlap -> AddActor to the array
And EndOverlap->Remove actor from the array
Thanks for the elegant solution.
anyone know how to fix? I have a pcg grass preset graph, for leaves (then just flat static meshes i got from megascans, I also using a pcg preset grass for actualy grass too, but anyway..) and for some reason it doesnt put my shadow on the leaves, it just puts it on the landscape through the leaves.
I am using Soft Object pointers to establish connections within a level. Is it possible to restrict the options to actors that implement a particular Interface?
Alternatively, is there a way to use Soft Object pointers for an instantiated Component instead of an entire actor?
how do you exactly "establish connection within a level" with a soft ptr to a level?
soft ptr is like a path. until you load it.
- Create an actor with a public variable of type Actor Soft Object.
- Spawn the actor in the world at edit time.
- At edit time, open the object's Details and set the variable to any other object that's currently loaded.
It's amazing.
This is why it works. Cause anything is resolvable by path. If you have an object's pathname you can look it up because that is a path of it's outers and itself.
Your pathname starts at the package. Normally this resolves to a data asset, or table, or mesh. From the content browser. Cause these are in their own packages. And you're telling it to search that package.
Levels are contained in packages as well. And you can have multiple levels in said level. So you get the packname like Package.PersistentWorld.Sublevel3.SomeActorThing
Not fully sure what you mean by with an instantiated component here though?
What is the cheapest shape trace there is? I’m guessing sphere? And is it cheaper to just doing 4 line traces to create a bounding box instead if the object you want to check against is always larger than the spheres radius?
So it's possible to have some information about actors that exist in that map without loading the map? that's cool, never know that.
profiling is probably the answer here but if you are not tracing soo much in a single frame, you probably shouldn't care.
Soft Object pointers have to be Actor to be settable within a map at edit time. But there are cases where I'd prefer to identify only actors with a particular Component on them. But if I make the variable of type MeshComponent Soft Object, the list does not auto-populate.
Yep. Fun fact you can do this with savegame stuff too. Keep all savegame info in a single savegame that has information about every level you can go to. Then when you load the data you just filter it for anything existing within the current level. No need to manage special complex systems for managing each level's data.
Shape traces are pretty cheap so just use them if you want.
If you want better performance, worry more about caching or re-using the trace data instead of which trace is cheapest.
Will be a lot. Considering if I should use a sphere trace, 4 line traces or just a single line trace to check bullet collision. There will be 10s to 10s of bullets at a time. I’m already considering batching them across frames but in general making the underlying logic as fast as possible is important.
sounds peanut to me
maybe you should just go with any trace you like and stress test it.
In my case, the use is more practical: I have a pressure plate that a player can stand on, and a door that can open. I create a new blueprint that says when [Soft Object]Switch is stepped on, Open [Soft Object]Door. Then I can specify which switch and which door within the instanced actor, without needing to edit Level Blueprint..
You mean 100s of bullets? Like a bullet hell?
It’s on a decently sized (3d) map with multiple players. If each of them shoot into the open for a few seconds there will be hundreds of bullets. (It’s vehicular combat so multiple weapons can fire at once). So I’m trying to make a more lean variant of the projectile movement component essentially.
Just do spheretraces then. That's cheapest for 3D
Wait, how fast are these bullets moving?
Different speeds but usually not super slow. Like multiple hundred to thousand units per second.
Perfect, will go with that then, thanks!!
Mathematically sphere trace looks to be cheaper than 4 traces. Line trace is a start and an end. Sphere trace is a center and a radius.
But It depends how the engine itself implements and optimizes them so not sure if you will get a solid answer without testing your case
I'm uncertain how feasible that is. Kind of a context mindbender. This feels like something I'd initially just make a new actor base class for.
But if you want to go nuts. I think you're looking for IPropertyTypeCustomization for filtering actors that have a specific component. There is the AllowedClasses and MustImplement metas. But those won't help for filtering by owned components.
I’ll do some profiling today. Thanks for the advice!
IPropertyTypeCustomization is probably what I need, yes. I'm used to relying on components very heavily and avoid adding variables and functions to the actor if I can help it.
How long-range are the encounters? How many seconds do you expect a single bullet to last? If it's very short there are techniques you can use to make it extra performant.
For the slower bullets they could be in flight for 5-10 seconds worst case scenario. Current plan is to have a bullet manager that manages an array of structs containing just
- Position
- Direction
- Speed
And updating each existing bullet by tracing over the distance it should have traveled in the delta time since its last update. If there are many bullets the bullet manager should batch them to update over offset frames.
The visuals I then fake with a Niagara particle system
You're probably better served using a Projectile Motion component. Much easier to manage.
As far as I can tell that just does the same thing but individually per bullet and with more overhead no?
Try it out and then profile before writing your own system.
hi guys i need some help
im moving all my units in an array to a location
but i want them to end in a formation like a line/ stacked formation etc,
if i just add values to the cached desination for the array index
EQS
Or math
Does this actually work? I'd expect this to break given it's an async node being called multiple times
Yeah, depends on the required complexity
You need to add context such as what's blocking, what position can be filled, which path can be taken.
math will be part of the EQS.
but doing AI movement without EQS = no way it give decent result in my experience.
something blocking == things break already.
It will work, but he can't reliably use the output pins there I think
It still bugs me. This feels like an encapsulation breach. I'd really expect a function on the units to be called that can check their death status and do their movement stuff.
EQS?
Environmental Query System
ah okey
but my isssue now is just math really,
https://gyazo.com/25ebad6b6ab64bea5538892e16a213cd
since im adding to the locations value i need to acount for the unit rotation towards that location
(for loopling the function for each character)
any advice on how to take the units rotation into account ?
you haven't try to move where the boxes are
or walls
I guess you could rotate the final relative vector by a look at rotation towards the click point? Just a thought though, I haven't done this specifically
not really, just use EQS it already query all the pathable point. Then you just make some rules where the unit should be positioned best. E.g in line with the leading character.
hm havent done EQS before 🐣
wel lyeah
but once you done it, you can see how it solve your problem.
But if you intend to use it in non-empty enviroment anyway, I think looking into what ColdSummer suggests is a better idea
well this will be flat tho dose that matter then =?
No walls? Nothing blocking? Ever?
oh i tought u mean heights *
aye gotcha
Well if it was a space invaders type of thing I wouldn't bother with EQS for example.
Simple move to is fine for prototype
With real dynamic environment, you can't get far without EQS imo
It's not like you throw away your math.
You will need that to rule out which point is best for the A.I to go to.
My use case was diamond formation. With main character at the front, 2 wingman npc and a support at the rear.
Kinda pleased with the result.
aye i se your point
but for prototyping i will test this first, if i get to tthat point i will look into EQS
ive written it down as usual 
But now for my math problem, how would i includ the Rotation to the foramtions location :/ ?
the rotation recieved is for the "command giver" so its a set rotation, i need to use it to calculate the angle i guess and add to the x or y value only
or wait, is it just as simple as adding the rotations value -.- hmm
don't you just need them to be in the rear of each other?
yea totally should use EQS, but where do you struggle.
the first one is just a line, if it start from player, unit 1 , unit 2.
then unit 1 position is player right vector, multiply by X unit.
unit 2 position is player right vector, multiply by Y unit.
don't know why I did this on my end, I could just get the right vector.
array index 0 will give you the same position as the commanding actor
because 0 * 100 is 0
yeah but first actor will be where u click so that fine
that looks correct to me, more or less
the move to command probably stop at some point when it's close enough.
there's like tolerance
what looks wrong in the video? the orientation of each units?
oh wait
well they should always end up at the moving units "side*
It's Commanding Actor Location + ( Commanding Actor Right vector * ( array index * unit))
get actor location here
You need to calculate right vector from the direction between the initial character and click point, at the click point
this is sooooooo much easier if you just bite EQS.
im gettting the commanding actors location when im clicking, so when he end up at the location, hes right vector is another direction from start
I don't remember how to do that though lol
the units will just force them self to be at the rear or inline with the character.
it will keep performing calculation, so they are going to eventually be at the rear of the player or in line. Where ever you set the goal to be.
excatly
You just need to transform the location from a transform made from the rotation from the commanding unit to the click location and the click location.
Use said transform to transform the local space formation offsets into world space.
yeah but.. but zD
you can't even tell where the player going to orient them self when it reaches it goal.
so if you just perform the calculation frequently, that would be a solution imo.
Yeah, they might end up not facing the same direction, but the location will sort of work
The facing direction is the look at rotation.
hmm this seems resonable
Unless you added some more code like saving the initial predicted rotation and setting it when the character completes the movement
But at this point.. maybe EQS
Authaer always has a solution tho for us n00bs
Yeah but you use it to calculate the location. Characters may bump into each other and reach the location from different sides. So after the movement ends facing will not match, AI MoveTo doesn't have an option to force facing automatically
Yeah, but that's an AI issue. He needs a real BT or ST solution to do that correctly.
Alternatively, you could put a focus point directly in front of where they're moving to.
the end rotation is the find look at rotation, that would work if i includ it somehow right, but how would i add it
You can't without doing focus points. Which will make them look at that point while they're moving too. If you only want them to rotate that direction, but rotate normally while moving to the point you need a BT solution to do it easily. Sequence a MoveTo then Rotate
the rotation part is no issue, i just want the formation to end correctly
For your formations. It should be fairly easy with this given your current inputs.
well as u said it work, however the AI is the problem but as aspected
the only "problem" for this prototype is when changing direction the unit arrays wants to switch places
you have any ideas for that ?
Figure the point locations into a world space array of vectors, and find the closest point for each unit. Making sure to remove said point from the array before finding it for the next unit.
May need to figure the command unit specially to go to a specific one. This only works for more generic unit formations like this though. Where it doesn't matter if Steve or George are on the left or right of the commanding unit.
In like RPG style games where you need the formation to be special, specific unit on the left, specific unit behind. You'd keep the original and make sure those units indexes are stable.
hmm yeahm, i do however have a ghetto solution i think
Hey, how do i recreate this variable? Got a new pack and its requires a Class Reference as a key. How do you even select a generic class Reference.
When selecting a type of variable, if it is an uobject you have a dropdown to choose an object, class or soft pointer
That wasn't one of the options.
Fine! 🙂
yeah but that doenst work
What's the source you're trying to connect?
Hm, I'm not familiar with there being a "Class" type available in BPs
Have you tried connecting the pin that isn't written in red?
thats why im confused
You can drag from the pin with this type and try to promote to a variable but dunno
Instead of adding the find and add nodes beforehand, drag off the pin of your world screen map and add the nodes using the menu that appears then.
(and don't use the red-labelled pin)
https://gyazo.com/08bc642198224a9329d859d8234112ca
Tbh quite proude of the ghetto solution
those are not compatible
this is weird because this pack uses no C++
They should be compatible. :/
I would assume they have C++ parents
Are all the objects in that map menu classes?
Lol
maybe that was a thing in the past
Might have been a soft object class, not a regualr one.
That's probably better to use.
also tried wasnt
also here
Feels like a module load order issue maybe?
I've never personally had it, but people have that a lot with CommonUI.
Unless you selected that, that usually happens when the original type isn't available (anymore).
Since the variable is called ActivatableWidget, I assume these are CommonUI widgets.
If the Plugin is enabled, then it's potentially a load order issue, as Authaer suggests.
hi, we are using raytracing and the shadow is so strong that when looking from a bit far, it feels very dark. How can the shadow strength be reduced?
We are using archviz explorer with UDS plugin, 5.5 version, thanks for answers
Note: Shadows are too dark that space between towers is very dark at certain directions of sun. We are trying to maintain ideal lighting even if sunlight comes or not - something like skylight
but if i try to increase intensity of skylight in UDS, buildings become white
Managed to make it work by switching to adding every mesh clientside as you guys suggested. And keeping two arrays on repnotify. One containing crate simple data required for displaying them and one containing IDs of crates that were moved to the second zone.
I think yeah, it turned out better this way. I had some more code to write to manage the arrays but looks like it is a better approach than replicating the crates themselves. Thanks for the tips.
The custom mesh component itself still spawns everything it needs by its own (changes mesh, adds ism, plaque mesh, text renderer), so the only thing that the stall keeps track of is this custom crate mesh component.
can someone tell me what Im doing wrong?
I'm trying to expose a variable to rotate the wheels of my car
the wheels are driven by a rig with an arrow that moves left and right
You're only setting the rotation, is that intentional?
I don't really have much clue what I'm doing haha
I only want to be able to rotate the wheels left and right
in a place
not driving
Where are you expecting it to change? In a new game in PIE or in the little window in the animation blueprint?
the goal is to create a widget with a slider or parameter where in game I can change it and it will make the wheels rotate
but so far I'm just trying to do it in the editor
with an exposed variable
I have the wheel steering variable in the details pannel
but it's not working
Does it work in your animation blueprint if you change it there on the transform inside of that?
yes if I change this value here
Okay. Good. Then in your Beginplay thing
If you put that float to 100. You get the same thing if you play in PIE, right?
Or simulate, either way works I think.
if I put 100 here and play it, it rotates the wheels completely, but once I touch the exposed variable, they go back to original posotion at 0
and my car is glitching
Try moving your code here to the Construction Script.
That'll force it to run every time you edit a details panel.
If you want to do this from like an editor utility widget, you'd need to call it the same way as you're doing here. It won't work just to change the float that way.
it's not letting me connect the same way
also I wanna make it work with the variable first and then will try to move that to a widget
That isn't the same node. Drag off of the mesh and do GetAnimInstance. It'll find the right one.
Hey, so I was thinking of doing an "armor/equipment" system, and that would involve swapping skeletal meshes. However I think I'd need some kind of base "skeleton" for the animations to copy the pose from?
You could have copy pasted what you have in beginplay there.
that's what I did and it's not letting me connect it in the construction script
O.o Sec
Hmm. Yeah, okay that wouldn't make sense to be fair.
Walking that back. You'd need to poll the property from your AnimBP's update event.
Or the car actor's tick, either way.
By the way, it looks like the rotation is working from the graph, but the car is glitching and the wheels glitch between the original posotion and the rotated position while im changing the value
You mean like equipping new leggings and having the mesh change and still animate?
yeah
Yeah. You're basically looking for the leader pose stuff. I think Epic refers to them as Modular Characters usually for their docs.
Was looking into that, but I guess the "leader" component would need to hold all the animations
Hmm. They have a whole write up on it here. Bit out of date. They've since renamed them LeaderPose instead of MasterPose. But yeah this is more or less the tech you're after. I'm pretty sure there's at least a tutorial or four floating around somewhere for it.
I have a vague memory that there's a sample of this somewhere.
Are you a bot?
Was looking at this one
Seems like with leader pose I can't have anim dynamics per mesh
which is kind of annoying for frilly stuff
Isn't Mutable another option?
Mutable?
i have these doors that run a function on a timeline to open, i have a normal and a reverse to handle player opening doors on both sides, the close rotation is working ok for normal doors but the reverse version seems like it uses the normal close rotation, so it makes the doors rotate the wrong way, how could i fix this,
Yeah. Just Google Unreal Engine Mutable
sorry for the phone recording 😄 So I'm rotating my wheel using a variable and I'm getting that glitching
does anyone know why?
That is mainly because you're altering the value in the editor and not during play. The value only updates when you stop moving the slider.
Finterp node requires you to be in runtime, eg after you push the play icon.
the video above is happening in play time
Same thing applies. It's not updating the wheel until you release the mouse. Generally you don't use the details panel during runtime. You need to apply an input to get the steering to work correctly.
Also this depends on what you're after. Are you doing this for a cinematic or game?
the main goal is to put this into a widget with a slider/value where I can use in game to rotate the wheels
I just wanted to make it work first in the editor just to make sure itworks
Then your best bet is to assign an input to it so you can test at runtime rather then using the details panel. Then you can replace that input with your widget slider variable after testing.
the rotation actually got fixed, one guy told me a node that I had to change
but there is still some glitch effect going on
Hello, I'm trying to make a decent drifting blueprint on Unreal 5, is this the right place to ask for help?
Most likely. What do you mean by drifting blueprint?
is there real homing missile tutorial that not actually using a dropper.there is 5 different target BP and homing missile only target 1
i am looking for missile hunt the tag on different acto BP
tutorial

What do you mean by hunt the tag? Like look for actors with a specific tag in their Tags array?
i looking for missile homing to tagged target
so i use get actor with tag i guess ?
do all homing projectile use scene component ?
yes
current youtube tutorial need dropper inside the scene at near end of tutorial
i want to make my missiles capable to aim hit at least 5 BP
actor
so i guess use all actor with tag ?
then for each loop ?
It's an okay way to start, sure. Probably get them all and then filter for the closest one.
I'm not being able to make a car properly drift!
Why? Your problem should be with selecting a target not making the missile move?
Hey everyone!
I'm a little lost on how to have something last for exactly x duration, heres my blueprint. https://blueprintue.com/blueprint/zhbtkasw/
Expected Behavior: Duration is 7 seconds so the light should be at 0 intensity at 7 seconds.
Current Behavior: Duration is 7 seconds but light stops at 5 seconds. As I increase the duration the time is off gets larger
I changed the variable type "Player Pawn" from one class to another and now the blueprint is screaming in a million places (obviously), but the variables between the two classes are identical
Please tell me there's a better way to do this, I don't want to redrag and get every variable again
No, dragging and linking to Target doesn't work
Normally breakpoints and stepping through the logic would be ideal, but for something happening every frame that doesn't work as well.
Add some PrintString statements that show what the values are over time and see what the values actually are.
It's possible that a simple lerp is causing the light to just be too dim to perceive for those last two seconds and that it's not actually off.
Because Target will be Type1 and if PlayerPawn is now Type2, it not compatible with that input.
The only way it would work is if PlayerPawn was changed to be a type derived from Type1. But changing to a completely unrelated type requires new variable getters. Ones that have the right type as the input pin.
Awesome thank you will check it out 🙂
Yeah you were right, its not the exact duration but its close enough for me. As the light approached 0 lumens for longer durations, it would no longer be visible but still calculating and reach close to the desired time. Thank you!
You could look into float curve assets (I think that's what they're called) that would allow you to define a more interesting curve that an straight line from 1 -> 0. Something that produces the results over the duration that looks better.
I'll take a look into it! Yeah I originally wanted it to be lit for the majority of the duration and the last 2-3 seconds it dramatically drops off in brightness
Isn't downcasting possible in bp?
I am casting to the c++ parent class of the pawn (that is currently a blueprint) and it fails?
Generally “down” to is considered to be towards children. You shouldn’t ever have to cast to the parent (up). That should always be allowed implicitly.
If the cast is failing the input would have to be “none”.
It was an owner issue in the end, nvm
How do I go about making my BP randomize between more than two colors?
do multiple selects and then random int in range
Have an array of predefined colors, make a function to randomly select between an index of that array and you have a random color. I'm sure you can do a range of colors too
Arrays have a random get by default btw
That defeats the purpose of my function lol. Thank you for that! At least the broilerplate came in handy for doing the same thing with a map
How do you guys recommend doing hit reactions? Bind animation to a GA and give ability & try activate once? Or you recommend some other way? Maybe a pose in AnimBP which triggers when we flip a variable?
Is there anyway to sort a map by its values (i.e. floats) in blueprints?
Theoretically maybe, but you shouldn't rely on map order. By design Maps are unsorted and you can't rely on the order of elements inside of them.
If you want a reliable ordering, use an Array
I’m trying to sort an array of actors by their ‘score’ value which I’m setting inside each actor; This ‘score’ value changes dynamically so the array order needs to change dynamically
What’s the best way to go about it, I’ve figure out how to sort the score values but it’s just finding which actor correlates with each score value as I’ve had to make them independent from each other
You can get the values of the map (it makes a copy array if i recall) and then sort it.
But he will lose association this way
Yeah it's not permanent. If the sorting by score is a one time thing then it's fine, or making it a function and caching the result
Hello guys
I guess I would keep the data as a Place -> Actor ref map. Or just an array of actor refs.
Then on a value change, put all actors in an array, sort them with a manual code and put them back into the map.
I don't think there is a one-node solution to something like this in blueprints
Does anyone know why this is happening?
my logic is pretty simple
I'm using a variable to move my control rig controller and rotate the wheels
but the car is glitching
nothing plugged into delta time and i don’t know if finterpto is being updated on each frame when it’s just off of initialized anim
Is it glitching when you play with it or only when you change the details. These are two separate scenarios, it can be caused by messing with details and be fine when playing normally.
hmm pluging event tick into delta time actually fixed the issue like 95%, right now there is no that glitch effect, but it makes my car move a few inches up and then down when using the variable
it's happening during play time
Then show a video of you driving it
it's not a drivable car, it's a static car that you can rotate the wheels in the game
what you see in the video above is in play time
...so why do you even use finterp?
to make the wheels rotate smoother? Idk i'm just trying out things
Also the glitch can still be cause by the editor, try using a built in event, like rotating the wheels on a timer to see the effect
You are using current and interping to 360... but the delta time is 0, which means you will always use current.... and I'm pretty sure initialize runs once. So the interp makes no sense three times over
I plugged event tidk delta seconds intoFinterp delta time
it kinda fixed it the first play and then it's glitching again
I'm not very sure what to do, I'm not really a BP guy
I would recommend first trying to do a rotation on tick or on a small timer, to rotate the wheels a set amount every X time. Or use finterp with the tick. Then you will see if it is still causing glitching
If not, it means it is the editor layer causing it. And depending on what is the car for - you either leave it as is, or you make an ingame widget to rotate the wheels, so the editor layer doesn't interfere
this is actually the goal, to make a widget where the player can rotate the wheels with a slider/variable
and it still glitches with event tick
You could also use a Timeline and retrigger it every time it completes. A bit obfuscated but you can adjust the smoothing as you prefer.
If it glitches like this on tick, there could be many diffenet culprits and I'm not too well versed in them. It could be either animation problem - a bad way of changing the wheels causing a recalculation of some sort. Or it could be a material problem - a similar glitch happens with materials using erm... I forgot the name of it, aligning to world or something. Or even a post process changing some stuff around. But I dunno, I'm a systems guy.
it has to do with the blueprint / rig / animation
I just created a widget, but it doesn't seem to work with the widget too hmm
If the car is static, why not convert the car and wheels to static meshes and create a simple actor Blueprint and add them all to that? So long as your wheels/brake pads have a central pivot you can just use a rotate on the Z with Finterp on the 2 front wheel components and remove a lot of wasted blueprint code and time.
I also noticed that your trying to set the wheel location not rotation. Is there any reason for this? As normally to turn the wheel you would rotate the wheel bones.
that's not a bad idea, but the car is already rigged and I prefer it like that cos it might be used for more stuff
basically I'm moving the "controller" of the wheels , which is an arrow and when moved, it rotates the wheels
I also tried by rotating the bone
and it works, it rotates the wheels (from the editor and not the widget)
but I still get that glitching effect of the entire car
Have you got an animBP for the car?
yes
In which case I'd recommend finding some tutorials on chaos vehicles and how to add your own vehicle. It might take you several hours, but once it's done, it's done.
Then you'll be able to use the vehicle movement component to control the steering. And also use the vehicle in other scenarios very easily.
Once setup this way your wheels will always touch ground even on uneven terrain and you should be able to link your widget to the steering variable in your vehicle blueprint which for this case you would directly set the steering without the finterp (repeat, no need for finterp) on the even tick. Basically the even tick will be waiting for the variable to update and when updated from the widget it will update immediately while moving the slider. Also throw out the idea of using control rig, it's more complicated than you need.
PS. I'm not fully up to speed on widgets, but you should have an option to update the slider as you move it, rather than it waiting for you to release the mouse.
When using the 'Mover' component, i've setup the walking state with a transition (using the physics jump check) to move to the falling state. Is there not a transition for moving back to walking state when the actor lands?
Edit: Doesn't matter, i figured it out.
well I did it with bone rotation and it rotates the bone, but it's still glitching. The issue is to find out why is glitching
Hey guys... im really stupid somehow... when i try run my game in standalone mode my game become unresponsive
music still plays and buttons can be hovered to reveal tool tip but clicking the button results in nothing..
ive debugged (evidentally terribly) for hours any new point of view itll be a big help..
ive played around with game modes and controllers for a while and no luck as well
What are the buttons supposed to do?
Yeah. Need more context for this. What are the buttons for? What shows the widget? Do you get click callbacks from breakpoints in the widgets? Or even click effects or only hovers effects?
no buttons work even to print string..
its a main menu level using a WBP to create a widget for the first screen
Do you get the pressed effect or only hover?
yes i get the visual effect of pressing
but no resulting action
also my main gameplay lvl is locked at the player start in standalone mode...
The buttons are working in PIE though?
Correct
Working as intended in pie
im feeling gamemode or controller issue but i cant see what or why..
Do you have the callback on the Clicked of Pressed event?
If Clicked, can you test Pressed?
There's a bug where you can lose focus between Pressed and Released, and it won't call the Clicked event if you no longer have focus.
ive tried click pressed and hovered and released to print and none of those work..
Does anyone know why in the recent starter templates, Epic separate mouse look into it's own input action? Is it something to do with the mobile stuff they setup in the templates as well?
Mouse look is handled differently from a controller.
Not really, the only difference is how you'd set it up in the input action mapping beyond that, I can't see any reason why it was separated out.
It does look like in the controller they have it only added if not using mobile but that then makes me think why didn't they separate out the controller stuff as well so they don't get added.
There's a big difference in how the logic is setup between mouse and controller. And also a difference in how the axis moves between the two.
With a controller there is a maximum axis limit which is why controller look is relatively slow compared to what you can do with a mouse. So you use raw inputs for mouse, but you do need to limit the maximum speed to a controller to maintain some form of control.
You asked and I told the simple answer.
PS. Mouse look has been differentiated for a few years now.
That doesn't really answer why it's a separate input action. As far as I'm aware, you can mitigate most of what you've said using the modifiers in the input context mapping.
As for in the templates, they call exactly the same function.
My only guess would have been input remapping. But that doesn't make sense given you don't remap look controls. I can only assume they wanted explicit separation between gamepad and keyboard controls.
WHat you have there is dead zone settings and smooth radial just deadens fast inputs a little to maintain smoothness, it's not the same at all.
That was my initial thought but all the keyboard stuff is with the controller stuff.
I'm aware of that. Again, these are exactly as setup in the template but merged into a single input action. I could add a scalar modifier or even create a custom modifier object if I wanted to tweak the controller inputs from the thumbsticks.
Do they do anything weird with them in code?
Not that I can see. Other than not adding the mouse look IA if on mobile.
Here's the code between mouse and controller look
I thought there was a delta multiplier in the IMC settings?
There is.
I might have to look into that. I was not aware of that.
So yeah, technically there's no reason for the separation. They may just not have known about it or maybe it was added later?
Yeah, there's so many little updates that sneak through. I just found out a week ago that they added a triplanar node for materials. 1 shader pass instead of the usual 3 with the current method.
Yea, it can be a pleasant suprise sometimes. Usually when i look through the templates I can usually figure out why they choose to do something. (whether I'd do it that way or not) but this one has stumped me a little. Especially considering they but some more effort into the different template types for first and third person. Unless it's just down to the mobile thing but that all runs through interfaces anyway (called from the UI) so you won't need to add any ICM's.
Well there is the fact Epic does do silly things. This code comes directly from the 5.7 version of GASP. So if they added it into the IMC then it means the left hand didn't tell the right hand again lol.
And on the mobile side of things it wouldn't really matter if the mouse look was there anyway is it would be pretty much redundant as mobile touch control wouldn't even trigger it.
Yea, maybe just someone's old habits. Lol.
LOL. so true.
Epic does do some overly complicated dumb stuff to be fair...
I had to delete a single unused variable in my game instance and it magically worked
good way to waste 7 hours
In a BP GameInstance?
calling this in the level beginplay not working in shipping builds
I thought only console commands will not work, but how to enable this in shipping builds?
GameUserSettings should work 0o? I used that to save and set resolutions, AA and other options.
I'd be interested to know if moving it to the PlayerController's Beginplay fixes it.
Level beginplay is a little weird between PIE and shipping. It happens much earlier on compared to other things than you realize outside of PIE
order of operation!?
i feel like the game user settings have a high chance of changing the frame rate limit
tho, your intend isn't clear
Jesus, learn something every day
Yea, enhanced inputs is actually really powerful once you start digging into it.
Need to reach that part first 
Did they add an easy way to have combination inputs together with non-combination inputthough? Last time I was doing something with shift clicks it was still kinda annoying
I mean situations where you have action on X and on X with shift held
moved it to controller, re packaged and it didn't solved it
moved it to main menu controller
it only works if called from C++
what about game instance ?
call didn't failed, it just didn't works silently
Sort of. You can use the chorded action which works well most of the time.
hey, does anyone have any idea how gameplay cameras are meant to be used?
i've been trying the plugin and i'm not quite sure where i should be setting the variables, because the system exposes a few different ways
from what I've seen I can create a blueprint evaluator and have it output the values, or use parameters. I think this is what they want you to use, either via blendable or data parameters. But then, am I supposed to be setting them from the director, or is the director just there to blend camera rigs?
There's an 'example' on the GASP. Although it's pretty minimalistic and doesn't handle transitions, might be helpful.
No idea then. GUS is perfectly usable in cooked games with the calls you had. And contrary to your point, so are console commands for the most part.
I'm not sure what could be stopping the FPS setting though. In Atre we're still using GUS but it's wrapped in the settings system we pulled from Lyra. But it has some extra frame rate handling for like menus/mobile/etc.
Only thing that's shitty, which I did in my own plugins, was that there's no simple world input for directions. To pick world input directions based on camera view. Which I kind of understand is game specific, but it's a generic enough thing that I feel like it should be there.
Implemented now using c++ , it works fine
As in ASWD movement vectors?
Yeah. Instead of having to transform them for the camera in code.
Hi guys, I am very new to Unreal and today I decided to challenge myself to move a cube. However, I was wondering whether importing an fbx of a cube from blender and then adding a skingular skeletal mesh affects moving it completely? I have done this in the blueprint under BP character class and I had also done the IMC. I had also changed all IA settings to 'Axis 2D (Vector 2D)'. I am unsure as to why it's still unable to move forwards and backwards using W and S keys.
I was wondering if there's like any weight mapping thing I have to do in UE5 to get the cube moving?
You should look at the sample 3rd person character template. If you have different forward / right input action mappings, they should be 1d Axis, not 2d. 1D axis means "positive/negative" since you have isolated the axes.
If you have a single movement input action, you could map all four inputs to it, but you'd need to "swizzle" it (with a modifier) for the W/S keys.
Specifically, if your forward is set as a 2d axis instead of a 1d axis, your X value will always be "0" for W, since "forward" is technically [0,1] and you're reading the zero (x) value from the input
whats the easiest way to assign vectors in the world to a list without handtyping each coordinate?
like is there a component or something i can use?
im making an orcs must die esque game and im on pathing now, i want to specify 3 vectors as a goal for enemies so they have a bit of variety in movement pathing, then when they get close to it, it moves onto the next list of 3 vectors to aim for
You can use anything you want. Is your game hand designed or procedural?
hand designed
Say hand designed. Unreal likes to sharpen a knife and backstab you like a noob for doing procedural.
Good. 😄
this game has to be handed in in 20 hours, wouldnt dare do procedural 
Uhh.. But yeah it just depends. How would you like to specify them?
enemy bp, so thats just doing movement
then in the spawner bp, i was just going to make multiple variables and fill them with 3 vectors each
them vectors would correspond to a point in game for the enemy to run to
Is your spawner BP placed in the level?
it will be, yeah
There's a little thing.. Sec
Can't remember if you can do that in BP
Yep, awesome. So..
In your array, check these.
yep
Now in your level, pick your actor with the array.
Add some points, and you can move them arround like any other actor and it'll update the values in the array for you and visualize them.
hey
is this the right way to calculate a chance procc? if crittchance is 0.7 and the random float is 07 or greater it proccs
right :/?
<=
That's inverted I would say.
Cause the chance to hit 0.7 - 1.0 is 30%, but crit chance is 70% :D
I have a gameplay tag container in my masterclass and I want to use it on a child class. However, I think adding or removing it will directly affect the masterclass. What approach should I take?
Yeah the one minus is probably cleaner.
What do you mean by it'll affect your parent class?
hmm okey
Modifying the Child Class does not affect the Parent Class. Only other way round and only if the Child Class hasn't modified the property yet.
so this would be the other way around then, since 0,7 accuracy and anything above that would be a miss
so >= is correct in this case ?
No, same issue :D
CritChance says how likely you can crit.
Accuracy says how likely you can hit.
aye ofcourse... -.-
I'd do the one minus. 1.0-CritChance >= Roll
It makes more sense from a rolling perspective. You want to roll higher, 0.3 to 1.0
I can make changes to a tag without a variable inside the child class. Is this normal?
wdym =?
Not sure I'm following.
I'm trying to learn the tag. My questions might be silly.
use random bool with weight
A GameplayTagContainer is just another variable. It follows the same rules as any other variables in regards to Parent vs Child Classes.
You're rolling 0.0 to 1.0.
You have a 70% crit chance.
You want to hit between 0.3 to 1.0 to crit.
Your math is (1.0 - CritChance) >= RollValue
This means 1.0 minus 0.7 = 0.3. If your roll is greater than 0.3 you crit.
Oh. I should have recommended that. My wife was the one that PRd those nodes.
Lemme delete this whole convo before I get the couch.
pat her head, i like that node
ok, one sec
hm how would i use that :/ ?
I forgot those exist. 😄 Yeah that node'll work too.
Pass your crit chance to the node.
takes in a 0-1 value and the higher the value, the higher the chance it will roll a true
You just plug the float into the node for the weight.
The weight is the chance for the bool to be true.
but guess what, it got tooltips (likely)
Did pat.
But still. Do follow the math above because it's important to follow even if the node does it for you.
In theory, yes.
if your accuracy is 0-1 range
range of weight is 0.0 - 1.0 so yeah
that will work
can i print the resault of the weight "roll" somehow ?
not true/false but the roll value
weight value*
Just print the float before the branch.
No you don't have access to the inner role.
Oh. You mean that. No
ah okok
You could do it manually yourself with the streams.
At which point you're back at complex stuff instead of single node.
yupp
if it works it works
thansk
erhm ok so...
if dodge is 0,05 dose it turn true of false if the roll is Above 0.05 ?
false
hello, this logic is to aim a gun at cursor, or a single plane, however i have run into a problem where aiming over the character causes it to spaz out, ive tried a clamp but it didnt work, im just trying to make it so the player doesn't spaz out when the cursor is over the character, thanks.
By the character, you mean the character with the gun? IE the origin point?
yes, the gun isn't a blueprint by its,elf it's just a static mesh, and I just spawn projectiles from the mesh on the character itself, but the origin point is most likely the character.
Does it do it if you do it above the character, or just specifically at the character?
Like straight above their head.
well, looking up creates a gimbal lock, not?
so either limit the pitch at which they can look up
or store the last rotation and rinterp (which may introduce cursor lag)
This won't be gimbal lock I don't believe. It's constructing a new rotation from the direction each frame, not adding to one trying to turn upside down.
It's sidescroller aiming code.
oh, in 3D you get a lock and pitch/roll may flip etc.
I'm presuming they just need to deadzone X or near the player, but which one depends on their answer.
wait is it 2D scroller or top down game?
Sidescroller. Plane is on Y
ok, but may work for either to just not make aim updates if the cursor is too close to the character location!?
which is the X deadzone you meant, i guess
Yeah, but it depends on if it's an issue with it being close to X or the character. If it's X, making it not happen near the character will still break it if they look directly up.
If it's just the character, which I doubt given this code, can leave the deadzone not affecting up in the air.
above the character, it rotates in a circle hahah
its a 2.d scorller, so 3d but works like 2d if that makes sense
Hi all. I'm looking for tips re: varied gameplay mode implementation. I need to switch between two modes with differences in interface, input, animation, and movement. I want to tie it to what you have equipped. A close-ish comparison would be the difference between having a gun equipped and a grenade equipped, like in Arc Raiders, but with more delta in regards to movement. Any tips, or direction towards a good tutorial or video would be much appreciated. Thanks!
It's chasing its tail
rotating to align with the aim point moves the aim point
I solved it for my project by having aim rotate an aim vector, and drawing the crosshair there, not the other way around.
AimInput -> direction -> draw crosshair there
Instead of:
AimInput -> move crosshair -> update direction to point towards it
Sorry, went to sleep but yes in a my custom BP game instance i had a unused variable "Level name" that i was not using anymore and this caused this issue a obscure unreal forum help me solve it
Anyone know when using Entry List Widgets why I'm getting them overlapping and not forming a list like what would be expected
my entry list widget
but in list view it's overlapping them
Saw for a weapon, is it better to spawn a mesh to use, or have one on the parent actor to swap out?
Canvas panel. 🙁
Your widget has no desired size is my assumption.
Also you don't need a button in a listview. It acts like a button.
Ohh didnt realise a list view acts like a button
Seperate quesrion out of inerest, whats best way to do inventory items, what i mean by this is where inventory items retain data like durability etc but dont reset back to defaults when spawned or inspected
Depends on the kind of system you want. Traditionally it's on a component you can attach to things. The items themselves either being a struct of data of a UObject created with the data on it.
UObject vs struct is mostly up for debate. UObject is easier to work with and nicer. Structs can be lighter weight but only necessary if you're doing some wildly necessary optimizations.
That said, I've also seen people make a kind of global inventory manager where the data lives on it and things access it by a key. I'm not personally a fan of this approach.
hey, does anyone know if i can rotate my character according to movement input between attacks? This montage plays in a "loop" that just sets different animation for it and i cant seem to get it to work, the rotation i mean. I need my character to be able to change directions instantly in between animations
and i forgot to remove this -1 node in the bottom dont mind it
obviously the animations are root motion and IMPORTANT, second animation plays before first can end because of my notify for the first to not go into idle and force play second one
Not to fussed on the how just need a method where the items in the inventory retain their data stuff and not reset back to defaultz etc
I read on google about using instanced data asset for each item where there is a value tied to it something like that
My inventory isnt just for items though, theyll also be materials, etc.
I'm in the process myself of building out an inventory system that utilizes Data Assets for the immutable data about items and using a UObject container that has a reference to the data asset and also contains the other mutable data. This allows the item to exist as a thing in memory and can be move around from place to place as needed, and modify its values directly. When you want to have it exist in the world, you spawn an actor, give it the UObject and the world object can construct itself based on the data within the UObject including the DataAsset info and have it removed from the inventory it was contained in. Picking up the world actor would destroy the actor but the UObject container would be added to the inventory (effectively a UObject array or set within an actor component).
To save the mutable item data between sessions you'd have to serialize the data it contains to save it and reconstruct it when loading.
Lighter weight than using an actor for every single item, makes items a "thing" rather than just existing only as data, keeps data usage per spawned item lower due to the immutable data being stored in data assets (ie. you could have hundreds of the item spawned, but each doesn't need to keep track of what mesh its supposed to use or what its name is)
You don't instance data assets unless you have a system that requires static data to be created at runtime. Structs or UObjects. If someone says otherwise they hate the people they work with.
as you should be 
did have another question though, im using this to loop over each point and get a random one from that list, but it isnt running there, the ai just stays in place. i have auto possess ai set to placed or spawned in world, but it doesnt affect anything
You don't need that loop. You can pull a random value directly from the array.
As for the AI not moving. There's only a few things it can be.
First your movement point needs projected to the navmesh, I don't know if AI move to does this internally.
Second is to make sure you have a navmesh.. in retrospect this should probably be number one.
And third, it needs the aI controller, which you've set so it should have. Can you check your Output Log? The AIMoveTo should be throwing some warnings if something is wrong.
Also the Pawn itself should be spawned projected to the navmesh, it'l fail to move if it's not on the mesh itself.
it moves now that i changed the loop from that loop to random array item
🥳
or not, i just got it wrong 
if i use project point to navigation, it just runs to 0,0,0
You have a navmesh right?
Hmm.
instead of running to a point, it runs to 0,0,0
which is where the player spawn is
Can you show current code?
Query extents. 😄
so it was returning normal values because that was being passed into the event by beginplay
Also
Pure nodes run once per executed node that calls them.
Right click your Random node and ShowExecPins on the bottom of the context list
Hook that up to execution so that it only randomizes once.
Right now you're randoming once for the Print, then again for the Move
Change the QueryExtents to like... x10y10z2000
Yep
if so, projected point is still 0,0,0
That... does not make sense.
On a random whim, can you put a 0.2s delay before the Random node?
sure
Curious if there's some order of execution with the controller spawning. There shouldn't be, but..
atill 0,0,0
Maybe there's a clue in the output logs. I'd open that, Clear it, and then run a test.
It should work even without the project though... Curious why it isn't.
The project failing is normally a missing navmesh but.. clearly you have one.
PIE: Server logged in
PIE: Play in editor total start time 0.228 seconds.
LogBlueprintUserMessages: [BP_Enemy_C_0] X=0.000 Y=0.000 Z=0.000
LogSlate: Updating window title bar state: overlay mode, drag disabled, window buttons hidden, title bar hidden
LogWorld: BeginTearingDown for /Game/Levels/UEDPIE_0_DEBUG
LogSlate: Window 'TotallyNotOMD2 Preview [NetMode: Standalone 0] (64-bit/PC D3D SM6)' being destroyed
LogWorld: UWorld::CleanupWorld for DEBUG, bSessionEnded=true, bCleanupResources=true
LogSlate: InvalidateAllWidgets triggered. All widgets were invalidated
LogPlayLevel: Display: Shutting down PIE online subsystems
LogSlate: InvalidateAllWidgets triggered. All widgets were invalidated
LogAudioMixer: Deinitializing Audio Bus Subsystem for audio device with ID 37
LogAudioMixer: FMixerPlatformXAudio2::StopAudioStream() called. InstanceID=37
LogAudioMixer: FMixerPlatformXAudio2::StopAudioStream() called. InstanceID=37
LogUObjectHash: Compacting FUObjectHashTables data took 1.06ms
LogPlayLevel: Display: Destroying online subsystem :Context_45
im not sure what causes this
Okay. Sanity check. Does it work if you hardcode one of those values into the AIMoveTo?
Like the pawn moving, working, I mean.
yeah
And if you connect the Random straight to the AIMoveTo and bypass the project?
with it set to -1000, 1000
he runs over there, no point is over there
Is that with the random or the hard coded value?
thats with hardcodede, with random its going places i have no points
im seeing if i can find a seting to show the 3d widget points in game
Debug draw them. Sequence off of your event. The RunToPoint. And ForEach over the vectors and DrawDebugPoint.
ok so its run to a point
all of the points are back here
no clue why its pushing them past where i have defined
What is the scale of your Spawner?
Oh but it's not 0,0,0... I'm wondering if those are local space points.
OH i think i know why
yeah thats what i was about to say
setitng one to 0,0,0 goes to the spawner
Makes sense. You can convert them in a function before passing them to the pawn. Transform them by the Spawner's Transform.
Unless there's a checkbox that makes those world space. I didn't look that hard earlier.
not that i can see
Yeah. Just transform them.
looks much better

now just to think up a way to go from trackpoints 1 to 2
can you make arrays of arrays in blueprints?
was thinking to make an array on beginplay containing every point, then when atPoint is true, i can go to the next array in the list
Create an array of that struct.
If you're using a grid, better to just use a 1d array with 2d<->1d index conversion functions.
hi, I'm not sure where to put this, but this channel seems the best option. I'm trying to sort an inventory.. it works if the predicate is Quantity(ints), but fails spectacularly if I try to sort based on weight (floats) Gemini blew me some guff about it being an unstable sort (but that still wouldn't account for the issue) anyway I've included the gemini-bloated comparator that is supposed to do a tie-break. I've used two sorting libraries (as you can see by the orphaned pins on the original one) but it generates the same errors. Next, here is the part where the SlotHolderObject array is populated. The original structure was an Inventory Slot that has as a field the Data Asset, but since there was issues with getting it to populate in time, and that the sort uses Objects not structs, I made the SlotHolderObject to hold hard references to the fields for the sort. All three data structures are shown. S_InventorySlot, SlotHolderObject and PDA_ItemData.. Finally, there is a screen shot of "before" and "after" the sort has taken place. I have no idea what's going wrong.
the small digit at the bottom right of each object is the item weight, which is what it's supposed to be sorting by.
This is a Tileview widget, or? And which of the inventory displays are the sort attempts, or are those both sort attempts from different library?
both sorts seem to give the same results.. the underlying sort is the one in the UE libaries i think.
the first image is before the sort, the second image is after the sort (either version)
The slot index tie breaker isn't necessary. In fact you shouldn't need anything but a > check.
yep, Gemini was adamant, so I added in anyway to shut it up!
Can you show what it does if you remove the nearly equal branch and only do your < check returned?
yes, I've tried that and it outputs the same result
Also again, this is a Tileview I assume? Given you're making objects.
I'd be very curious what it outputs if you put a ForEach right after that Sort, and do a print for each weight. If they line up there.
Just to 100% confirm it's the sort.
ok I've removed the tie-break
before, after
i looked with breakpoints, and they are jumbled like the screenshots after the sort
1.5, 8,8,10,10,3,3
Are you 100% certain that you don't have another sort somewhere? Because this looks like it sorted by weight, and then stable sorted by stack size.
No, that doesn't explain the weights right after the sort.
I'm reluctant to believe it's the sort. I'd assume both of those just do a SortByPredicate call. Either your values from those interfaces are wrong and somehow different than what you're looking at in the debug or... Or the sorts are fucky... Or you need an exorcist.
I'm considering getting some holy water from Amazon..
i've put a branch node in just as a place to put a breakpoint before and after the sort.. i'll have another look at this array..
If it still looks valid, I'd still be interested to see if pulling your weights in a for each loop and printing them gives the same expected results.
Using the same interface your sort predicate is I mean.
it'd be better if I could show the entire array, but could only fit the first 3 elements... before screenshot, before sort breakpoint, after sort breakpoint
hmm i'll check those slot indexes
red-herring.. the slots gets their indexes set by the iteration over the SHO array
Wait. These values are weird. 0.15, 0.8, 3.0.
Your sort is fine.
Your inventory display is wrong.
Following your other displays, Hammer should be 30, not 3
Oh, no that's per item.
only item weight is counted, not quantityxweight
Does that interface return the whole stack's size or the per item size?
per item size
Then the sort is correct.
for now I haven't multiplied by quantity
3<10
It's not 3 vs 10
those hammers should be before the turkey legs
No
Meat is 0.8
You see it as 8 because you display the whole stack's size in the inventory.
But your data says it's per item size is 0.8. Which makes sense. 0.8x10=8
But you're sorting by per item size. 0.8 vs 3.0
that would be a howler by me if it's true.. i'll check the UMG stuff to see where the value gets updated
well herp my derps!
😄 So yeah. Sort is all good.
well done brave Authaer! I can get some sleep tonight 😅
Is that a new edible object?
the only thing I have to decide is which sort library to keep.. first world problem definitely
I'm partial to the one that has the Reversed argument actually in text and not just a random checkbox with no descriptor.
that was the Loris one.. the original with the label is the LE Extended Library plugin
the predicate sort is missing in UE for Blueprints...my plan was to dig it out in C++ at some point. Glad I opted to use a library FIRST.. 😅
hmm
that rock looks in the wrong place
If you reversed the sort, this is correct.
correct mow I think
I added quantity
sorted by (itemweight*quantity)
10,10,8,8,3,3,1.5
huzzah
🥳
nice little feature I only discovered the other day.. see those object A, object B with a little f in the top right? the arguments to the function.. lots of spaghetti removed..
much nicer than trailing a long pin to the other side of the graph..
i'm going to see if I can remove that cast that Gemini said would fix all my problems and worries.
Gemini has been reading too much Reddit. The cast is fine.
actually I was going to try and remove it.. turns out it's needed. I guess the accessors are too slow, because it corrupts the sort...
"Msg Get Item Weight..." too slow
the joy of working with Data Assets..
There shouldn't be any difference between them. O.o
you'd think.. but using the messages the sort came out wrong as far as I could tell..
It's hallucinating. Interfaces are the same as a cast. They're thread blocking. It is true that it takes more time to do the interface call. They're less performant than a cast accessor. But they won't cause some imaginary wait.
What is the interface function doing?
What are they doing in the data asset though?
Compared to blocking asset load, the cast is negligible in terms of performance
all i can say is the images show the messages appear to corrupt the sort
But in your PDA_ItemData. You have the interface implemented with GetItemWeight doing something.
There has to be something else there. Or it's not implemented in the data asset.
You're not mistaking the one on the SlotHolder are you?
yes, I'm exactly doing that!
that's why the messages were failing!
now I could go ahead and make accessors for the PDA..or just carry on with the cast
Do the cast. Pointless to change it. The PDA is going to be loaded when these widgets are shown anyhow. Decoupling the link won't do anything.
cool. good to isolate that bug though. and I won't have developed a prejudice against using messages with PDAs 😅
cast it is
im so lost, any ideas why this wont rotate?
trying to make it rotate to at least face the character, then after i can get it to rotate, then make it work for shooting enemies
set world rotation not relative rotation
ok so i dont think the pawn sensing is even detecting me
im next to it and it doesnt print hello or rotate
Isn't pawnsensing a legacy system replaced with AIPerception?
idk what im doing wrong. the line trace does detect the beam i want to walk on and slows down my movespeed but after leaving, it doesnt change the speed back to normal. only after i jump it does.
You're still hitting an actor after leaving the beam. But you're doing nothing with that side of the branch.
Unless you're not, in which case I'm not sure. But that'd be my first guess.
idk how thats possible. the only actor in the scene is the beam the character stands on.
is there anything wrong with the way the BP's are connected?
How do you mean the beam is the only thing? Do you have a landscape, or?
just this:
The white things and the grid pattern things are also actors.
Correct. Which is why it stops and does nothing.
Connect the False part of your branch there to the IsBalancing SET for false.
I'm 90% sure that'll fix your issue.
🥳


