yeah, @lunar sleet is correct, dont use pool and light as two different Actor, just make one traffic light actor, then place them in the world and have it change color,
Now you can inhertiance or some kind of design pattern to save all the traffic lights instances inside some other manager class, so you can communicate between the traffic lights
#blueprint
1 messages · Page 34 of 1
So you mean inside the original BP_TL_3 that I should add the SM. But what if I then want a longer poll?
(Sorry if i don't understand, I am new)
So one actor for whole traffic light.
Traffic light :-
- Change Light Color.
- Change Pole Size.
- etc.
Add these features for you Traffice light.
Make the parametes Instance Editable
Each instance you place in your world can be edited
You can also make more children bp classes (not CAC!) with shorter or longer poles
So you can have BP_PoleBase as a parent of BP_ShortPole, BP_LongPole, etc
Now whenever you place them just change the Editable parameter for Each Instance.
Like Height fo Pole, Default Color etc.
Now manager Class to handle runtime Traffic control
You can use as @lunar sleet suggested or you can expose parameter, both will work.
Manager class is only required if you want to control the Traffic in Runtime, like an actual traffic control system.
Ahh okay, thank you both very very much!!!
Thank you very much! That setup worked pretty well
There is a second where a car can pass the green light that at that moment turns red. Why does the begin overlap action last so long that it is able to hit both True and False?
It only last one frame
Your delay on the other hand lasts a second 🙂
Or rather is executed after a second.
Yes, but On Component Begin Overlap is hit and the True option is executed and then the logic should terminate, but instead it also executes the False some seconds later.
It triggers false first
Which sets up the delay
What id do
Is on overlap
If light is not green
Subscribe to lights "changestate" dispatcher.
React to its broadcast 🙂
In the first frame of the overlap box the bool is true. Why does it check again the next frame?
Possibly once per component/actor
If char and car are separate actors f.ex
Print overlapped components displayname
And/or actors displayname
hm, it's called two times.
I have a box collision on the traffic light.
That calls the On Comp Begin Overlap above.
The component overlap could very well trigger twice if it detects multiple components on the same actor, make sure only the box can collide
First Change your enum check, dont convert to string just directly check if it is green or something else.
its making my eyes hurt😁
yes done that sorry haha
I am not sure what that code is doing, can you explain what you are trying to do, if you only wants to fix your overlap just check @lunar sleet what this guy said
The problem must be the car box collision so that the car does not crash with the car infornt of it. This must trigger twice.
Linetrace ?
Easier to do this with a trigger volume no?
Less prone to misses i guess
Like the box should be in front of the traffic light and it only needs to check actor overlap with car
I think theres a box for the light aswell
^ see hieriarchy
Yes, the car needs a collision as well, because the second car in line does not collide with the traffic ligth box, but with the car infont of it.
I am still not sure what is the end result, am i missing something, Do you want to stop the car when they overlap and light is not green or something
I want to stop on red and go on green. But for some reason as seen in the video if a car passes on yellow it is still caught and stops in the middle of the intersection.
You shouldn’t need a box for car collisions, pretty sure they have physics enabled
But then if one car stops the next one is going to crash right into him
Ah you want the stop behaviour
That is life
K well from what I’m seeing your collision checks the wrong thing
You’re checking “am I overlapping the car actor?” Both the car’s collision box and the car itself will trigger that, because you’re using component overlap with other actor. So your car actor overlaps twice. You should be checking if the TL’s box collides with the car’s box, and then use other actor solely for calling those functions
how to set minimal resolution size for a "window mode"?
Something like this, right?
right
this should be checking if the Car Collision Box of Other Actor is the same as the ``Other Comp` and only then decide
This worked with two Branches.
How would the next car know to stop for the previous car?
Switch on light enum 🤩
Ideally, all of this should be done from the car’s end
Every car has two func for its car collision box
Catching other cars and lights? Yeah
With cast to traffic light and on cast failed, cast to car
@plush knoll i agree here you should make all of this inside car, makes more sense
because its not traffic light which stops the car, its always the car which detects whats going on and stops accordingly and in real life scenario on yellow light some idiots try to jump it.
Yes, that makes sense. I will do that!
So make car understand if there is traffic light ahead, if yes whats the current state,
if green move, if red stop, if yellow (accelerate and try to jump, kidding)
and for the cars behind they should focus on Traffic light + car infront of them.
or maybe car infront of them.
yes that good! but i would still need the box collision for traffic light right?
I dont see why traffic light would need collision, because traffic light role is just to change its state according to traffic control system, thats it.
Its the car which should follow the rules of traffic light
So car should detect if there is a traffic light or a car infront of them, then behave accordingly.
Yes, but how would a car see that it is near a traffic light if not for a box collsion for it.
now car should detect, so car needs to have collisions or Line traces or some other way.
so car detects if it is near Traffic light
Ah okay got it. thanks
Good luck
How would I attempt to parse a float from a user-entered string, and provide a default value if the parsing fails?
Why dont you just promt them to enter float?
Or you can check for to now allow characters in the string
So there is some kind of editable float widget?
Well i used cpp to do the check, they have handy helper to check if a string is an alphabet or if its not numerical
this is a truly basic UI programming task, that I should not need to resort to C++ for
You can write some primitive function if you want in bp
Is there a builtin way to enforce that they only enter a float?
bc I don't want my code to break if some goober types in a random string
Built in, in bp. I dunnoe
a good UI should be idiot-proof
well there is https://docs.unrealengine.com/4.26/en-US/BlueprintAPI/Utilities/String/StringToFloat/
not sure what it becomes if it fails
String To Float
Lemme test it real quick...
Is there any debug mode to switch all the material to a single specific material? Just to check the lighting and shadows?
What if u type 1jtifi45?
This enforces a number, not necessarily a float. You'd need some additional logic to only keep the first . entered and you can set it back into the text field.
I mean ideally u dont want the user to be able to write alphabet
Nah, I'm fine with them being able to put it in there, since I'll just reset the value to default when they submit it
If im the player in your game, i will fall into rage. Just saying
But I want to use my own material not lighting only view mode
not sure how to determine if it is success or not, it just says 0.0 for string of chars
Ohh nice
@flint night look at @dawn gazelle suggestion
I have
What would you expect to happen if you try to set the game volume to "haha funny string"?
Get the string, check the last element. If not nuneric. Prune it
I expect the game to not let me type in alphabet
I will be very very unforgiving if im allowed to do so
isnumeric and string to float combo should work
yes but that is overkill for this. I just want to avoid it doing some kind of undefined behavior mystery nonsense
yep, that is what I will use
Im talking from user perspective. Wether if its inconvinient to the dev aint my issue if you want honest opinion
actually wait nvm @dawn gazelle posted a way to do that
I was specifically told by my boss to not spend forever polishing this, and I am already pushing it
We're almost certainly going to overhaul this menu before release
I am very concerned at the state of the game if i need to type the volume or able to type in alphabet
I got mixed up and thought that was just to validate it on enter
Why not use slider?
there is a slider
Heyy, is anyone familiar with Cartoon Water Shader from SandVector Studios?
this is just so that people can put precise values
Check on text changed
If numeric do nothing if false play error sound. Remove last character
I need some help with the implementation of Ultra Dynamic Sky to the shader
If its still not numeric, remove the next one etc. Altho that wont happen unless they paste
I can't seem to find the "Replace Characters" function
Ah sorry.. It's part of a plugin ._.
I think I can hack something together with just the isnumeric node tbh
Squize and i told u how to do it.
Its as simple as it can get
On texr changed, if commited, if not numeric. Remove last character
Profit
that doesn't work lmao
Skill issue then
If you use IsNumeric, you should be able to use a variable to store the "acceptable" state of text box. If IsNumeric returns false on value change of the field, set the text of the field back to the acceptable state. If IsNumeric is true, set the acceptable state to the input.
what if the user modifies a character in the middle of the string?
You can always check the entire string
On text changed
Only allow numeric and .
And one . Only
Datura has already given me the information I need to solve this. I don't appreciate you lecturing me on basic programming, especially when the code you are suggesting is flawed
Okay
Isnt there simply an option for pure numeric input?
There is read only and password i think
Shame
Not sure for number only
Tldr : it doesnt exist out of the box, this suggest caching last valid entry
Which id say sounds acceptable
how can i clean up that a bit?
You can call getters as many times as you want rather than using spaghetti
Like get world delta or get head bob speed
Should prly also move the True code at the top or use NOT bool to inverse the pins
probably a dumb question - attaching a camera to a pawn's capsule, the capsule has basic player movements, however the camera is not perfectly still when moving, and it gets worse the faster the pawn is moving, there are micro jitters pretty consistently if you pay close enough attention. what is this?
this is for first person specifically
Are you using a spring arm?
happens with both spring arm and without, not affected by camera lag settings, it's almost like the roll axis shifts just a tiny bit every once in a while. it's not incredibly noticeable
Weird, what are you using to rotate it?
mouse xy 2D-axis - it is weird, it's minor enough that a recording probably wouldn't pick it up. was hoping it was some sort of known phenomenon, I'll need to do some testing on fresh projects I think
Adding rotation lag on spring arm saves me from shitty jitter the other day
Good morning everyone! I've figured out the math side of things for overriding default character movement, and next I need to create a modular state system of some kind to pass values into the custom movement component.
I'm still learning the engine, but the approach I have in mind is to create some sort of data asset that passes values into the script, maintain a list of these on the character, and have other scripts trigger these by name. Does this sound like a sensible way of handling things?
Extending cmc is not blueprint territory imo
can i maybe replace branch with smth else here?
so i dont have 2 setters
Idk you showed everything past the branch, not sure what it checks for
A select node.
If I followed what you did correctly, this would be the simplified version.
Right you are.
Also...
You dont really need the check
If headbobamount == 0
The input value is... 0...
i just got that myself 😄
next time i will organize from start, refactoring it takes more time
That's what they all say
i didnt even do much haha, cant imagine someone making full project with that mess
Could be worse.
Need to expand the imagination to include more spaghetti
17 functions would wip that spaghetti into a bowl
You know it's getting bad when your blueprints actually look like how a brain's neurons would be connected.
And the same events randomly fire a tad differently because of some hidden enforcement factor
while on it, is it okay to have multiple events instead of functions?
how can i duplicate existing widget in runtime?
If you dont return anything, its not a function :p
do I have to create a new widget and set the same variables in it?
I hope there is something better
99.9% sure there is nothing available in blueprint to clone a widget.
ok
Likely not complex in C++.
Is there any concise way to get the mass of an Actor without iterating over its components?
I'm workshopping n-body physics, where there are two custom components, GravityEmitter and AffectedByGravity, they mostly mark their actor for the effect and add themselves to a GravityManager actor which does the event tick.
In the event tick I'd like to pull the mass and CoG for each actor, but does this require going over the components? Perhaps then I should have the gravity components grab the components themselves to have available.
I don't imagine any actors having more than one primitive component but who knows
okay another spaghet, needs combining
well that third branch at the bottom right is useless
Can I create something like this in the structure?
Yeah and again missing the full picture
in variable*
What for?
I want the user, after adding a new index in the Array, to be able to assign a function to this index
Array (Structure with Event) if possible
that would be interesting 🙂
If you are trying to extend the editor functionality, maybe look into Blutility
well i really feel dumb now
any way to simplify that even more?
was shoot defaults to false
sets externaly
no, i need that for first time output
etc
inputs:
1-false
2-true
3-true
4-true
... so on
well all your doing with that branch is setting it true, you can do that with just the set
but how can i make it in UMG?
oh yeah first branch is not needed too
ty
I need something for UMG editor
Try in #umg maybe
it's too quiet there :/
Is there no way to search for the actual phrase the print string is putting out? LogBlueprintUserMessages: [MotionControllerPawn_C_0] Open instead of searching the BP for "PrintString" which there are many
I’ll teach you a trick
Go to console, type bp.BlamePrintString True and run the game
If your goal is to find which bp is to blame for a specific print string, that is
appreciated, I'll file that one way - in this case I know the offending BP, but I wanted to not have to sort through dozens of print string events
Oh, you mean there’s a bunch in the same bp?
yes
it does work:
that's assuming you mean things you've typed directly into the string field
How to compare a float to see if its increasing or decreasing?
Compare it to what?
to itself?
Can you provide the use case?
You'd have to store the previous value before changing it, then compare afterwards if its >, == or < the previous value.
You have a mouse on mobile? 😀
I don't know why, but if I combine Scrollbox with Touchable Buttons the widgets break in Standalone mode
What I meant more was whether this option is only for testing the mobile version
Hiya, I’m being really dumb. I’m trying to create an interactive sphere that when you click on it in VR, it takes you to the next level. Kinda need help cuz brain fried.
If anyone can help then please dooo
Which part are you stuck on @uneven tangle ?
like.. all of it XD
My brain for some reason cant process on how to make that a thing. I have a sphere in a BP, but how do I get that interaction in VR? is it just the click event, even though I use triggers for my controllers?
@lunar sleet so as i said i made the ability system but im kinda stuck on how to apply damage on colision
It's mainly just the interaction part I cant think of how to do, the rest I got in my head
Idk much about #virtual-reality interaction, you can try to use Mouse for Touch option in settings maybe.
here is what i did on the player script to activate the ability
and here is the ability on collision
i apply it in the ability or in the character
ability right
Depends
Either is prly fine tho
It’s just an event dispatcher of sorts
And on the other end you use onTakeAnyDamage
Well obviously not since you have a warning in there 😀
yeah nvm didn't see it
btw in the enemy ai i alr have an point dmg
yoo i did it
1 more problem tho
when i spawn the ability it overlaps with the character
and it pushes the character backwards
any ideea how i can make it spawn but not overlap with owner
Ugh for the life of me i cant get my projectile to overlap with the ground -.-
idk how to get my one not overlap with the character
Why you trying to overlap with ground if I may ask
overlap/hit, to make some acid land on the ground
It just ignores ground during overlaps. the one spot there hit the character, then traced down and hit the ground
Well overlap and hit are diff things
Is your ground set to block?
Assuming it doesn’t go straight through it, so you need on Hit
Yes , neither block nor overlap works
Collision is there, im walking on it, and tracing for it 😅
Show collision settings on both sides
Is there any way I can swap the widgets in the horizontalbox? Do I have to delete 1 and create it again?
I'm having an issue with render targets for portals where they seem to only render every other frame which causes a really severe jutter even at high fps. I lowered the FPS to 15 to show the issue more clearly. The blueprint and C++ are both set to tick post-update-work. UE 5.2.1
i can't bc the destroy actor is in the ability
C++
?
Again #umg for widget questions, they’re better suited to answer your questions
Brain freeze. Why would turret 2 aim the correct direction, but turret 1 still just shoot straight ahead?
Right
So one overlaps everything
The other one blocks everything
So how are they meant to interact? 😀
block >= Ooverlap?
It doesn’t mean block will trigger overlap
It’s either or
Block is block, overlap is overlap, if that makes sense
Collision requires both objects to agree that they’ll meet on the same collision type
Your projectile object type is set to WorldStatic, not sure why
If i create a blocking volume, it works
just part of the defaults
changing it doesnt change anything 😕
What I meant was the opposite
Try blocking all on projectile and blocking all on the floor
You're onto something
If that works, you can use custom collision channels/object types
why am I unable to add this node to my graph https://docs.unrealengine.com/5.3/en-US/BlueprintAPI/FileUtils/DeleteFile/?
(can't find it)
Looks like a blutility thing
Yeah, I meant like prly a plug-in 😅
Didnt work, rip
How can i multiply a float curve?
i had no idea, thanks
Np
You’re blocking all on both sides?
yepp
And what event are you using
Like it doesn’t fire on a breakpoint?
correct
Does the floor even have a Simulate Hit Events option?
Collision is a fickle beast, I wrestle with it often
😀
gotta select the actor in the scene, then the component -> and adjust collision
ugh
so It's easier to make my own static mesh actor.. how fun 😄
Sounds like it
How can i get a float curve into BP? I want to multiply it at runtime
I do think overlap will overlap blocking objects tho
🤷♂️ I could be wrong, you can always test
cba now that its working xD
What are the Get Curve Value Nodes in Unreal Engine 4.
Source Files: https://github.com/MWadstein/wtf-hdi-files
Well even if i get the curve i need to edit the curve itself at runtime. Not some other parameter. He doesn't talk about that
Why do you need to edit the curve
Editing the values you pull from the curve is functionally identical
I have a steering curve that's imbedded in the chaos vehicle. I can't edit a parameter. The curve itself drives the steering. i want to increase the curve the longer i hold down the key
Can you get the curve value and use a multiplier before feeding the output ? Not sure how this chaos vehicle curve works
problem is i don't have any variables. The curve itself is steering. Stupid but what can i do
Doesn’t sound like you can do this in bp
I'm trying to make a load game system, but the AI isn't restarting/reloading via level reset, is that normal? what's the correct way to reset npcs?
Idk, what are you showing us?
I see an unconnected getter
I don't know what to do with AI controllers, is what that getter is showing
I was thinking to do something like, get all actors of class AI Controller, then reset, but you can't call reset manually on actors
this seems to be more reliable but inefficient way to reset a level?
Oh, is RestartPlayer some built-in function in the player controller or what is that’s
RestartPlayer is built in
Well normally you would save the variables like location and whatever properties you want in the save game object, and on load, you spawn them again using those vars
But given you’re just resetting the level, if they’re already placed in world, then yeah reopening the level should do that for you
I need both behaviors yeah...
placed objects: reset back to their saved location
spawned objects: spawn back + reset back to where the game was saved
what is the point of reset level node then? doesn't seem to do a whole lot
ResetLevel in Game Mode calls Reset() on all actors.
Reset() on actors by default does nothing - you need to implement the functionality.
it teleports the player back to PlayerStart, apparently
Well if you have some game over type of thing where if you lose, everything resets
You're calling RestartPlayer though which is likely doing that. Reset() on AActor has no functionality.
according to the node, it doesn't get called for game modes and *controllers
ok, what's a use-case for Reset Level? doesn't seem appropriate for save/load game?
void APawn::Reset()
{
if ( (Controller == nullptr) || (Controller->PlayerState != nullptr) )
{
DetachFromControllerPendingDestroy();
Destroy();
}
else
{
Super::Reset();
}
}```
I mean it puts everything back where it was at the level start, I guess
it doesn't for AI controllers, hence my original question
AIController != AI controlled actor
void AAIController::Reset()
{
Super::Reset();
if (PathFollowingComponent)
{
PathFollowingComponent->AbortMove(*this, FPathFollowingResultFlags::OwnerFinished | FPathFollowingResultFlags::ForcedScript);
}
}
Like... Very limited in what it does.
I see, thanks, sounds like I should be avoiding this for a game load
Yep
here I hit f9 and call ResetLevel.
- The player pawn is just gone
- The player controller detaches
- The AI does not restart (still punching)
Explains why I haven’t heard of people using it before
How do people normally associate game save data with *placed actors? is there some UUID?
You can give them a GUID in their construction script if they don't already have one.
oh ty
oh.. actors already have an Actor GUID
Bp structs with enums and strings… what could go wrong? 😁
so I figured out how to grab and change level.. but now the release part of what I copied wont work because I changed level. anyone who can help?
Can I change variable "expose on spawn" and "instance editable" on child blueprint?
If it wasn’t inherited from parent, probably
But if it was?
Then no, you cannot modify the actual inherited properties, only the value contained therein. You’ll prly see them greyed out
That input system is deprecated, but if you grab something that changes a level, then you should prly not have anything after that, unless it is accessing something persistent like a game instance
Is there a way to add noise to a spline? It doesn't really make sense given how splines work, but Im wondering how to create a line that moves away from the player with some random noise in the shape of the line. I'm guessing splines aren't the answer, but does anyone know of an example of something like this? My end goal is to populate some mesh along that line, which makes me wanna use splines, but I'm very oblivious to this kinda thing
afaik, that is the main feature
That does make sense haha
I mean there is for the press, but the release no. I might just change it to see if that works. Just take it all out but then reset the head component
To clarify, not sure about the noise part, but def the spawning things along a spline
Get a location along the spline , and extend out off of its tangent in a random length
Ooh okok. Doing that enough times along a straight spline would probably do what I'm looking for
dont know how noisy you need , but something along those lines
Random offset from spline loc yeah
Is it possible to set component values for an actor upon SpawnActorOfClass? I want to be able to set some booleans to prevent some events firing.
You should be able to in Construction script of actor
You might have to tell your component to wait for it to be loaded before attemptin to fire
But I am using components to prevent any (or have minimal) code in the character bp
How can I do that?
Checking to see how i did it, i dont feel i did it right
You mean like putting a delay on the event so I have time to set the values "then" fire event?
not delay, but yes
i did a bool
Default is false
the Actor turns it on when everything is loaded
The component check the bool before fireing
I am having a problem, When I attach my item to my player(via attach actor to component "CarryPoint" which is a scene component) my player can no longer move. I also have it disabling the physics of the item once it is picked up. does anyone know why this happens?
Collision issue maybe, or just attaching to the scene component
The problem I have is when I SpawnActorOfClass (basically swap out the character actor) it resets the bool.
I also used a Function inside the Comp that fires with the Actor's Construction runs, creating a Faux-struction Script in the Comp
I am trying to work out when the player first spawns to load inventory etc. and SpawnActorOfClass is me respawning them
I don't want to load it a second time (which it is)
Hmm can you go into more detail please?
If you're only wanting to load the component values once, then perhaps they don't belong on the character? Maybe put them on the PlayerState instead?
Have a Exposed Bool in the Actor bMakeInventory?
first time you spawn , make it True, after that its False
You can’t do this with everything but might work
I never considered or learned about a playerstate but the sounds of playerstate is golden right now
I can do it all there
Im still learning Components, lots of workarounds for me
Does the playerstate remain even if you posses other actors?
Yes
omg i did this earlier but it didn't work but I just added this and it fixed it lol
Thank god lol my brain was starting to twist on how to set booleans in multiple components "before" SpawnActorOfClass finalizes.
Thank you Epic Games for a playerstate lol
has anyone in here ever created an elevator system? i atte pmted this today (w replication) and it was one of the more difficult things i've ever attempted to think through and ran into a few issues
wait till you have to deal with swinging doors... 😄
lmaooo not sure if youmean just opening/closing doors, cause i have that much slved
that's literary me figuring out physics constraint components
but the elevators system is
🔫
Break it down into parts
how many floors?
Get location of each stop
Going up? Going Down?
Do doors close?
imho it works best to have some empty actors as waypoints instead of hardcoding distances/locations
or a Vector with 3D widget on
that sounds even better, thank you now i got to rework my system
all you would really need is a Z
yea, currently i pull the actors and ignore the x/y component
i have the opening and closing of the elevator doors (easy part), but im trying to also have the amount of floors be variable (which i don't think should be too hard)
this sounds interesting, what is this?
vector w 3D widget?
Variable floors would be an array of Z floats
this definitnley makes sense. attmpted something today w instance editable and was using floor numbers and had a seperate variables for floor height etc but it got a bit too complexa nd i had to turn around lmao
would the elevator be in multiple parts? i have a BP for the elevator doors/"elevator" but im curious if you are using a seperate BP to handle the movement and/or a sperate blueprint to be the thing you are interacting with to say, select which floor you want to go to?
use a Scene
i have the outer frame as actor, which is also the movement point (so i guess i'll keep my system anyways)
legit have never used a Scene but will definitley try this
yea this is what i want to do, but there will need to be at the minimum a button / interactable on each floor
you would have to, im just not sure what all you have in your BP
well at this point, it's really just back to a simple "room / elevator" that is interactable, and the doors open/close
but i have an 'elevator control panel'
had**
which was being used to determine which floor you go to
Can I store uobjects (not actors) in game save data? Will I run into problems?
I did a quick trial and seemed to work but I’m not sure if it’s because the injects didn’t get GCed or what
You could have a separate BP that are the up/Down buttons on outside of elevator
Place on on each floor and the elevator moves to that Z
when pressed
yea that could definitely work. is this using the "vector w 3d widget" you mentioned before?
i've also never used w a "3d widget"
nope , wouldnt use it
i did have an idea to have a widget pop up that would set the varible of which floor you go to once inside the elevator and interact w a "panel"
the buildings woul dhave upwards of 33 floors
and w my TP build the character would have a difficult time clicking between 33 differetn buttons lol
so figured i'd have the panel/widget pop up once inside the elevator
but having the button on the outside to "call" the elevator is a good idea
and, so no vector 3d widget then
I would like my enemies to flash a colour (white) when hit. But without replacing their materials (some enemies have several material slots and I don't know how to change them when hit if it's more than one material) or any scalar paramenters (would be too much of a hassle for all the different enemies). Is there any kind of shader, vfx or lighting trick to get the same effect?
you could use an overlay material (if you use UE 5.1+)
what node will return true if this key struct is currently being pressed?
Is Input Key Down
After trying to debug some strange instability in a moving actor, it turns out that GetGameTimeSeconds does not return zero when you call it in a constructor. Bug IMO, this value is useless. What's the most graceful way to correctly get zero from this when the game isn't running?
"Why are you calling GetGameTimeSeconds in your constructor?" I've got a function that determines where this object is based on the game time, and I want it's position in editor to be set to the origin point based on that same formula
Do you want 0 if game isnt running?
Started the project on 4.27.2 unfortunately and I'm not migrating now 🤔 I am currently trying a post process material as used for outlines but it does't work.
I had it working for a previous project, don't know what I'm doing wrong, oh well.
did you do the thing in Project Settings ?
I think there is a thing...
@viscid python
That's perfect, thanks!
Yes I did.
Not sure if thats janky but it works
I also have a material from a tutorial to at least get an outline working.
So far it doesnt't work. I setup the post process volume, added the post process material, set the depth stencil to 2 for the enemy I want to outline, still nothing.
Set to unbound and created the material from scratch
It's this one.
Its a Post Process Material Domain ?
do you have access to the project that you had an outline working ?
the object had depth pass 1 and not 2 as in the shader
ahh, hate those one offs
so now it's working... I need a break... 😏
yay
Anyway, thanks for the support!
Anyone knows what to do with 3 booloans so that they give those results
if all aare true it gives false
and if either of the above it gives true
my brain hurts
If true and true and true. Negate result
Not sure which one you mean
oh yeah, I now realize it's like a 3x3 grid and it isn't really clear
so it's like vertical, if False False True OR if False True False OR if False False False... the result be true
that's just a 3 way XOR
wait nvm
similar though
what about if there's two true and one false?
I don't have editor on me rn
is it like anything less than 3 trues is true and 3 trues is false
so < 3 is false, = 3 is true?
I mean really simply just and all the inputs together and then negate
since any combination other than all true will be false, so you don't need to test for them
if that makes sense @storm shale
so like, idk how to implement that in a way that involves all 3 booleans so the function outputs a single
boolean
what if the first one is true?
with muiple branches it'd be simpler ofc
do you have a full truth table?
you don't need multiple branches
from what I can see, all you need is to and all of the inputs to see if they are all true, and then negate that to set it to false, which will be your output
I think imma do that
are there any other cases where it has to be false other than all true?
wdym, where's your Pocket Unreal? 🙂
Nvm, The reason why I couldn't figure it out is cuz in reality I wanted 3 possible outcomes, instead of 2
true false and do nothing basically
or at least that's what am settling in, am sure if I was smarter I could figure out a way to make it work
What is a more optimized practice rather than casting over and over (replicated btw)
Either store a reference to the thing you're casting to, use components to house your logic instead or use interfaces for classes that do not share a hierarchy.
There's nothing particularly wrong with casting, except if you're casting to a whole bunch of classes within another class just trying to figure out what the thing is you're casting to.
Does it make sense to put ongoing event logic in game state? like stuff happening at certain times, etc?
or should I create some other class to handle time based events / triggering enemies and stuff?
I have a really basic question that I cant seem to find an answer to, but can someone point me in the right direction as to how i make a 3 speed movement system? I would like to have 3 speeds for my character, a walk, jog and run. Currently i have it so that the pressing and holding of a movement key activates walk, and then pressing and holding the sprint key makes my character run, although the way it is set up, when the sprint key is released it's programmed to go back to walk speed. I would like to add a jog speed that is on a toggleable button (not press and hold) and has it so that when I release the sprint key after sprinting, it returns to whatever movement state I was in before entering sprint, either walk or jog. Any tips would be greatly appreciated and as you can tell I'm pretty new to this kind of stuff so pretend you're talking to a 5 year old.
How do you actually give an actor a gameplay tag? I want to use Get All Actors Of Class Matching Tag Query.
You probably want to have separate actors that manage things like this for you as they can then have their own logic and timers rather than trying to manage several things like this in the gamestate itself. Makes it more modular and allows you to place these manager actors in whatever level and they can do their thing.
Makes sense, thanks
You'd just need a bool to keep track of default state either being walk or jog that you set true or false when you switch between them. When releasing sprint, check the bool and set whether you're supposed to be walking or jogging accordingly.
First you need to understand that there’s Tags and then there’s Gameplay Tags and though they are similar in nature they’re not the same thing 🙂
The ones you referenced are tags, you can just hit the + sign under Actor Tags and add it
But that function is for gameplay tags query
You’d need to use something like ActorHasTag
If you want to use GameplayTags like in the node you supplied, you probably need to implement the IGameplayTagAssetInterface on any actors you want to be able to respond to it, and have them return some form of FGameplayTagContainer.
// Overridden from IGameplayTagAssetInterface
virtual void GetOwnedGameplayTags(FGameplayTagContainer& TagContainer) const override;
virtual bool HasMatchingGameplayTag(FGameplayTag TagToCheck) const override;
virtual bool HasAllMatchingGameplayTags(const FGameplayTagContainer& TagContainer) const override;
virtual bool HasAnyMatchingGameplayTags(const FGameplayTagContainer& TagContainer) const override;
Yeah, and unless you modify the actual source code, you need to implement that in actor, pawn and character if you want all 3 to take advantage 😅
Ik the EQS tests need that interface, I didn’t know that function does too. Ig it’s better than just getting an actor array, iterating over each actor, getting the container, checking if it contains the right GT 😀
I am using ALS and converted it to a custom mesh through retarget pose from mesh node. How can I fix the bouncing phenomenon in the video?
tinkering in BP any reason to really use BP interface over cast to?
seen a few tutorials that talk about interface being less laggy in the long run:?
working on an action queing component. asically im checking is valid, if not, do it, if so, wait. Despite me watching with my own eyes as it sets it to be valid, it just always returns null, no matter what i try to do i always get stuck from the very first second with some illogical issue that ive never even heard of its soul destroying. How can it be valid and return not valid? im using breakpoints print strings everything to show that it being set and it just isnt
Also victim of this, just got it two seconds ago too, it seems retargeting adds in a split second of spinning t pose if you slow it down
Interface cost more overhead than casting.
ok cool so basically anywhere i would have implimented an interface i should be able to replace with a cast to and be good
especially for a smaller game
You use interface when you interact with different classes
If you need to interact within the class that share the same parent. Just use casting
How about dispatchers
That's got nothing to do with interface or casting
You can bind dispatcher anywhere anytime as long you get the ref
Say u are doing interaction system and you want to interact with different objects that don't share the same class. Then interface is the clear winner imo
Not sure what you mean with replace. They kinda have their own purpose
About casting and interface, as long you are not doing it a bazzilion of times in a single frame or ontick, i dont think you should choose one over the other for performance reason
Choose them for what they can provide instead
This might be an incredibly dumb question but I am going to try and explain it as best as I can.
Basically what I'm wondering is if I have a blueprinted object placed in the world and it has a variable that gets set when it's interacted with, firstly does it only set the variable for that specific instance of the object, and am I able to check for the value of each individual instance.
Each of the purple boxes is going to be an area designated for the player to be able to place items and I want to be able to check if it's occupied already or not for each area. The player is going to have the ability to move and add/subtract the amount of counters during gameplay so I'm just wondering if that's how variables in blueprints work cause an array doesn't seem like a reasonable route to take.
Essentially the variable is gonna be along the lines of "IsOccupied" and I wanna know if each one is tracked individually, and if I can get the value of a particular one
Each class instance has it's own vars (see object-oriented programming)
if that's what ur question was
That's part of it yeah. Good to know. I'm pretty sure I've gotten a system that'll work once I'm finished. Thank you though.
so im using new input action system, and on vector2d value does not reset to 0 when no inputs are pressed
so how can i make it return to 0 huh?
alright
Hello guys, I have this functionality where when you pickup a "coin" it calls the ToggleVisibilityAndCollision function and when respawn event is triggered it calls it again and is supposed to make it visible again, but it doesn't. Any idea why? Maybe I'm not seeing something obvious as this should be simple lol
You disable the coll
Hi, I have a menu map (UI) from where i 'm supposed to chose where to begin (via a clickable button). I'd like to set the location of the player to a new default location and not the default player start location (which is also used). Any advice on how to do this ?
so it no longer can trigger the overlap event
but should it not matter as I am calling an event to toggle visibility again?
idk can't see ur whole code
This is my picked up function, and that is all my code. I did remove the disabling of the collision and it respawned after triggering the event, but then I can't walk over where the coin was because there's collision, so how do I stop the collision ?
how do I rotate my AI every 5 seconds 180 degrees in blueprint?
No, don't remove it
It should have worked they way you had it
was the coin getting visible again?
previously?
No if you run into it then it becomes invisible and picked up works fine but when I trigger the respawn event it doesnt become visible
with the collision enabling/disabling part it never becomes visible, but without it, it becomes visible again
check if the other actor is the player
ok I see, it plays picked up right after I trigger respawn
maybe it picks up itself (|ol?) when u enable the collision it detects the ground
it probably does lol
it was colliding with the mesh I think as it was above ground but now I'm casting it to my character before picking it up and it works as it should, so thank you so much! (I also turned off collision on the mesh)
How do i set up my skeletal mesh to detect when it is hit by an object?
I have a physics asset, and i have my collision channel set up, but the overlap event doesnt get called
show ur collision setup
This is probably a really easy thing, but I can't seem to figure it out! I have a boolen on a door, "is interactable" that is public. And in my player character, i've getting all actors of class, and then putting the "is interactable" into a branch, that then goes onto some code. It all works fine. However, in the doors details panel, if i change the 'is interactable' it has no effect. If i go into the doors blueprint itself and change the defualt value, it works fine. Not sure what I'm missing 😦 tried a bunch of different ways to access the boolean but i keep getting the same result.
the first image is the skeletal mesh, it should block all physics bodies that get thrown at it, and the second image is the physics body
right now the item is just going though it, it used to block it
and the on hit is not being called
it needs to be a hit not an overlap
Show your bps for others to see
Heya, sure, not sure how much to show. This is what i have setup to call on the boolean. (first image) then the second image is the door blueprint with that variable set. Changing that wont effect the door blueprint. But if i go into the blueprint and change the defualt, it works as expect eitherway.
your first image will get a random BP_Master_Door in the world.
Lets say you ahve 4 doors in the world, it will just get random one
that's not the way to reference
ahhyeeaah getting all the actors of course
you shouldn;t use it in almost in all situation. But if you must, you only use it when you are sure there is only one Instance in the world
but for something like door? You will have more than 1 instance in the world so that's not the way
Thanks for this, ill keep searching. I've been playing around with the line trace so i can tell which door in particular i'm looking at
Line trace -> Get hit result -> If hit anything -> If Impelement Interaction Interface -> Use Interface
How to edit these in realtime?
interface is preferable for interaction but if you just wan to quickly do it in your case, you can do casting
Line trace -> Get hit result -> if hit anything -> hit actor is valid -> Cast to your Door -> Run Open or w/e event on the door
So I managed to get a Coyote time mechanic working here. Problem is, I can only think of a way to get it work by running the event tick and pulling the Z velocity which I know isn't efficient. Is there any other functions I could use where I can pull the Z Velocity specifically when a character walks off a ledge?
What's wrong with caching variable every frame?
Well I just assumed that running a check every frame could be intensive. But also, I assume there's a function I don't know about that I can use and I'd like to learn about more tools if possible
no way to lock pos and rot in realtime?
thanks for this, i do have this setup already so will look at doing it this way. Would i create a function in the interface and call it that way ideally?
Create BP interface first and make sure your door implement it
if you are just setting or getting primitive variable, it isn't expensive
take the jump for example
that's something the CMC set every frame
bIsInAir?
Sorry I'm still relatively new. CMC?
Character Movement Component
ahhh
the one you use to grab the Z velocity
many things run every frame
but there are things that you shouldn't do in event tick
things that doesn't require you to set every frame
or some things like Get All Actor of class , or bp loops
Yeah things like health doesn't need to be checked every frame, only when something directly affects it
I just assumed if yuo're in air would be one of those things but I guess maybe not since movement is much more frequent (relatively speaking)
Okay that makes me feel better about how I have things setup up right now, but just for a learning opportunity is there any other potential ways that it could be setup too? Like an functions I might not know about?
I have no idea what you are trying to do. What is a coyote time machine?
normally if you want to travel backward in time, you do store the related information in some structure
Like velocity, Location, Rotation each with delta time
Coyote time mechanic. It's the mechanic usually in polatformers where when you walk off a ledge, you have a brief window before gravity takes over and you can jump without using/losing one of your jumps
then you just trace back
I see, I've no idea then
Fair enough, figured I'd ask
i guess the only thing you need to check here if the character is walking of a ledge or not
yeah
Jump-> Check if walking on ledge -> If false -> Jump normally anyway | if true -> Don't consume jump count -> Jump
I have it do that by checking if my current jump count is equal to 0, and my Z velocity is negative
do you enter some state when you are walking on ledge?
otherwise no need to do it on event tick
simply check when you press the jump input?
that's what I can think of
No, I'm just working on making a fun jumping/movement mechanic to practice and learn. So I'm using the default jump given and making tweaks and changes based on that.
Yeah I just think you can probably migrate the check logic in the jump input
assuming I get what you are trying to do :S. It's hard to picture platform games
hey mate, yeah I've got a setup like this already. Playing around with it now, and not really sure how I still get access to that boolean.
Show pics
Does anyone know how I can reset / respawn an actor to it's inital position? I have implemented a checkpoint system so the player can re-spawn at the last checkpoint on death. And when this happens I send an event to all children of a actor base class if they should respawn or not. However, I don't know how to get destroyed objects back when this happens at their original state and position.
Hmmm I'm not sure if I can do it based on jump input because the way the mechanic works is it would need to take place before the jump. But that's just how it's setup now, I might end up setting a different variable and that could work too. Thanks for the idea!
Also one more random question, is there an "AND Boolean" but has 3 inputs? (Or at least some equivalent to it?) Or do I just Daisy chain 2 of them together?
Once destroyed, it's gone forever.
You can always store the information (eg. Transform).
Then re-create the actor on respawn function using the stored transform
So I would need to store the inital position and rotation. How would I do the "Spawn Actor" since that requires a class?
I see yea, I have no idea then. Gl
For boolean checks you can add pins and add as many as you like
You can save/store the actor class too
I'm so dumb, I saw the add Pin button and thought that was only gonna add on the output side 
Thank you lol
Oh, so can I do this in the parent? On the being play in the parent I add all these variables and just store references to themself, and then I use that on respawn?
Wdym on parent, this is some kind of misinterpretation of inheritance
For respawn you do want to have a manager of some kind
You don't want this logic in any of the actor you are destroying
Ah, sorry, so I have:
BP_COMP_Actor (my parent for all actors so I can give them custom game logic, eg. should you respawn or not). I base all the games actors on this, so I can have some standard logical for all of certain types.
So you want it detect hit events?
check the "Simulation generates Hit events" checkbox
Then I have a child called "BP_DestroyableWall", which is a child of the actor I mentioned above, and that is the one I place int he world.
The spawn should be a different class, whos job is to spawn destroyed actors
And I also have a "BP_FallingPlatform", which is also based on that parent.
Hmm, okay, not sure I get what you mean? (I tried googling for help with this, but I just got tutorials for player checkpoints)
So maybe more an actor component? So I can choose to which to add it and I can add all the respawn logic there and add them in "Begin Play"?
@bleak summit also debug the collision of your objects (if they even have them). show collisions
I will see if i can show something
🙏
Oh, I think I get what you mean now... You are right... Of-course I can't do this in the actor itself.... The actor is destroyed.
So it' can't check for itself and add it sefl back.
and it's better practice to divide job and task in respective class
like Your character or wall shouldn't care about how it respawn
that;'s the Respawn class job
it works now!!! thank you so much
So I guess I would need a spawn-manager (or such), that uses "Get all actors of class", and that should get the parent repsawn class and re-spawn everything? Or do I missunderstand?
Though that made it a whole lot more complicated... No clue how do do this. 😄
Welll, I guess it's time to learn
I don't like get all actors of class unless you are trying to grab every actors of the class
you could just respawn the one you destroyed and not accessing or touching the one that you don't destroy
That sounds way better!
I'm not asking you to write for me, but how would I go at this? In thoery and I can see how I can get this going.
Because I agree with how you say it should be done, I just have 0 clue how to get started on that.
I will amke an example, one sec
🙏
hello i have a small question:
does .uasset contain cpp files or blueprints?
is it possible to set up collisions on a blueprint but have the blueprint start with those collisions off, then turn them on later from code?
I have a blueprint that's a physical object that spawns at a certain position, but I want it to immediately offset itself into the ground then slowly raise back out
problem is right now even if I disable collisions at the beginning of beginplay, it still pushes whatever it spawned inside of/around
never cpp files, can be blueprints but can also be any other type of assets
try disabling in the Construction script, or have the default Off
So currently all my item's (Actor) meshes are StaticMeshes, but the item weapons need to have SkeletalMesh. How do I handle this in a performant way?
Do I have a variable for each? What about using soft references to load/unload one or the other?
Both my skeletal mesh and static meshes are 300mb each. Does that mean if I have 2 variables, it will be 600mb total, even though only 1 or the other will be visible at a time?
For example, when the item is on the ground, it should be a static mesh. But if its equipped on a player, it should be a skeletal mesh (regardless if its in their hand, or stowed away on their back).
disabling in construction script doesn't work, I'll try changing default
Oh thanks! what about this: https://github.com/sp0lsh/UEShaderBits-GDC-Pack/blob/master/Content/VolumeTextures/MaterialFunctions/VolumeTextureFunction.uasset
i am trying to open the blueprint or cpp file to get the source code(note i am not in unreal engine and i need pseudo volume texture)
GitHub
ShaderBits-GDC-Pack with fixes, Originaly created for GDC 2017 by Ryan Brucks shaderbits.com and posted on forum - sp0lsh/UEShaderBits-GDC-Pack
how can i open it?
did you download the entire project or an individual file
cause if you downloaded just that file it might not work if it references other assets
individual file(also i don't have unreal engine)
you can't open uassets without UE
it's a material function, it's meant to be opened and edited in the unreal editor
but i really need to read the source code any idea how can i do that?
it doesn't have actual source code, it has a list of nodes and it's probably not stored in a human readable format
oh well,mmm where there might be the source code from the repo i sent?
Got my Coyote jump implemented without running a tick function so I figured I'd share for anyone else who might search for something similar in the future
there's no cpp code in the repo
it's all assets
why not download unreal at this point
@silent drift
because i am using roblox studio and i need to figure out the way he makes pseudo volume textures
it's also apparently from a GDC talk so the talk might have screenshots
download unreal, check out the material function in unreal, recreate in roblox
unless your computer can't run unreal I'm not sure I see the problem
yes, my pc nor my interent can open unreal engine 4
i don't think it can't even open unreal engine 3
there's all the slides of the talk
Thank you! I will see if I can understand what it does! 🙂
This spawn balls in random location within bounding box. When they are created -> The information is stored inside the a struct (You can set here and then set in your checkpoint if you want to update the position)
When I respawn the balls, it spawns where at the same location when their location is stored
@silent drift
Oh, nice! Okay, I will see if can use this and transalte it over to my actors!
Sorry for the late response i was looking through the talk and it doesn't seem to talk about pseudo volume texture or how they are made.
So I need to create a struct that saves all actors that should respawn and their info, and then respawn them if destroyed when the player dies and uses a checkpint.
not using struct would be very painful
Spawn them -> When enter check point or at the start -> Set the struct info -> Destroy
-> Respawn
Yeah, thank you! I
If I get stuck I might poke again (if okay?), but thanks a lot! I think I get it.
wrong talk sorry, this is apparently the stream this repo relates to https://www.youtube.com/watch?v=CWzPP5FAYAg
https://forums.unrealengine.com/showthread.php?143716
Ryan Brucks returns to the livestream and this time he's got brand new content to show off. Ryan built a plugin through which he can paint velocity and model with volumes. He demonstrates this tech by manipulating and creating clouds in real time! It includes tons of new features for generat...
though I'm not seeing anything about like, "pseudo" volume textures in here?
I'm not sure the repo had anything about it either, he might just be using actual volume textures
@silent drift I modified the code a little so I stored their info before I destroyed the ball. Basically you do the struct when you want to store the info (eg. at checkpoint)
Ah! Thank you!
you just need information to re-create the object you destroyed. EG it's color, it's transform, it's exp, etc, etc
Thanks! I
@frosty heron To see if I got this correct.
- I have a "SpawnManager" (just an example, that I place in the scene), this has an array that is "SpawnedActors" or something similar.
- In each blueprint that should be able to respawn I cast to this spawnmanger on "BeginPlay" and add it to the array
- Inside the SpawnManager, when I either hit a checkpoint or on begin play, I save all respawnable actors info into my created struct (does it automatically use one struct per actor inside the array?)
- When I re-spawn I do a loop and respawn each actor (for this I also need a saftey check to see if the item was destroyed or not, so I don't spawn items inside of each other)
Does that sound about right?
Sorry being dumb, but I'm really trying to learn and see if I got this correct.
is there any way to clamp the player camera by default in unreal? I have some cameras that use the controller pitch/yaw as far as I understand the setup, and it's already clamping at 90/-90 but I can't find how to change the clamp ranges, and the ones in player camera manager don't work
Thank you very much that video contained really useful information that i can use. again thank you very much and also sorry for the late response.
Don't know about the safety check but sound more or less correct
np
The saftey check was just to make sure that if a enemy or a actor wasn't destroyed, I don't re-spawn it on the already existing actor.
Then you will also need to remove the info from the struct for that particular actor
Actually @frosty heron sorry, a short follow up. Would it be a better idea to before destroying the actor, save all this info into the array and struct, so when I respawn, it only respawns the items that was destroyed, and it ignores everything else?
So.
- I have a SpawnManager in my scene, it starts empty (with an array)
- When an actor of some type is destroyed, I cast to the spawnmanager, and add the item to the array, with the struct info (this is the part I don't have super clear in my head yet how I save the struct info per array item) - Is the array based on the struct btw?
- On respawn it re-spawns all destroyed actors (since those are the only things it has in the array), and then it clears the array and the struct making them info again.
I assume that way I don't have a endless list of items, but really only the itmes that are destroyed, so I can re-spawn them without any saftey if they already exist?e
Ignore that image, I meant this one:
How do you make a skeletal mesh on the character block collisions of non physics simulated objects the same way the capsule does? I have this dash animation and I want the mesh to not go through walls when it plays. The collision only works when the hit object is physically simulated, like a projectile.
https://gyazo.com/1b1f723bf2e190e6e1de0837383ef230
One way I thought of fixing this is to manually spawn a sphere collision on the head socket when the animation starts playing... but that seems hacky
does anyone know what clamps the camera in the thirdpersoncharacter sample? as far as I can tell it's not the player camera manager min/max pitch settings, it's not the controller, and it's not the character blueprint
Anyone know how to make it so if your cursor is near an item, it will consider it as a collision/hit?
I have some small objects in my world that I want to pick up. But the mouse shouldn't have to be directly on top of them. Currently my implementation is using a line trace, but the item has a large sphere collision. (Its limited because it sucks for items that are very long in some axis. It only works ok for round or cube like objects)
Is there a way to get a better shape than just a sphere? In Starfield it seems like they have a larger version of each 3d object as the hitbox, but I don't know how to program this
implementing that would be pretty easy, but idk about the perfotmance of having essentially a duplicate mesh for every interactable item
If it was hidden I'm guessing it wouldn't have much impact on the performance, but sb would have to fact check this
This is what I'm trying to achieve
Instead of a line trace , try a Sphere trace
same as a line trace , but has a radius
My actual method is using a line trace for a direct hit on the mesh or sphere. If that doesn't work, I line trace the nearest environmental mesh (e.g. a table) and then do a small sphere trace from that.
I don't know if this is effective or worse than what your suggesting
Will there be conflicts in whats considered the nearest object? Sometimes sphere traces struggle getting the nearest object
they want insane accuracy so that wouldn't work
you could also do a line trace , then Sphere overlap Actors/Components centered on the linetrace hit location
Yeah it has to balance accuracy and speed/ease of use. Its like autocorrect, most of the time if it works properly its convenient, in rare edge cases it can get in the way.
There's tradeoffs, like with security, actual security and ease of use
Hi, I've this simple control to allow the player to rotate on its z axis. I'd like the rotation to be smooth (now it just go directly to each step of the rotation), like scaling speed on Z axis rotation / mke it progessive. Do you know what I should do ?
Yeah, you could even do a multi sphere trace instead of the sphere overlap to choose what was closest to the line trace hit loc
what if we convert everything into a 2d Space and then calculate the distance from the centre point. not sure how costly this will be.
If we can somehow get the 3d item's current "facing towards screen shape", then this is a simple check just like if the mouse is hovering over an image or polygon. The problem is we have to do this every tick, with every object
seems kinda impossible
hovering over the Shape, can be solved using line trace, but you want closest, from your mouse
everything is possible
instead of getting the shape on 2d, Why not just start with point of each actor location and check how it is working and how performance costly this way is ?
Line trace works if the hitbox mesh is accurate and is large enough. Sphere trace can help I think, but sometimes it gets the wrong mesh, its not accurate. If there's two objects in a sphere trace, it sometimes gets the furthest one, not the closest
Not sure how thats supposed to work
nevermind, forgot already what you were trying to achieve 🪦
Hi, I have like a few hundred meshes in my level i want to give a slight levitation effect, as if they're hovering in the air. Having each mesh as a separate actor with their own timeline for the hovering is not that good for performance. Is there a better way I could do this?
you can do it in the material
yup
Once you get multiple objects in a sphere trace you should get all then, you can do another check, where you will find the closest impact point
oh thats great, thanks!
I'm trying to make it move only in the Z direction however masking a specific color doesnt seem to work
not sure HOW to do it, just know it CAN be done 🙂
Are you geting the Actors world position to select the closest ?
I would assume the swords origin point is somewhere in the handle, so if you clicked toward the tip of the blade , i might thing the orange is closer
try :
I think you would have to use the Append node 2 times to make it into a vector3
#materials will prly know how to do this
multiply by a Vector3 instead of masking, this will decide the direction vector
0,0,1 for Z only
okay thanks!
Is there a way I can see what's currently stored in a array inside of the BP? While in-game, I would like to see if I saved the data correcty to the array.
When I look in the BP, it all seems empty when I go into while in-game, and I don't know if it because I've done an error, or if I can't see it like that in the BP.
add a breakpoint, you should be able to hover over an array pin to see whats in it
when the breakpoint paused
Guys, I am making right now multiplayer game. Can you give me advice how to realise stun mechanic in my game?
#multiplayer is a better place to ask
Thank you
you should expand the enhancedInputAction to see an "Ongoing" path. Use that to change the yaw over time while the button is held down. If you do that, decrease the amount of rotation since it would do that amount per tick
If you don't see it, change the kind of input you're using in the input action definition to something that can fire events while the input is being held down.
unless you want it to only fire the input once to ensure a 90 degree rotation, in that case maybe a timeline could help. Lerping between your current rotation and the rotation you want
@frosty heron I got something working! And I feel like it works really well and it seems to not hit on my performance! Thank you for all the help!
Nothing should trigger performance issue. Unless you are spawning hundreds of actor in a single frame
👍
thanks
ongoing no working but it works with trigger. val of -0.1 and the rotation is smooth. I'll have a look to the other way you propose with a timeline
We have #enhanced-input-system btw and ongoing doesn’t do what you think it does
That’s incorrect
oh! where did I go wrong?
@lunar sleet ok for the channel, currently trying to this with a BP after firing the input
OnGoing fires while the button is down, while the threshold has not been met. For example, if you have a Hold Trigger with a threshold of 1s, it will fire Started once, then onGoing while pressed before the threshold has been met and Triggered once the 1s has elapsed, while being held
Cancelled if it threshold was not met before the button was released
And so on
ah okay, didn't I say that OnGoing would fire while the button is down? I'm not totally incorrect 😅 I did miss the last part, which I appreciate you correcting
so it could make a 45° progressice turn on Z axis from a point to another or a circle and then anotehr hit on the button and continues the trun in oanother 45° fraction and so on to a complete revolution
I meant onGoing will not fire in most cases because the threshold is too short, i.e. when using a Down trigger
So you can hold that button all you want it will never fire onGoing 😀
yeah for sure, which is why I suggested changing the input trigger
if it didn't work
Would anyone know if using the simple move to on the player character can use nav links for crossing areas where the nav mesh isn't generated? I'm trying to use it but when it gets to where the nav link is, it just glitches out. (looks like it's vibrating)
Might have to ask #gameplay-ai for that one
Point being that response can confuse people. The correct answer is use Down or no trigger (defaults to Down) and the triggered pin because it fires using its own tick while the key is pressed (held)
understandable 👍
ongoing only triggers on timebased trigger like hold, hold release, release, combo
can always just check InputAction.cpp for how they work, you also can make your own version if needed
im trying to make it so my character cant attack while in the air. but if i jump and attack on the same tick he still attacks in the air. is there any way to fix this without having another check that hes in the air a tick later.
while you are in attack animation, how would you like your jump button to behave? not executing jump? or cancelling into jump?
not executing jump
then you have to do 2 things,
- I cannot attack when i jump
- I cannot jump when i attack
how is PlayerInAir? set?
its default in the engine
CMC comes with an IsFalling bool
im pretty sure its not ~~who names variable with question mark 🙃 ~~
yeah you can use CMC->bIsFalling
PlayerInAir sounds made up 😀
you are correct, my partner made it. how do i access the Isfalling Bool
From the movement component
Drag the CMC in your graph and pull from it, search for isFalling
Uh… I sometimes do😅 , bad habit learned from tutorials I think, tho I’ve been slowly moving away from that
i have an ex-colleague that named me the following
NotStagger?
thats why he is an "ex" now

do you guys know anything about root motion?
ask off maybe? 😅
do you know how to dissable root motion but only for the Z axis?
when my character does his attack, his feet go up, this only happens when root motion is enabled, how do i fix his feet while still keeping root motion enabled
🤔 animation is retargeted from somewhere else?
no
can you check the animation asset itself and see whether its lifted?
use side views
the animation only lifts when root motion is enabled
if you authored the animation, you might want to double check, and to answer your question,you can only take none or all axis of root motion
do you know any other way to fix that problem, he has to crouch down for the animation to look good
atleast check the animation asset itself with wireframe and see
if you disabled the anim sequence's root motion, you should also see the red line that shows where the root moved to like this
if it is not stick to the ground like these, then the rootmotion from your imported animation data may have issue, you might want to check it in your authoring software
huh.. thats a style that i havent seen before
are you using ABP_Manny as your base animation blueprint?
no im using a mixamo character
so no controlrig enabled ya?
and a custom abp
correct
can try adjusting root motion root lock perhaps
i can only imagine its the animation's root motion data that is the issue
i tried that, it doesnt work
this is his skeleton, and there is no root bone at the bottom
i have never tried without it so im not sure..when i do them i always have that root
any way to add a root bone without redoing every animation?
i am not very familiar to these at this point 😅 maybe can ask around in #animation
yeah unfortunately the animation channel is almost completely dead
for mine, root motion is achieved by animating that root bone at the bottom
does your skeleton tree root bone starts with the pelvis?
there is also these settings that you can try around in the skeletal asset
make a copy and try it out with simple stuff first
personally i have not done animation without the root bone
but my experience is also limited to unreal so im not too sure 🙏
by the way way, i would also like to recommend this https://toshicg.gumroad.com/l/game_rig_tools
its freemium, and i think it does alot
Gumroad
Exporting your character from Blender to a Game Engine is hard.Especially if you don't understand the underlying tech (and frankly, who does?) exporting to a game engine can feel like a minefield. Why do my animations look different after export?Why is my character distorted?Why are there more bones than I need?etc. etc.That's why we created Gam...
You want to be asking #multiplayer for this stuff
Hey, Its a basic question but i hope finding a simple and effective way to do so, its related to reference and casting (if i understand correctly).
I want to cast an input action such as pressing a button from my player bp to another bp (character like NPC here). This is needed to pause a timeline currently running on the NPC via my player_bp
this way i can have a method to build reaction on npc when player press a button
The npc is not an IA yet just a basic character blueprint.
(More Context : i m showing a character animation in a sort of turntable render and i just want to be able to press a button while in play mode to stop the rotation from the timeline on the “NPC” bp)
You don’t cast an input action
A cast is a check to see if the ref you fed it is of a certain bp class and allows you to access the functions and vars inside that bp
There’s a blueprint comms video pinned in this channel you should watch
It’s a tad long but it’ll help you understand how inter-bp comms work
Thx for ur help; i did watch a ton of thing about interface/ActorComponent and event dispatcher some month ago but i dont get it lol im gonna watch what u suggest, for u what would be the way ? do u create an event ? do u call a variable via one of the thing i mention ?
Idk what you mean by player_bp
its my controller my pawn the one i move in the play mode
You mean your player character ?
you are probably looking for a interact system
i interact with the npc
depending on the npc state, it will start or stop the timeline
yes sir
You usually need a way to interact so you can get a ref to the npc
is there a blueprint module for "on frame" ?
ex I could be doing something on tic but then execute when a frame comes around to lighten the workload
rather than execute everything on tic and frames just happen when they happen
its not realy an npc its just a character running an animation that rotate and i want to when pressing a button stop is rotation do i realy need to build an interact system to do that ?
not necessary then
to start, you need a way to get the reference of the other character
if you want that interaction to be doable no matter where you are, when the input is triggered, get the reference of the other character, call its start or stop
to get the reference is the question though
exactly
if its global, it could submit itself to gamemode/gamestate so it can be retrieved somewhere
You can use get actor of class
worse case worse you use get actor of class
But it’s not something you should start using as a crutch everywhere
yeah i used this method with tag on something else but there is probably a simplier solution
And if you have more than one of those actors you’ll need to use get all actors of class and for each loop to make them all do that
I mean tag is a decent solution to filter results
If you have several actors and no interaction system, then you can get all and filter using actor has tag
Ideally tho, like was said, you may want to have some sort of manager function in the GM/GS if you’re trying to affect a bunch of actors in the level
Someone is helping me in the UE forum im telling u what his solution is when i test it
After I apply a physics material to my character (a ball) it stops me being able to move around, what would be the cause?
nvm, misread
I just realized it's because I have a character movement component.
Anywhere*
Yoo friends, how would you, in a first person game, lock the camera rotation, so that the player cannot look away from an object but can still move the camera somewhat.
i cant find anything on this 😦
it bugs me that there is something i cant figure out
You want to have the "base" rotation be a look at rotation and then have some small movement around that?
Calculate the look at rotation, quatify it, then quatify a rotator that you clamp and multiply them together.
Really, you need quats for this?
To set the camera rotation
I mean, they make life easier when multiplying rotators.
id have to put this code here...
Can you do quats in BP?