#blueprint
1 messages ยท Page 149 of 1
@dark drum At the start i do a Get All Actors of Class. On the first start all 3 are counted in my UI. After restart it just says 0
Hey can anybody help me with this, I am using global time dilation to slow down the world and custom time dilation to change a certain object time back to normal but the the thing is it is not affecting the material the object is using and it is moving with global time I tried switching material when I am slowing the world and setting the object time to normal but it is a bit jerky and is obvious in the scene that the material is being changed these are the screen shots https://discordapp.com/channels/187217643009212416/221798862938046464/1232959129342050334
@dark drum here is a gif so you see what i mean
Hey
If I want some different logic when a player is holding shift how do I go about this?
I'm guessing this "Is Left Shift Down" node, but what should I input into it?
@young meteor Variable or there is a event blueprint for pressing a certain button also for shift
So like this instead?
Without tick on bottom ofc.
im trying to make it so it can move thru doors im unsure how
This would work but depending on the end goal, using enhanced inputs might be a better option as they support trigger keys. Keys that need to also be pressed to actually trigger the input action.
Look at Nav Link Proxies. Getting AI to move off the nav mesh can be a little tricky at times. The Nav Link tells the nav mesh that if the AI gets to point A, it can walk in a straight line to get to point B. This allows it to leave the nav mesh.
Unless you're using a dynamic nav mesh that updates, chances are there wont be any nav mesh where the door would be when closed. This is where the nav link helps.
You might however need to spawn the nav link in when the door is open and destroy it when it's closed.
Thank you ima look in to it more so i can hopefully make a good ai for my game
Smart Nav Links is another one that you can use if you want you're AI to be able to open the doors if they are closed. They allow you to do something when the reach Point A. (opening the door for example) Something like this does start to get complex though but definitly worth reading up on how to use.
how my door works is when a object is in its box colider the door opens slowly
was the only door i could code that actualy worked lol
idk why every other time i try make another door instead of opeing correctly it just doesnt \
Any reason why I don't see all my interfaces here?
I'm trying to add a specific interface (starts with BPI like I searched for)
Make sure it's saved and try compiling the BP you're trying to add it to.
It is. And BPI is used with other BP's already.
Perhaps it already implements it on one of the BPs parents.
Well I guess I don't even need the interface since I just need to call a function in another BP which has the interface implemented.
Seem to work.
Still strange though.
I'm an idiot. Forget what I said. Big blunder on my part.
Already had the interface implemented. Only looked at inherited interfaces. Did not think to click the arrow and check actually implemented ones. My apologies.
That is of course why it does not show up when searching.
How can i fill the entire screen with small images without them overlapping? like dismantled puzzle pieces?
Spread evenly , with some leeway for randomization, and rotate/offset acvordingly ?
Start uniform then go from there
I have an event tick make rotator into a add local rotation. I want to be able to scrub through the sequencer and it show the rotation. Is that possible?
(sorry discord not on this pc)
Currently with PIE it just rotates irrelevant to the sequencer (which makes sense)
If you need the sequencer to control the rotation, the sequencer needs to manage the rotation.
Logical as only logic can do
I don't, I need the variable, but I would like to see the result of the variable in the sequencer.
I can change the variable of course in the sequencer, it is driving transforms but I can't see the results as I scrub (since I guess it's attached to ticks) so how can I attach it to the sequencer time
The thing is. You're telling this thing to rotate by a rate each frame. The only thing the sequencer can do is tell it to slow down or speed up with that rate.
If you want the sequencer to scrub the rotation, it either has to manage this actor's rotation during this sequence by disabling the normal rotation and managing it in the sequencer as it's playing.
I am using delta seconds so surely somehow I can attach that to the sequencer timeline.
Delta seconds is a measurement of the time between frames. So not really.
If you wanted to go that way, what you can do is use the actual world time at the moment and math that out.
Because actually when I press play, it stops rotating entirely
hopefully you got the information you needed about the random not working correctly, i was confused it was because of pure node
Hi everyone, I would like to be able to launch a projectile by pressing a key once and if I press it again while it is still active I will teleport to it but if I don't press it again the cooldown will still start, i actually force the player to tp at the end of the projectile but i would like to give the choice
a boolean most likely, that you turn on when you fire it, and turn off at the end, so if the booleans on and you press a key it teleports to it ?
i'm actually doing all the logic in the projectile, so i would need to get a reference of the projectile in the character to do it ? ( sorry i'm still a beginner with the engine)
i'm not that well versed in it yet either i been using it for a while but at a slow pace
well after you spawn it, set a bool to true on your character, then get your character set the bool back when it's done, so that while that bool is true, if you press the key again it will teleport
but i mean multiples might be a problem
but in theory there isn't a multiple, because you teleport if you fired one right ?
Oh yes then i get the reference of the player in the projectile to know the state of the boolean
Yup only one
I will try this ! Thanks for your help !
guys ho can i connect them to make the boolean switch only from "none" to "for duration"?
use a select node.
nice, worked perfectly
Hi everybody๐
I just updated my project from 5.2 to 5.4. I have a Spline tool that simple samples meshes along a spline. However in 5.4 if i move a spline point the construction script is not triggered anymore. In 5.2 the construction script was triggered as soon as a component of the actor was moved. Does somebody know why this is not working anymore?
Checked settings?
Yes. Comparing them right now. Found nothing yet.
Actor has run constr on drag atleast
Where can I find that?
Yes it is on
Just mad an actor with only a spline in 5.2 and 5.4, in the former the CS triggers in the latter it don't
I vaguely recall they changed it
Could be a bug it seems
Right yes
a very annoying one at that, I'd imagine for in-editor tools it to be rather important
Indeed it breaks my tools
not just yours ๐ ๐ซ
Greetings, just found this Discord. I would like to hear from anyone their idea of how would I implement a certain movement. Would love to hear their approach or algorithm and perhaps brainstorm the best option.
So I am trying to implement movement akin to Super Mario 64/Odyssey, and I'm trying to figure out how would I do the skidding/braking movement when releasing the move stick when reaching a certain velocity. I was able to make the skidding part, but I'm trying to figure out the turnaround if the player flicked the stick towards the opposite direction from where they're currently facing when isSkidding is 1.
Thank you and much appreciated.
For context, this is how I implemented the first part of it
Skidding Event. Ignore the Play Length determining the delay and ignore the disable and enable input.
Luckily for tools you expose a button to invoke.. but yes
Its not nearly as intuitive
Sure would be a workaround. But that's too annoying for my project.
Degrading is always an option, for a while
Hi folks, sorry if wrong channel but.. if i want a collision to block pawns but ignore my character, would i need to create a custom object type for my character?
or is there another way
Override collision responses and type?
sorry, do you mean setting to custom and manually selecting these responses based on type?
The CMC has movement settings related to braking. You're mostly looking for settings similar to ice running, but lower.
if so, if i want a behaviour/response unique to my character, wouldnt i need to have my character as its own object type? or are you saying there's a node or so that allows me to set a target (my character) and override collision responses?
Only if you trace by object type i guess
how would I go about getting this to actually work?
The thing is there are certain factors I'm trying to achieve with this skidding movement, upon skidding (isSkidding = 1), the character must:
- play a skidding animation
- not be able to move for a small fraction of time (like 0.25)
- be able to brake into stand still (idle) or turnaround, where turnaround opens up a new movement if pressing A (the lateral or side jump)
I've already looked into the CMC's settings regarding braking
The rest just sounds like logic you'd implement
but that requires every thing to happen in a sequance I want it to happen at ore around the same time
It is the same time ?
All within one frame
o I see I am calling the loop ever update?
Yepp
ok
Hey, I have water material from Water Planes UE4 assets. I am tweaking the material, but I cannot get rid of this sharp transition, that divides a part of world, that is above water plane with that, what is underwater
any idea ?
This is directly associated with camera
would y'all say set life span is the same as delay + destroy actor?
Some part of the material
I feel like I am missing something, but there must be a way to do a switch for damage types right? And not what i have done in the screen shot or is that the only way?
That should be animation only probably
You're usually supposed to create new damage type classes and just pull the data you need from it after you pass it through the damage event.
Hmm, okay, maybe I am using this wrong. Because I'm checking which damage type the enemy was hit by and then doing a multiplier based on the weakness of the enemy.
But maybe I should just instead compare the actor rather than the damage type
Why does the damage type not contain the data you want?
I want it to be enemy specific
So enemy A is weak against fire, Enemy two against ice
And then I do a multiplier based on that against the amount of damage they should get
You need a data asset for your enemies that has a map of damage type to multipliers.
This is why I love GAS. You just throw resists on as GEs. And you apply damage with tag types that check resists.
Hmm, okay! Thanks for the answer, I will do some more reading about this!
yeah idk why damage type is a class and not just an enum or tag
It's fine being a class. It's the old damage type system before DAs. They use it like an asset because you set defaults in the class. When you apply damage it'll pass back the CDO to pull data from.
Not the best, but ๐คทโโ๏ธ
Correct me if I'm wrong, but what I'll need to do is have an animation that in full has the skid/brake followed by a turnaround, and have it that if the player did not flick towards the opposite direction, it plays like half the play length, but if the player did flick it plays it fully which will then include the turnaround part. Correct?
I'd prefer to have input drive movement drive animation but there's many ways to do it
Could you explain what you would have done? If you don't mind.
you could have the stick flick drive a very strong acceleration which is noticed by the anim bp which does the correct animation stuff
Or refer me to any doc
ShouldTransitionIntoSkidPose = DotProduct(Velocity, Acceleration) < SomeNumber
Yeah. Since I'm not using anything from the damage type I actually don't know why I'm not just using a ENUM I can set inside of each projectile... I'll switch to thay.
You can create you're own children of the damage type and include addition vars and logic that can then be called when damage is received. When you bind to the on damaged received event, it'll return the damage type object.
(Screenshot is an old, very crude experiment lol)
Yep. It was an okay system. Works. But GAS is better. ๐
i dont know where I went wrong
yesterday my actors were being destroyed on pickup
today they arent
I dont know why
oh , I was messing with the inventory and forgot to reconnect the execution and return after updating the inventory
So I'm able to populate a chart object as desired however what node would I need to hide it from the viewport when the tab key is released?
do you guys have any idea why this would fail ?
your getting failed on the cast ?
pull from return value and do remove from parent on release
yes and its driving me crazy
its such a simple code and yet doesnt fucking work
then the hit actor is not that type of class i'm guessing
where do i check for that
for one thing your trace in from the start, to end the same place
that doesnt really matter it just checks in a sphere near me
i even looked at a tutorial for this because i thought my method didnt work, did EXACTLY what the guy did, still doesnt work
the thing you hit isn't a handle
that only returns ONE hit
if the first thing hit isn't a handle then you're SOL
idk for sure if this applies but the menu is added to the viewport and collapsed, then a function toggles whether its collapsed or displayed
the guy that did the same shit got it to work
print the thing you're hitting
that trace only returns one hit
if you hit anything else first, you won't get the handle
yea you are right it says floor
any way to solve it ?
gocha thanks
I'm trying to setup something like large fans, where the closer you get to the slower you move towards them. As well as the ability to have multiple fans on at the same time to kind of shove the player around or pull the player in. I'm struggling to find the node or method to accomplish this. Anyone mind pointing me in the right direction?
You using Character?
Yeah
Character can respond to AddForce
is there any way to break hit result?
Fan.Tick -> get overlapping actors -> cast them to Character, add force to them
I tried add force, but it didn't do anything. Is there a specific way I should be settig it up?
for each loop on it
how big were your numbers?
show your code
One sec, I'll recreate it for testing
The fact that Character responds to force is just a convenience, it's not actually simulating physics so I'm not sure if it responds to the same size numbers but the units of force in Unreal are tiny
how would i tell the cast which character is hitting from the loop
Yeah I tried 10k, doesn't do anything
keep going bigger to rule it out
array element is each individual hit result
break that
centinewton
damn thanks
and you're fighting the CMC trying not to move
Ooooh. I see, it has the same issue as launch character. It's working against friction and whatnot.
So if I jump I fly super fast.
Thank you Adriel such a quick simple solution holy fuck i was so angry thanks
Is there any way to make the force ignore friction and anything else out of curiosity?
I could do a check if the character is "falling" and have different values
Friction is a setting on the CMC
It depends on if you want them to feel like they're on ice or what
welcome to kinematic movement
Yeah, I want the friction, just the foce specifically I'd want to ignore it. But yeah, that is probably a custom thing.
basically the default settings on CMC are like you have the stickiest shoes ever on
Is this an engine glitch and I need to refresh?
I can't see whats wrong with it and my others using this code works
Either way, this is awesome. I tried so many things and none worked. Turns out I just had to REALLY increase the value lol
Thanks for the help!
Jump near a fan
does it yeet you
Yeah
the fan will want to pick a different force based on if the character is in air or not
since their shoes are so sticky
Ground friction affects it, but that just means I can adjust it based if I'm in the air probably
I'd tune your friction settings in air and on ground to the way you want them, then tune the fan around that
It's my interact event that isn't working
There we go. If in the air divide by 8 (Ground friction strength). Or it'll be visa versa (multiplied by 8 when on ground).
Works really well
Now do that from the fan's perspective so the character doesn't need to know or care about fans
Yup ๐
you'll also want some falloff probably
There might be add acceleration too, that way it would ignore mass
depends on what you want to do. I'd use map range. Basically distance goes in, strength comes out, gets multiplied based on IsFalling
ForceVector = Fan.Forward * Select * MapRangeClamped(Distance)
anyone know how to do portals in unreal that are performant? I have a setup that is using scene capture and render target and each portal is taking 12ms to render.
Scene capture is the only way I'm aware of being able to do portal type stuff. (in terms of the visuals)
sorry for such a basic question but, is add movement input only for entities with a movement component? (ie characters)
the description on the node is mentioning that for pawns it needs to be tied to a tick event, which it is.. though im not sure where id set movement speed, for example. in either case, its not doing anything for now, and thinking i need to switch to "move component" and just use the root component
it just accumulates into a variable (GetInputVector or smth) but nothing else, you have to use it somehow to actually move the pawn
Hello, is streaming landscapes with on box overlap performance efficient? I am making for mobile and we cannot use world partition like stuff on the device
sure, it is how it was always used before UE5, there are the streaming volumes that does it automatically so you dont need to manually load and unload
yeah but i am bit confused between world composition and with overlap box events
which would be more good?
thank you- sorry was messing around seeing if i could figure out how to make use of it but no luck. (figured it was get last movement input vector)
guessing move component to might be easier to use in this situation
hi, I am trying to bind my health bar to my health variable and need it to be reflect in the progress bar, but the function of doing so being changed from "Get Percent" to "Get Fill Color and Opacity " and nothing working any more. It used to be "Get Percent ", how do I fix this ? I just trying to bind my "Progress Bar" to some variable
Here is how it used to look like:
here is the new one:
it's only 6 months and the api already changed. What do you guys usually do when following tutorial, just install the same version with the instructor or get the newest version ?
they're two different ones
the api is the same in this regard ,
cant tell exactly what has happened in your case but
(also, general advice to avoid using the bindings)
Bound the wrong property.
Kinda sounds like you're doing something you shouldnt ?
with Interfaces, and a list of referencens
It dependsโข๏ธ
what exactly are you trying to do ? What's the interface function for ?
Kinda sounds like you'd want a Component, as you have some state related to that functionality
and not interface..
They're compositional bits of code and logic that can be attatched to any actor
@faint pasture Thanks for the help again. It's working really well with a pull in gravity effect. ๐
what is the purpose of "Promote to Variable " ? Why do we usually promote blueprint to a variable, is it some way of create class instance and to store infomation ?
can't we like call "Set Timer by Event" directly instead of calling it though the promoted variable
oh, so we can get the ref latter, i guess.
"promote to variable" is really just a shortcut to create a variable from that class, it's no different than clicking this button, changing the type to what you want, connecting a set node, etc.
Yeah it's to avoid having to cast again later
Casts can fail, and IIRC they're oddly expensive computationally, so if you're gonna need a reference to that thing again it's better to keep it
Actually scratch everything I said, I have a better explanation having looked at this specific code lol
The answer is, you're GOING to need that ref again so you know what character to heal.
hey guys I am trying to make a blueprint animation to trigger randomly two animation montages on begin play but my cast is failing, the class of the bp I am trying to cast is a "character" shouldn't I use Get Player Character?
Get Player Character returns the pawn that the given player is currently controlling
If this is a single-player game for example, you're getting the player character
mmmm but the class is actually character, even if this is not the actual player character (metahuman uses character as class by default) what else can I call ?
Sure the class it returns is character, but I bet it's not "BP_CrowdCharacter_Dead"
Unless for some reason you play as a crowd of zombies in your game ๐
Why doesn't the blueprint for the dead crowd thing do this on itself?
^
hahaha kind of, just trying to make a mass ai with random animations so each npc has different animations instead of the crowd having a single one
because for some reason it won't work when I try to do in the dead crowd bp
I would perhaps dig into why that doesn't work
oki many thanks
(casts are basically free in themself)
(another day, another trip to the void ๐ )
I'm misremembering then, I thought there was some crap about forcing a memory allocation for the BP you cast to
only if it's not loaded anyways
but that's for everything involving another BP, not a cast specific issue
Linkers do not cost cpu time. It's less about memory allocation costs, which are usually associated with like reordering arrays too much and forcing the array to move. Linker issues are about simply having too many things loaded at once. EG having a game that is 20gb total, and trying to force that all into memory at the same time because everything links to everything else.
I feel like thats the sort of thing that would be hard to do on purpose, and weirdly easy to do by accident
It's very easy to do. Even without casting. You can follow the youtube path of spamming interfaces everywhere and still easily load too much.
Got a datatable with 100 entries of monsters in your game you spawn on different levels? Forgot to softclass them? You still keep them all loaded as long as the spawner is referencing that table.
fun times
"why does my loading screen map load every asset there is!?!? It's empty! !"
This is also the reason why maps are largely handled by strings until softrefs came about. ๐ Can you imagine someone dumping an array of hard map refs into an array to randomize them? ๐
hahahaha oh lord
I'm sure i've seen something similar before
games loading full on levels in main menus
like... I'm in the main menu... why do i have 14 fps?
even if my gfx suck, i should have reasonable fps in the main menu
I thiiink this happened on Crysis
Yeah. After learning how loading is handled, seeing the way people throw around linkers is just baffling. But I guess if you don't know, and you have a goal/deadline then fuck it.
"if it works, dont touch it"
Yeah, me and that saying don't get along. ๐
Releasing on old gen consoles does things to a person.
Hey can anyone help me with a windows issue? Idk where else to ask bc my pc is unresponsive
Did you turn it off and on again?
^
yes I wouldnโt be here if i hadnโt
ExecuteConsoleCommend("Reboot t-5s")
Iโm sitting at the lock screen because every time I unlock it, everything freezes
for whatever reason i could still use discord though
This happened in the first place after downloading an AMD driver btw
rollback the driver
how would I do that exactly?
gfx driver?
yeah
download older version, insntall over existing
or uninstall existing before installing new (old)
iโm not sure how I would do that without access to any apps though
Restart in safe mode
Then rollback the driver when you're in safe mode
Hey guys, I have question. Which blueprint would be the best to create something like Combat Component / Manager for my units so I can kind of put it both on Enemy / Monsters or Units and they will all have the same ''AI"' as well as it should be possible to add maybe box collision for detecting enemy in range etc. ?
Is there a way to get a 3D Widget to appear in a blueprints viewport and not just in the scene?
Honestly you should be looking into the actual AI system. Check out the pinned posts in #gameplay-ai
is that possible?
Yep
This is also for like units in RTS game? Thank you for directing me
Ohh, so the whole combat should be actually programmed with builded AI behavioral tree and not scripts?
wonโt let me
thanks
Welllllll, so, I wouldn't go so far as to say "should". I've got some systems that seem AI-like that are all scripts, and I've got some systems that are using AI tools like behavior trees but hardly seem like "AI" at all.
The AI stuff is a toolkit that can solve some problems for you, that's it.
That said, if you've got pawns moving around, detecting each other, and making decisions, yeah it's probably going to be a lot easier if you familiarize yourself with the AI toolkit
I wrote the system in the C# before and it wasn't really complicated. I think I could pull it off with blueprints and maybe that's good way to study behavioral tree a bit to check if they can help (i have 0 idea about that in Unreal yet so I'm not sure what I'm talking about).
I'm just wondering if should I put the mechanics in the ''BP_Unit_Parent" or should i go with BP_CombatHandler and make it component that will be attached to the Actors that I need them to have that mechanic. Could you tell me something about my approach?
My first problem when I tried to go with Actor Component is that there is no ''view port'' to add ColisionBoxes etc. so I could automatically have reference when working with ranges etc.
Again the whole thing you're trying to do with collision boxes to detect enemies, I promise there's prior art. The whole AI perception system is for exactly this thing
On my way to study pined posts then... any good sources you would like to add from yourself where to start with?
Is there any function where I can check if a value falls within a +- of a value? Like a percentage error?
Nearly Equal?
Yeah that's it, thanks!
Wtf? Someone exposed PerlinNoise1D to BP, but not 2D and 3D. :/ It's literally a copy paste with 1 character change in three places.
You could have the owner you place the actor component onto have the collision boxes and have the actor component bind to the overlap events.
What could explain that a variable is not replicated, despite being set to repNotify ?
set is made by Authority, but in another actor blueprint, that is now the owner
Why did you ping me for this?
Sorry also! wish I knew more about multiplayer!
no prob
can anyone help me integrate sliding and mantling into my character movement system? (I don't actually need help in-engine just help with the theory)
anyone know wtf is happening and how to fix?
Apparently your karma in here isn't so great either.
apparently not
That annoyed me pretty much pre c++ days !
- The actor that contains the variable is not marked to replicate.
- The actor is not within relevancy range of a player, thus it wouldn't get replicated.
- While you may have an authority check, are you actually running on the server? Replication only happens from server to clients.
Yeeeeeah. I just renamed the original a bit and wrote them all into my own math library. :/ Just stupid.
Maybe I touched stuff from this specific instance
Replication only happens from server to clients.
Thanks, I have been wondering that too
I tend to do almost everything server side
Someone refresh my memory, what's the right way to do what i'm failing to do here? I can't type the Shot Target as the interface implementation directly because I need some other actor attributes.
in my game mode i want to control when the first player is created as i wish to calculate some things beforehand. is this possible somehow with an overrideable function or something ?
Drop the dragged pin in the graph and call the same function but with the message version.
There is a boolean I think in GameMode. Not GameModeBase.
It'll start players as spectator pawns until game is ready.
Is there a way to trigger this with a controller?
is using Set Relative Location on Event Tick a terrible idea for a camera//spring arm?
You can use On Key Down and check against a specific input and call whatever OnMouseButtonDown is calling (maybe move it to a function if you have it all within OnMouseButtonDown currently).
Though i don't necessarily think this is a great idea.... UI having direct bindings kinda sucks.
Not necessarily. If you want it to be moving around every frame then that's what you need to do anyway if you want it to be smooth.
im trying to keep the camera locked to a specific Z value for a 2d platformer (unless they move to specific platforms etc etc), and im not sure if this is the way its meant to be done
awesome, thank you. It sounded like it might not be very efficient performance wise but not sure how else
Doesn't seem to fire anything when putting a print in the widget
Ah it has to have focus
Any way to do that without it being focused?
Like, it's slightly wasteful only if you're not changing the Z value very often, but the set relative location node itself isn't expensive. If you're running a bunch of calculations on tick to get the actual Z value you want on tick, then it may end up being a bit more of a concern, but if you're using a pre-calculated value (you're adjusting a variable to indicate Z needs to be 300 when the player jumps on a platform) and then utilizing that variable then it's next to free.
@toxic copper ^
As far as I'm aware in order for the input events to trigger anything the widget must have focus.
Causes so many hiccups if the inventory slot is focusable ugh haha
Trying to make my keyboard/mouse inventory setup work with a controller
thanks a bunch for this detailed answer! Im just starting to build it out now and debating how to go about it, so not sure how many calculations just yet
also realized i think ill need set world loc in this case instead of relative
I think you may want to look into Common UI (Authaer is probably about to mention it)
Sir, do you have time to talk about our lord and savior CommonUI?
haha
Hahaha dammit
I'm aware of it, just haven't made the jump. Should probably try it out and see. I have A LOT of UserWidgets for my inventory and was slightly worried about it breaking stuffs but I tested earlier today and it didn't seem to break anything too terribly.
The main things you'll have to do are replace buttons with CommonButtonBase class, do some data entry, and set some overrides.
Past that the next step is learning ActivatableWidgets, which are awesome and let you delete every call to SetInputMode in your game so that they can handle it.
CommonUI's hover/click works by faking a mouse. It moves an actual slate user cursor to the middle of the focused widget.
There are also input actions, which are what you're looking for. These require the above mentioned activatable widgets. As you put input actions on your widgets and the game viewport router catches them just before they're sent to the player controller. So you don't need focus for them.
Past that they have some nice widgets like the lazy image and the inputactionwidget.
That's a ton of great info, for real. Thank you for that! I thought I'd have to replace all of the UserWidget with the CommonUI User Widget as well, won't I?
Being able to fake the left click with a controller button would be a quick fix to making it work with a controller haha
No. You still largely use normal UserWidget. You'll need to reparent some major menu widgets to Activatable ones. You never really use the CommonUserWidget unless you have a special case where you want to put in an input action where you don't use the common button. Super rare use for that one.
My inventory 'slots' are all UserWidgets that receive the mouse inputs and whatnot, but as you said it should be able to mimick thoses using CommonUI over the widgets. I will spend some more time playing around with CommonUI and getting stuff moved over.
That will be an easy swap then. Neatly the CommonButtonBase is a userwidget itself. So your slot just becomes a button class probably. You can use the style assets with it. They're okay. But honestly I tend to just make a blank Style asset with all brushes set to no draw and put a single image widget in that I manipulate through shaders and dynamic parameters. Better visuals and much more performant due to slate prepass.
Really though. I think mostly what you need to do is make your main inventory widget activatable. And for testing drop a couple buttons into it that have the triggering input actions set. If they're set up they should register when the widget is activated and pressing the associated action key literally presses the button like an OnClick. Good enough for a quick test I think.
I'll give it a go tomorrow for sure, thank you for all the help! Wonderful advice.
Not without seeing your code or the component layout of the pawn or anything besides the video
What's the problem, the camera clipping?
I'm having a derp moment. Do you scale the input of Perlin up or down to zoom in?
Intuition says down, but I'm second guessing myself.
Yeah. Down. ๐ I just wasn't using small enough numbers to see a difference.
When im swimming the problem is that when i swim up or down the rotation of the character resets and kinda get the world direction so it just rotates to that. The solution i want is that when he swims up or down it stays the rotation of what the character rotation is.
You probably have orient rotation to movement on
Shouldn't swim up and swim down just add input 0,0,AxisValue?
ok so i would probably have to turn on
yeah so the problem is that you have orient rotation to movement turned on, and your movement is purely up or down
there is no rotation to orient to
I'm guessing it works right if you swim up and down while also swimming forward right?
yes
Yeah that's a really tricky problem
yes because what yaw aligns with 0,0,1?
all of them
or none of them
it's undefined
yea
Try this real quick
okay
Tick -> project velocity vector to plane 0,0,1 -> if length of that result is < some small number like 10, turn off orient rotation to movement
turn it on if it's above that number
Tick -> MovementComponent.OrientRotationToMovement = ProjectVectorToPlane(Velocity, (0,0,1)).Length > 10
okay so i would need to get the velocity and if the 0,0,1 i turn it off
so basically i wouldnt need it on tick just if hes swimming
i got it thanks. I will code it right now ill let you know
For a cheaper check you could just dot product velocity to UpVector and then do an InRange check and set the Orient directly from that.
That'll trigger going up hills
Not really. Not unless you're walking up a wall.
Velocity or normalized velocity?
normalized velocity would work
or check size of CrossProduct(Velocity, Up)
you don't care about vertical velocity, you care if horizontal velocity is low
Right
the problem with the velocity too is when its value of x by example. if i check its less than 10 it could also be +10 or -10 because of the movement axix so that is an issue
length
velocity is a vector
yes
So if velocity, dot product with upvector is greater than say 0.95 or lower than -0.95, you're not moving horizontally much.
Yes if it's normalized velocity that'll work too
Try:
Tick -> OrientToMovement = CrossProduct(Velocity, Up).VectorLength > 10 or so
or
Tick -> OrientToMovement = AbsoluteValue(DotProduct(Velocity.Normalize, Up)) < 0.9
Oh, the abs is nice. ๐ Didn't consider that one, probably cheaper.
You need it on tick because you don't have an "Event Mostly Going Up Or Down"
I'm surprised the CMC doesn't have this functionality built in though
Yes i know i was checking and it didnt have it :3
Lol that needs to be an event now. ๐
Yupp
but the problem is. how do i do it in blueprint? im trying to understand the code here
The BP will look like this
so basically if the velocity is up or down the orient is turned off?
Yes, or if horizontal velocity is under 10
the cross product one will turn it off if horizontal vel > 10
the abs dot product one will turn it off if movement direction is mostly up or down
how can I make my chaos wheeled vehicle wheels not usable after I blow it up?
You either can or can't, I'd guess can't but YMMV
i tried there nobody replies
If you have access to changing the wheel radius on the fly then that can do it for you
ah true.
Then nobody who knows is in there right now probably. What do you have access to at runtime with chaos vehicles?
I just figured there was a way to disable them but doesn't seem like it
Either shrink the radius to almost nothing or make that wheel have 0 friction or whatever
IDK what you have access to at runtime, you'll have to dig around.
Chaos Vehicles isn't great IMO
I only messed with it a bit but it seems both too complicated and not powerful enough
It's modular enough to be confusing, but not modular enough to do anything fun with it as far as I can tell
I dont get how to do this because i dont understand what cross product is
cross Velocity with MakeVector (0,0,1)
or up vector, i think that's a named constant
It'll spit out a vector thats at right angles to Up and your velocity, and the vectors length will be based on how much your velocity and up are at right angles
when you're going straight up its length will be 0
okay so its set the velocity of x and y to 0?
yeah i think so, wanted to like just create a small hiding space that you can atleast look around in but yeah you saw what happens
started UE literally today and dont know how to fix
Start with the simplest
Hey, i can't convert my map for world partition in 5.4 getting these errors. I dont understand what does it mean.
the camera might be literally just going through the wall
dont break any vectors
im following a tutorial on yt and i thought it was the size first so i made it bigger but that didnt help at all
show a side view of your pawn with the capsule and camera visible
camera selected
I am a little stuck. I have a variable in one blueprint (CardHand) named Card Being Dragged. I want to send it to another blueprint (CardPlayed), so I made a Blueprint Interface (DealCard). I am pretty sure I have everything setup correctly, but the testing print statement I have is never triggered. (I will worry about the object reference later) Can anyone help?
idk if thats what you wanted but hope so
how long is the cameraboom
your problem is either the camera literally going through the wall or maybe your near clip plane distance
Probe size and the disired length
12,0
just put it to 0
unless you have some super serious reason to have the camera 12cm behind the head
12cm is enough to poke out of the capsule I think
try making the capsule a bit bigger too, give it like 10 more radius
put the probe size to 0 and increased the scale of my capsule 1,0 to 1,2 still the same problem
chill homie, where tf i find near clip plane? i might be blind
took some time but found it, default is 10
I'm not sure if this should go in #blueprint or if it should go in #animation . I made a first person camera for a third person character, so that you can see your body when you look down. When Idle, the camera faces forward, but when moving and jumping, the body tilts. I have no idea what's going on here
The animation doesn't run weird like that when played on it's own? And the character's stuff is using control rotation for rotation?
i dont think its right because its not setting the value to zero when im moving up'
@radiant talon
is that it?
It's the other version.
okay thanks ill try that
From those two screenshots, you're not actually triggering anything.
Ideally the receiving BP has the BPI while the sending BP does not require the BPI unless you intend to pass data back. You actually need to call the BPI event in the receiving from the sending BPI. Hopefully this video will explain enough for you.
https://www.youtube.com/watch?v=P29oqoJKYrc
Using new way of transferring data between blueprints using the Blueprint Interface. This method relies on Get Actor of Class and seems to work more reliably.
@maiden wadi the animation runs like that regardless.
I watched the video and something still isn't right. If I take the BPI out of the sending interface I get an error when compiling. I made a new BPI since my last message while playing around with things, but the premise of the issue is the same
Why not add a return value on the interface that you can return the "Card Being Dragged"? That way would pass back the value to the first thing calling your interface.
Is the "Event call cards in hand..." the receiving or sending? You cannot put a BPI event as the sending. You need to call the BPI function using another event in your blueprint such as a keypress. Go back to the video and look at around 4:30 in the video and try putting a key press in and see if you can at least trigger your event. Then you can look at a way of replacing the keypress with your own event.
That Event is triggered from a different blueprint. I have a CardHUD blueprint that does successfully trigger the event. (I am not sure if it is because CardHands is in a Canavas in CardHUD) If I implement the GetData BPI (This is the new one I created to pass data from CardHands to CardPlay) into CardHands [Sender] and CardPlay [Receiver], then this works and I see both print statements. The image attached is of my CardHands BP.
I do not think I want to send the data back to CardHands once it gets to CardPlay. At least not currently? I am still trying to figure unreal engine out a bit more before I can actually decide whats best for my intentions
Oh sorry I read it wrong.
All good lol, but if you know something I don't I am all ears. Just trying to learn so I can make a card game lol
Interfaces still require a reference to something in order to call that interface on that particular thing.
So in order for you to call "Call Cards in Hand to Get Played Card Data" you'd need a reference to the thing that implements the interface and contains "Card Being Dragged" so that you can call the interface on it. If you're wanting to pass that data to something else even through another interface, you still need a reference to the thing that you want handling that data.
Interfaces are a means of having unrelated classes have a common way of communicating to them without requiring you to know specifically about any of their classes, so no casting would be required for example, but its also at the cost of not being able to easily follow along with the logic since different things can implement the interface in their own ways. You still require a reference of some kind to the object that implements the interface so you can call to it asking it to execute that interface.
Use get actor of class to reference the receiving Blueprint in the sending blueprint then connect your "Call function" to the get actor.
Okay, I tried that, but I still had the BPI in implemented in the sender. I will remove it and try again
Remember that you only have the BPI events in receiving blueprints, they need to be called from other blueprints.
So I cannot get the actor class because I am trying to send this data from a Widget to another Widget. I forgot to mention this, so my apologies. I see there is a get all Widgets of class. Is there a single get one widget of class?
Here's an example.... I have a class called "BP_InterfaceImplementer" that implements my test interface and it is the only type of actor that is implementing this interface.
On my BP_SpaceCharacter it's calling to the the interface, however, it's only called when I attempt to overlap with something, and more importantly, it's target is the other actor that I am overlapping. If the "Other Actor" isn't a BP_InterfaceImplementer, then nothing will happen, but if it is, then it should print "Hello".
What is important here is that the "Target" of the interface call still needs to be a reference to the thing implementing the interface.
If you're using something like "Get widgets of class" or anything like that, it completely eliminates the purpose of using an interface as you're likely going to be getting a direct reference to the class anyway which mean you could've just used a function or event calls that are present on the widget.
Not much use for an interface here. Card logic should be in an actor or component somewhere. Widgets should only be used for input and display.
Well I want to be able to move the card to a "PlaySpace" which is what I call the Blueprint CardPlay. I want the user to be able to drag the card here and then when they finished placing cards for there move, be able to check if the move is valid and will beat the previous players move. It will be displayed on the screen
Basic drag drop operations can manage that for you for the input.
Oh....so am I just over complicating this? ๐
This is a really complex topic because you never store critical handling logic in widgets. Widgets should always be considered temporary. Like a particle, or a sound. Cards should be stored in something relating to a player/ai like playerstate or a playerstate component. Few different ways to handle how to play cards. But the player's hand of cards should exist as data on the PlayerState/PlayerController, or a component on one of these. The widgets would get that data and display widgets for that hand. When you drag a card out and drop it on another widget or the world to play it it passes that card's data or a pointer to the object representing a card to be used.
I'm vaguely under the impression this is similar to hearthstone?
similar in terms of UI. I want it to be basic 2D ish, but I am using a standard 52 Deck of Cards
If you are still in a stage of not being able to pass data around, avoid multiplayer
Going from that I'd say the same mostly. Cards on the PlayerState.
Some sort of table actor that allows drops with an associated canvas put on screen under most other UI. The reason for this is because the canvas widget can be dropped on when not dropping on anything else. EG you pull a card out but then decide to put it back in your deck. Your canvas widget can override mouse move and drop. Mouse move can send data to the table to initiate highlights or whatever else while moving. Dropped can handle sending the data to the table relative to where the player dropped. The canvas CAN also be the visuals, but it might be worth making the table 3D and doing line traces on drag move and dropped if you want more complex visuals.
Then a second widget with the player's hand on top of that previous canvas that houses the player's card list each with the ability to be dragged. This widget pulls it's data from the playerstate to instantiate the cards to display and holds enough data to pass to the table for use.
After that you handle how cards are played via the table actor. Main reason for this is because this thing needs to hold critical gameplay state which again you never leave on widgets. So you drop a card, linetrace or whatever the table, pass the card dropped data and location to the table. Table rejects or plays the card as it needs.
Cards can be UObjects or Structs. But I'd recommend UObjects personally. They should only house data about the card type. Card type should be stored in static data in a datatable or a set of data assets. So a struct or object housing either a datatablerowhandle or a data asset pointer. You have an array of these structs or objects on the player state. This data is what you pass the table on drop.
Now you have a set of base classes that can make any type of card game imaginable. Can play Hearthstone, Canasta, Poker, Blackjack etc all in the same game with the right setup.
@maiden wadi I'm assuming they have to be constructed if using uobject?
Trying to figure out how people use uobject for inventories
Yeah
I only use struct soo far so I'm still wrapping my head around when people use uobject for inventories
With the inventory as the outer
Ahh
So like initialise them at start of the game for example
And pull the data from DA or Data table?
If I were to use Data Assets (Which I would!) I'd just leave a reference to the Data Asset being used for the item or card or whatever it is. If you made your DA nicely, then when necessary you can call functions on the Data Asset to retrieve whatever data you want from it.
No data to pull really. EG my inventory items are a UObject with a DataAsset pointer, and a list of mutable data. MaxStackSize goes on the data asset, current stack size goes on the object in an array of Tag/Float. Max durability goes on the data asset, current goes on the object.
๐ค I gotta read that over and over again. Thanks guys, will take a look after work
You get a ref to the instance. That's what object reference is
I am also going to have to read through this a little and maybe watch some videos. I am getting the idea I am implementing this incorrectly
Get the index of the instance you want from the array
If u give a case someone may help you
I gotta run
That's cuz u loop thru them all
Again give ur use case and someone may able to help you
You bought 3 apples, and you put them in the basket one by one
U will know which one u out first, the second and the last
Good evening, I am constantly having this problem with UE 5.4 Release (Source Build)
Assertion failed: UniformBufferStruct [File:D:\UNREAL\ENGINES\UnrealEngine-5.4.0\Engine\Source\Runtime\Engine\Classes\Materials\MaterialParameterCollection.h] [Line: 172]
It happens when opening the project at 95% In PostLoading Objects, I have only been able to solve it (Temporarily) Deleting the directories _ DIRNAME_ IN Content, that is, when I delete it I can open the project but the map is without anything, without landscape without objects, nothing you are welcome...
Not much #blueprint can help you with here. I'd try posting this maybe in #ue5-general ?
I did find this on google... Not sure if it'll fix your issue>
https://forums.unrealengine.com/t/keep-getting-a-crash-on-starting-project-in-ue-5-4/1778341
Can you write it over general section? I have some spare time, or you can DM if you wish
I'm going, thank you very much
Can you import/export from csv to DA?
Thats the only big thing for me with the DA vs DT that i can think of...
The editor sucks regardless for this type of data
It looks like they changed physics a lot from 5.1 to 5.3 .
Based of this tutorial: https://www.youtube.com/watch?v=reaPAejLty
Physics feels veeery different.
Its using Linear Damping and Add Impulse.
But now its hard to tweak it to make it feel responsive.
And with physics handle I found some issues.
Is there a best way to do this?
Grab and move object with telekinesis in top down. With some feel of weight. Almost like it falls behind mouse (its how it works now)
In 5.1 I got it working quite well.
https://gyazo.com/c9e1b19e88c1345633fc615e5a355d35
Please tag me in response.
This is more of a #chaos-physics thing
Not directly. I think you could potentially generate your own editor utility function to create/find and populate DAs with CSV data though
Thats lame ๐
I cant imagine there being a better method for adding hundreds of entries
Could automate some of it in editor aswell through some editor util and templated new rows, but beyond that id still want it export/importable
A lil' C++ magic could make it happen
Guess i could expand my imagination lol.
A Lil? ๐ค
I can prob copy 90% of the dt exporter
Only diff for me would me gamepaytag for rowname instead
ok this is annoying
why is the timer by function name not working?
the function name is exactly the same and the first print string is firing
but the second print string does not fire at all meaning something is not working
UE 5.3.2 btw
also this blueprint setup is inside a custom actor component which is already added into the player blueprint
thank you!
where's the second print
this print string should print every .06 seconds, but nope, nothing happens
also, Use SetTimerByEvent whenever you can ๐
why just that?
I've been using it for a long time yes and has worked fine and still does
but I wanna use the timer by function name for a more cleaner setup
Even still, you're better off using Set Timer By Event - you can still feed it a function by using "Create Event" and plugging it in, and selecting the function you want to call.
Hi! What's the different between owner and instigator? Or, why do I need an Instigator?
Thanks
I think Owner is the Actor responsible for spawning another Actor, while Instigator is a Controller class who started the series of events which will eventually result in a given actor going something (e.g. a bullet killing an enemy). So, why do I need an Instigator? How can I use an instigator?
If that work then your issue is the reason why you shouldn't use string to begin with. Typing are error prone
how does a print string break the tick?
You probably just didn't type the function right
the name of the function was copy pasted
A bullet may not have an owner. But it cna have an instigator.
You're right in what you say, but you wouldn't say a bullet is owned by a gun. They are separate entities.
Let's say you fire a shot and then your gun explodes. Your bullet is now gone.
Doesn't make sense.
Thank you. That code is part of the VR Template project. It is strange to set the instigator when, here, they are spanwing a 3D Widget.
That does seem weird.
You probably just didn't type the function right
Why would a print string break any tick, I don't see the connection
is there a proper way to reference any umg widget from the actor component?
this one seems to fail finding the set umg
even tho its set in the player blueprint, it fails to find it
the variable type is Widget Blueprint
yet funny enough, the variable is valid
is it possible to hide part of the mesh with some volume?
The ref will be the widget component, not the widget it's using. You should be able to get the widget from the component ref.
ah I see
Speaking of inventory, does anyone know a sample project from epic to look at? If there is any
Not that I've found. The closest was a tutorial by them when UMG first released but it's not a very good way to make an inventory haha.
Haha I seen the old tutorials, deff not gonna do those
I kinda get for youtube scope, they have to compact the content
Prefer to see a sample project, typically the one that use uobject or data assets
are you sure its widget component that I need in order to send a interface message to a widget blueprint?
Sorry, I wasn't very clear. What I meant was the ref you was using was the component and not the widget. You need to get the widget from the component ref.
All my inventories have evolved to use uobjects. Setting up the system isn't too complicated but the hardest part is getting the UI hooked in.
You can probably have a dedicated object that register changes for the UI
That's how I see one of the guys do it
so the variable type I had set was ok but I wasn't setting the component right?
I tend to just use an event dispatcher that the UI slot binds to.
meaning I can't send interface messages within a custom actor component?
The widget component isn't a widget. It's a component that creates a widget and renders it to a plane. Get the widget component and then get the widget it creates from it. (I think it's just widget)
I would like to see how one using data assets would work though as they're replicated which could be nice.
They are?
yes there we go!
now its working
I don't know anything about multiplayer but it's weird if we have to replicate static data
I think they are. I could be wrong though lol.
Hmm I'm not sure, programming is not my forte
Are u dipping your feet on multiplayer? @dark drum
I've already dipped my toes lol not that any of my projects are multiplayer. I understand the basics.
Very nice ๐
is there a way to change a lights variables (intensity) without the light being in a blueprint?
Not at runtime
Why are you trying to avoid putting it in a bp
I need 4 different lights in 1 bp and need to change the placing for them later on, which is hard if theyre all in a blueprint. maybe theres some other way
Wut? Just place 4 instances of that bp
Or just modify the componentsโ world location within this bp
Youd normally only replicate a pointer to the data
Not the data itself
Yeah, that;s what im thinking.
Like atm, I have a pointer for my cosmetic that points to an address. On Repnotify, Load it from DT
The short answer is actually yes.
If you just place a light into the level it actually creates an actor BP and places the light component inside. You can get a ref to this actor and get the component from it (using the get component by class) and then update the values as normal.
Exactly. I then inject it to my struct ๐
When you just place a point light int the level, it places the point light actor which has a point light component inside.
Static mesh by default have a tag, you can use that to uniquely identify the lights you want to change at run time.
You can then iterate through all of the light and just get the one with the matching tag to edit it's intensity.
Not something I would do tho, can't think for your use case. I will most likely end up with a blueprint if I need to edit the lights (eg, reacting to switches etc)
this worked, thanks
So now you have him using level bp? ๐
You don't need to use the level BP. You just add an actor array/set to the BP in question and when you place it in the level, use the dropper tool to select the refs. ๐
What bp? He said he doesnโt want to use a bp
Cpp class then!
He said he didn't want his lights in the BP.
I think he doesn't want to make the light it self as a bp
Idk how youโd get a ref to a placed actor without actually using either get actor(s) of class or straight up using the level bp, which is how you would get a ref with the drop-down you mentioned
Soft object ptr. Enter the string manually like a boss!
Which would be a terrible thing to let a rookie get away with but idk why Iโm so invested, itโs 3:30 am so Iโm going to sleep
I mean at that personโs level of understanding of UE
You can drop an actor that have the light component variable. Like an array. Then just make it instance editable and expose on spawn.
I would do it this way when I need to grab specific components from the level.
Designer can just make use of the eye dropper tool or the drop down to pick an instance they want
Like this. You can only do it when the BP has also been placed in the level but it allows you to populate actor references.
Ah right, hard reffing in the details panel of placed objects
I rmbr doing that back when I first started
I'm still doing that for area/ level specific stuff. When it doesn't need to be abstract, I would do it this way. Not sure if there is a better way.
Same here. If it's like a scripted event, I don't see any point doing it any other way.
it kinda make sense to pick from the level right away in some cases. Like a switch and a light, the designer need not to know the code.
Just pick a switch from the level and pick the light that it want to toggle from the level.
Yea, you could still choose to populate the array/set dynamically if you wanted at runtime as well. If you had another way to get the refs you needed at runtime.
hi, can someone help me? I have child actor setup in my character, when I pick item or select it from inv it changes, but actor fell off the hand (socket) to the world:
did you attach the component to the socket? I won't comment much about Child Actor Component because I never used them at all. There are bugs associated with them and the wise people says to avoid using it.
yes, its in the socket. I was hoping that help, but... I think I just do fast spawn, attach, remove magic
I don't think you need to use Child Actor Component for such cases?
just spawn the actor and attach the spawned class to the socket.
The actor most likely has physics enabled which is why it's falling down. Also, there isn't much point using a child actor component, you can just spawn the actor when you need it and attach to the relevant socket.
I even turned off physic, but it stayer in space after moving ๐
Last night I decided to change it to spawn+attach, but found that theres this DC and decided to ask wisemans
lol, its funny but it act the same way ๐
Hey, I got a few questions.
Some background Story:
I've been working on a full on 3D remaster of a game called "Hexen - Beyond Heretic" in shape of a mod in GZDoom (a doom game engine).
This is it: https://www.youtube.com/watch?v=IXosmbbl6v0&ab_channel=EmmanuelEXE
Hexen - Rebirth of Cronos v1.0 Trailer
Mod released!
https://www.moddb.com/mods/hexen-rebirth-of-cronos-version-09/downloads/hexen-rebirth-of-cronos-v10
Some parts are from fan expansions too, to show it works with it.
Expansions in the video:
Shadows of Cronos, Scourge of Viscerus, Cyrgorth's Revenge but some other can work with the mod!
The...
So here the questions ... I want to make a game similar to Hexen - Beyond Heretic in Unreal Engine (not a remaster, basically a completly new game not related to that game in the video).
Will that be an intensly complicated thing blueprint wise?
Would someone be able and willing to help mea learning how I'd setup the Hud Weapon system for Melee and Ranged for one Character Class?
For the learning part I'd use these 2 Weapons of my Mod Project:
https://www.youtube.com/watch?v=558vbWlfW6E&ab_channel=DaXx
Pretty simple. Just copy shooter game and add weapons and monsters?
Is there a way to attach a 3d vector widget to an object but have it remain at 0, ie only transform locally. I want a widget to not get left behind by a part of a BP
Or I guess just offset a 3d vector widget by something else's transforms
When you say remain at 0, are you referring to the world 0?
Exactly not, I want it in X position but to have all it's transforms be 0 - or at the very least since it's a vector variable, offset by location x. My goal is to make an aim controller effectively (for cinematics) where a joint moves with the 3d widget, but I want it in front and to move with the characters head. Control rig could work but there's a lot going on already in the BP.
Well, that might cover a ranged weapon for sure, but a melee one?
there isn't starter for melee, just need to make logic in BP
there's plenty of ways on YT
Ok I might check that then
guys is there any way i could clamp the rotation lag of the spring bone? i still want a slow sway but if i move the camera too fast i can see behind me
So I was wondering, since I'm doing RTS game I will have a lot of units / characters. Let's say 30/40 per player at max an in the biggest case 8 players. And now I heard that if I will use characters it will not be optimized. What I'm thinking about is that, the problem with characters is with the character blueprint itself, or it's just because it uses skeletal meshes? So the problem is with the skeletal mesh and I still should use character blueprint, but I will just need less heavy ''unit mesh" so it's all good? Or it's both combined?
Character Movement Component is pretty heavy for RTS
it is designed for Competetive FPS
Use pawn
Okay, I will look into that
also if you were hording assets from epic there's npc optimalization plugin for large numbers of npc. helps a lot. I had over 500 npc with eqs and AB on and it was around 50 fps, and map was also smaller than for rts
So I guess the biggest difference would be that character movement is already built to be replicated and with the clear pawn I would have to somehow replicate movement myself?
Do you mean that ''ant'' plugin one? Or something like that
I don't imagine replicating that many data every frame is a good idea
best to ask in #multiplayer but my guess would be to have some sort of simulation that can be played on client machine. Eg, Having the Units as a one cohesive group which moves toward X point in a certain manner (formation, etc). Server can just replicate one point and then the client will handle the movement locally ๐คทโโ๏ธ
Fortnite works allright with 100 players, I wouldn't set my target higher than that
I mean I already have selecting and moving the characters etc, but I guess without character movement it's a different thing? I cannot just kind of copy what I already have in my BP_Unit_Parent class and expect it o work? Also it's a RTS game so it means there is 2-8players and each of them controlls 20-40 units (characters or pawns as you recommend).
you can try, but I don't imagine it will work.
Test in package ofc, not editor
from what I heard CMC is too heavy for massive units. True it have multiplayer functionality but again, it is designed for Competetive FPS, not RTS with hundreds of units.
maybe try this, i don't know how well it works in multi ;/
but yes, grouping would be way to go, reducing replication intervals and other optimization, you can also change scale from 8 to 4 players or anything between
Hey, still a beginner over here and just looking for some advice. I've been trying to make a movement engine and fit a 180 turn in it (First Person) and since (I'm assuming) the character BP uses controller rotation yaw, I can't seem to get the camera to turn 180 degrees with the mesh, thanks for any help!
so the problem with optimization is just the character movement component or the skeletal mesh? What If I use lighter static mesh like idk stylized art or low poly. Does that change anything? Damn, why is this so complicated...
Try to parent the camera to the ''component'' you are rotating.
its amout of data to replicate over network
I've got the parent socket as the head socket, but that's not doing anything, should I try parenting it to the root maybe?
skeletal mesh sits on local CPU
I know what it looks like, i parent camera to head for natural movement, but if character die or lose control it stays, you can try to disable movement > set camera position >enable movement
ok I'm gonna try that for the rotate, I'll let ya know how it goes
or another thing I have in mind, maybe better for long term. controls that you dont control camera but character itself, camera is just sticked to it
oh damn that's actually a decent shout, I'll give a try on both options see what works better
used the control head method, the camera is 90 degress angled rn but it works better than before! thanks
I have a bug with Streaming Levels related to Landscape.
Video showing how this problem manifests itself:
https://www.youtube.com/watch?v=fLNFAUM_lBw
Detailed description of the problem:
After loading, unloading and re-loading a game level using Steaming Level, the Landscape of used stream levels disappears. In this case, fragments of the Landscape (chunks with textures) often remain, but a landscape collision still does not appear.
The problem manifests itself in any project.
Conditions:
- Unreal Engine 5.4
- Load Stream Level and Unload Stream Level functions in BP are used.
- World Partition is disabled.
- Tested with both Actors and Pawn.
- The code for calling the Unload Stream Level and Load Stream Level functions was split into separate independent fragments and files - this does not help.
Is there a solution for this problem? Does it show up for you?
Thanks for help!
Problem:
After loading, unloading and re-loading a game level using Steaming Level, the Landscape of used stream levels disappears. In this case, fragments of the Landscape (chunks with textures) often remain, but a landscape collision still does not appear.
The problem manifests itself in any project.
Conditions:
- Unreal Engine 5.4
- Load Str...
Hi everyone!!
I'm trying to get this Sims 3 Camera Movement and I'm close to getting everything working but the problem I have is that the adding of controller Yaw and Pitch Input is triggering whenever I hold Left Click and Right Click, but I only want it to continue working for when I hold the Middle Mouse Button. Is there any way to disable this feature for the left/right clicking?
My only thought is that I'd have the boolean Use Pawn Control Rotation be disabled by default but be enabled only what I'm using Middle Mouse Button to rotate the camera. Any help appreciated! :>
For me code to load/unload looks have not much sense, its on event tick and have empty calls, make prints for debug to see whats called. but I dont have much experience with level streamer ;/
ad input for middle, flip frop for bool
not flip flop, set on press and release
made it work...but it's roundabout like equator xD
I'm getting this error. But I don't understand why it changes sizes after re-load?
LogLandscape: Warning: Landscape proxy (Landscape_0) scale (V(X=100.00, Y=100.00, Z=100.00)) does not match to main actor scale (V(X=1.00, Y=1.00, Z=1.00))
I don't think you can do that by default. Give it time though and it'll probably be a thing. But IMO there are better ways. You can make your own Editor Utility Widget that takes in a block of text or a file and parses it. There's a SetEditorProperty function you can use. So you can easily grab a bunch of DAs, and export properties by name and value, edit and reimport them.
i dont know, maybe force scale upon load
bassicly i want the ai to be able to walk into the room this door opens by the ai going into the box collision but i cant get green nav mesh thru the door
brush size in nav mesh?
ok im very new to unreal how would i get to it
I think you can use NavLinks for AIs to open doors
i used navmeshboundsvolume would it be in brush settings
when you place volume new actor spawn in outliner
sorry abt this but which one im uhh not the brightest
found it
Yeah ill look i to that when I refactor it current setup with DTs work fine but the constant row name -> gameplaytag conversion is meh . Not really fan of the row handles either
I also wanna try out instanced struct to avoid carrying more crap than i have to but feels strange to use
My ai has stoped moving
Can i create a parent for them to have common "transform". Root has only scale property. I need pos, rotation and transform. While moving train, what should i give reference to the Set Relative transform for example then?
I dont seem to understand which transform they share. For example the scene instance of a train has location rotation and scale but in here, only static meshes have them. Not the root or train
Thank you!
DTs still work for some things. I use them for stuff like crafting recipes. Which to me are just a struct of Input array, Output array and time required. List of data that is all the same and would always need to be the same.
But like thing definitions, I'll always go DA. Things can vary wildly with the kind of data you need to associate to them. Like a weapon needs very different things than a crafting table. But I can still inherit from a core set of DAs get get all of the things they have in common like name/icons, gameplay actor, associated tags, etc.
Plus yeah, the row handles are annoying. :/ Specially in UI. With DTs I just throw all the data assets themselves in a listview. With structs I have to actually create a whole new UObject to pass it, or construct each widget manually. Bleh.
nvm
Hey folks, Im trying to learn how to manipulate cameras but not finding a lot of resources online. so a couple of questions here:
- for the camera to update and lock to specific platforms (2d platformer), im guessing a collision box or on-hit event with the floor is the way to go?
- is there a way to set boundaries for the camera? Like it cant go further left/right or up/down. would these be level bounds? collision boxes that can block cameras? or maybe the end of a spline?
Right now, i built something that kinda works but isnt great, and im worried its a bit too much to be bound to an event tick node
i suppose in other words.. to set up constraints for a camera, is that something i have to do in blueprints, or are there collisions that can block cameras, or would i use a spline/rig-rail?
Do I need to dip into c++ to create a bp function with a wildcard input? I don't like having separate inputs for the supported data, an integer or a float; It feels messy.
would anyone know how to make the navmeshboundsvolume go through the door
Hmm not sure i understand how you avoud creating each widget manually?
ListView/Tileviews.
Why can't I use a double precision float on a switch Efloat Types?
and follow up question why can't I convert a double precision float into a regular float
Is there a curve asset that lets me have more than one curve defined?
Right but internally there then you gotta do a bunch of casting or smth ? A superwidget of sorts?
maybe just make a custom event, and run it
i don't think there is a portal, but custom event is probably closest you'll get to a "portal"
"In Unreal Engine 5, all float variables will be double-precision. When the blueprint is compiled, the float will be casted to either be a single or double floating point number based on it's value."
if that's the case why wouldn't the switchfloat work with a double?
idk, i just saw at some point that they are considered doubles
just looking around online briefly looks like wildcards are done in c++, doesn't look there is a blueprint only solution for that that i can find
Okie-dok: visual studio and I will throw hands, then!
Putting together a blueprint function library in c takes a little bit, but once you get it going and see how things work it works great
Thanks! I might as well just expose the hexadecimal conversion as well. It's weird that's not included outside of RGB color related nodes.
How do I get a seperate blueprint to read the input of the player?
by seperate I mean seperate from the actual possessed player mesh
possibly cast to it, and run an event on the other actor ?
You don't tho. If you want to have to control the pawn not within it, then do the binding in your player controller
Also don't use the legacy input, use enhanced input
Okay, thanks.
are you able to screencap a quick demonstration of how this looks in blueprints?
no worries if not
Create default template, thrid person or fps. If you are in UE 5 they will use enhanced input
ahhh im trying to learn how to make it from a blank project rn
just so i understand what goes on under the hood a bit
I've got a pawn and controller made rn
The aim to create the template is to see how its done
You can replicate that to your blank proj
is there a better way of tracking the cursor 'type'? im replacing the cursor with my own and i was wondering if i could get away with using just one widget instead of having a separate one for each type of cursor or whether i should just make a separate widget for each after all
this doesnt even seem to work anyway
Can someone explain to me why this isn't working?
I want to trigger an event in one blueprint that gets used in another.
is it saying failed ?
yes
because the actor reference is either not set or isn't a game manager object.
A reference is like an empty box with a label on it. You have to put the object inside or it'll remain empty.
guys i have a question why when i duplicate my BP, the copy is just broken and unusable? any ideas why?
probably references, did you copy variables ?
So I need to reference the Actor itself? I was under the impression the cast Object was just looking for the type of object it was referencing.
The cast just like checking the label. You could have a box labelled Vehicle of which you could but any vehicle inside. A cast checks if it's also another type such as car, plane or motorbike and then returns an updates ref type so you can call specific class functions.
Actor is a generic class type that you can store most things in it (that you spawn in the world). Casting just allows you to check what type of actor it is.
You still need to store something in the ref or it'll be empty. (null)
Because you use self as an input for some function. Because you duplicated the BP, the duplicate isn't the same type that self is being connect to.
i try to create a new reference to self but i cant, do i have to reference the original?
You have a function that's asking for an input of type Class A, but as the function is being called inside Class A you just use self. You then duplicate Class A which become Class B. That function still wants Class A but is now being called in Class B meaning you're trying to pass Class B into Class A.
Hopefully that make sense lol.
So i just need to make a reference to the Actor itself and not just the Actor type as a whole?
No, you need to set the reference. You've made the box, you just need to put the object inside it. (like a set of instruction on where to find it)
i do get it, now im trying to fix this, for some reason its not being easy
Does the input on the function need to be a specific class type? (Class A) If it doesn't need to be, you could set it to Actor which will accept any actor. (child of actor)
ummm i tought of creating a child, but my objective is the following: i have a cube when you click it, makes a quick animation; changes the user pawn and other stuff related to the other pawn, my objective here its to create another cube where you click it, it can do the animation, but not change the pawn
i believe i can set a bollean for this right?
issint it easier this way?
is there any way I can change the text on a widget each time a build a package? I am trying to have version numbers on each build.
Depending how you've structured you're class A, you could create a child of it. Class A.1. You can then override functions to change it's behaviour.
sorry allow to correct my self the cube dosent create another cube
Does anyone have much experience with GUIDs? I have this to generate a new GUID if it's not valid but when I reload the editor, it's not valid and sets itself a new GUID on load.
Ok so I set the Actor Reference variable to reference my game manager object and it's still failing. Am I meant to reference the object a different way?
it's set as an object reference
All you're doing is changing the label on the box. Pull it into the event graph and use the set node to place something in the box.
Never dont this before
Like this?
Sort of, you would probably benefit from watching this. It seems like you don't yet understand the basics of BP communication.
Announce Post: https://forums.unrealengine.com/showthread.php?101051
This Training Stream takes a look at Blueprint Communication. We find that Unreal Developers of all levels can sometimes struggle through the concepts behind moving data between objects. So in this video we'll take a look at the different ways to make Blueprints talk to one an...
Now you definetly sett it to mothing
lmao I definitely do not
The note probably says it's already that type?
he didn't connect Other Actor to the node with SET reference
i did it i manged to fixed it; ty for the help @dark drum: i did the following i added this:
and thats it
Is there a way to get all components of a specific class? It's an editor only function type of thing.
You have to cast whatever is passed through the generic functions to the object you use. EG if you make a tileview of a bunch of inventory items you would cast the passed object to your inventory item and pass items to the tileview.
Are you looking for classes or components on actors in a world?
Well I've got this so far but it might be the only way. But its for components on actors placed in the world. It's only intended for calling in the editor so I'll probably just leave it haha.
I was settings the GUID's on construction script but when i restart the editor it is (probably for a single tick) invalid so gets regenerated which causes some problems so just want to be able to do it all in one go.
This math is NOT doing what I was wanting it to do. Here's a representative piece of logs.
RelativeTestTarget=X=-2013.085 Y=-7574.986 Z=2801.068
TestTarget=X=-4294.002 Y=10683.955 Z=-474.450
ActorTransform=Translation: X=3280.984 Y=7834.252 Z=-2418.077 Rotation: P=20.000000 Y=-90.000000 R=0.000000 Scale: X=1.000 Y=1.000 Z=1.000```
Looking at the Y values in particular, I'm expecting this to return a point that's FAIRLY near the center line of Y=0. The Y of the ShipRoot component is 7834, the pre-transform Y is 7574, the ship is pointed ABOUT 90 degrees left, so it should be like `7800 - 7600 ~= 0` Instead, the resulting Y value post-transform is 10,000
Yeah, about the only way to do that without C++ which would let you just grab all of those instantiated components quickly. It's a bit nicer to be able to use resolvable names than GUIDs though. Lets you replace saved pointers. ๐
It's just for saving generic states where I don't need to know what it is, just needs to be unique lol.
Can I use Min and Max floats things in this situation? If yes, how do I use them?
Probably clamp ?
ahhh clamp was it, thanks
you'll also want to switch that to a timer
hi guys, is there any way i can make a simple camera lag with this configuration? i already have tried the spring arm location and rotation lag but i am searching for something more controllable
what do you mean by timer?
Set Timer By Event
how to use
I do the same with my savegame system. It's basically a struct of Class, Name, uint8 byte array for savedata. System checks the current world by name to see if that actor/component/object exists, if not spawns it. Then writes the byte array back into it through the serialize function. It's amazing not having specialize structs to save everything.
MathewW has a great video on it
where can I find him?
Thanks G
Hello people, im a newbie trying to get an inverted mouse hotkey ingame. Im not sure if im even going in the right direction
yeah you start normal mouse settings untill you hit the hotkey
He means the hotkey.
ah yeah
You most likely want to not the bool so it flips off and on
Yea, I do something similar for dynamic items that can be spawned in the level. It is nice not to have to worry about it.
it works like this. Not sure if its clean or not. but its fine for now. Thank you
Hi! I have an actor with a Impulse at Location node who is working on BeginPlay but doesn't work if I call it from a custom event, the cast is printing properly but won't run. It's a cable with a static mesh under a scene component, I tried also using the cable as root but without luck. The SM start with physics disabled, and back to enabled before the add Impulse at Location node, any guesses?
show more of that code
I don't see a less than anywhere
show code and component layout
I'm getting closer to isolating my weird transform issues. Why the heck aren't these arrows pointing in the same direction? Red one is attached to the root component of this actor, no scale or rotation changes. Blue arrow is drawn with an end location based on the actor's forward vector.
For one thing you normally add end to start and plug that into end
But the point is the duplicate the code elsewhere. I've got that code that SHOULD be getting a point 2000 in front of the actor, so why's it off to the side?
Well if you do it correctly I can only guess you forward is not what you think it is
I can even duplicate the issue using the transform OF THE ARROW
How can the forward of an arrow not be what I think it is? It's an arrow, the ONLY thing it does is point forwards
You ever have one of those "What the fuck am I even DOING" moments
yes it run, at least is what the print says
weird that it works on BeginPlay
~~maybe its relative and needs to be converted to world?~~nvm
Why doesn't it show options to let me set the character mesh?
Because it's it's bug in ue
simulate physics runs the next frame
so try adding a delay node
"delay until next tick"
is there a way to get a "free camera" in PIE while its running?
f8
its called eject
The actor transform already contains the forward vector, so when you get the forward vector and then transform it you're basically applying it twice
awesome, that worked exactly as i wanted
Anyway I can fix it?
Or else, it will be rather hard to set a character mesh and that's rather problematic.
Try to create a new one or switch to backup
A new class? Or project?
Ok. Phew. That's easier.
Good time to start backups or source control
Do they know it's a bug?
I'm having an issue with projectile component, getting errors when my arrow sticks into objects.
No clue
I hope so.
Those errors are a pain, but they usually mean that a value is "Empty", not null, empty.
The node is Stop Movement Immediately but the problem is not the node itself, rather I think itยดs the target (Projectile Movement), the ProjectileGravityScale I donยดt see in the images.
You are either not setting a value, or itยดs related to some casting youยดre doing
ah okay, so should i set the projectile gravity scale right after adding in on the arrow
well i'm adding the projectile movement comopnent as soon as i spawn the arrow
well actually as soon as i "release the arrow"
Is it not good enought o set those valuse in the add projectile component node?
But Iยดm pretty sure the problem is with a empty value of Projectile Mov, maybe someone smarter can chime in
appreciate your help
Is the projectile a spawned actor?
Hmm so you spawn the actor, and then you add the component
that is how i am doing it
go to the parts where there are errors and check for is valid
You made the component a variable right?
Maybe when setting the gravity, you were using the variable with the empty value and not yet the value after it had been set
yeah possibly
i might have just had to refresh my nodes?
but seems to be working now i think
yeah seems to be working now, no errors, thank you
really appreciate your help
thank you
Hi everyone, I'm a neuroscience graduate student working on an Unreal project and I'm quite new to the system.
I am trying to make a set of "star" actors using my StarObject_BP. When the game begins I want to randomly select one of the available instances of this object and execute the logic after "cast to StarObjectBP"- basically make it light up for a second and then turn off, then wait for 3 seconds and repeat the process. I am getting quite confused as to where I need to put that logic; whether it's in the level blueprint or in the actor blueprint itself as I have here. I would really appreciate any help. I'm able to get it to work when I just run it on one specific instance of my blueprint, it's making this change to randomly select from all of the actors in the scene that I am having trouble. Thank you!
if you are doing it like that it would better fit in level bp
because you are getting all actors of class and casting
For one thing your missing a execution line
didnt even notice that ๐
also if you want to repeat the process, i would call the event again or put the delay execution node in get all actors of class
but first way is cleaner
oh wait
you have a timer
nevermind
I am definitely missing a lot of stuff. Would you recommend moving this entire schematic into the level blueprint? and @lofty rapids the missing execution line would need to run from the Set Timer by Event node to the Get All Actors of Class node? Apologies for the stupid questions, as I said, I am very new to this.
from get all actors, to your cast, so that the execution keeps going
no, just connect get all actors from class to cast
i mean if you are switching levels, i would keep it in actor bp
usually in here i see a lot of don't use the level bp, but if it's level specific ig it doesn't matter
i would probably go with a manager actor or something
does he have to cast to it if he gets the actors?
im not sure
i think so because the output is just an array of actors
yea but output of random
i don't know if it's the specific class
if it's not the specific class type and just an array of actors then you'll need to cast
literally the problem was that I didn't have an execution line from Get All Actors of Class to the Cast node... 
connect get all actors of class -> cast and compile and tell us if it says "NOTE" or "WARNING" under the cast node
yea we said that lol
I know, thank you!! It works now within the actor blueprint. I really appreciate it.
also i would figure there would be a note that says you don't need to cast it's already that class
would if he compiled where the execution line doesnt cut
but if its cut it doesnt note
Yes there is a note. So how do I deal with the random selection / get all actors without casting?
so uh, you do not need to cast because you already know that is the actor you want
it's already that class
also isnt this changing all the lights?
because he doesnt reference a specific object
Shamefully I am doing that because I can't figure out another node that can take the object reference here
get illuminator from the random node
is illuminater supposed to be the random one ?
drag off of random and try to get illuminator
I want a random instance of the StarObject_BP, which has an illuminator built into its blueprint. I want to randomly pick one of those and turn on only its illuminator.
yea, drag off of random and get illuminator
try if it works
and then plug that illuminator into your target pins
Cool! You all are awesome, thank you so much ๐
looks weird what is the second illuminator ?
the first one is off the random, but the second one is just a random variable ?
nice, also connect the second one to the first one too
dont leave the second one to be just illuminator
was just about to ask one final question on this - corrected that reference thank you. it seems like the random is sometimes picking more than one out of that array i.e. more than one star lights up sometimes. is there a way to enforce a selection of only one?
Shouldn't be doing this code in this BP. This code should be nothing but the timer, Random, and a function call to start the intensity stuff.
As in a function call inside of StarObjectBP
Shouldn't make a second class maintain the state of another class.
that sounds odd, it should only fire off on the timer, and just set the intensity of one
hmm
is any other code doing something similar ?
I don't have any other code in this level right now, just building this out. This is the only blueprint in here besides the default VR stuff.