#blueprint
402296 messages Β· Page 687 of 403
Oof, that's gonna be a tough one and also can be very hard to follow/make play nice if you add multiple components and things start clashing. Just keep that in mind.
so my plan is to have a custom scene component, which will be my tool, add that to the defaultroot of the actor, and any components it spawns will be children of itself
but i think i'll have to use editor blueprints
So who needs the event? The actor it was added to and not the tool component itself?
i was talking event in a more logical sense
is there any builtin 'event' or whatnot, for scene or actor components, that fires when that blueprint is added as a component
kind of like a component constructor for when its added via the UE UI to the actor
I guess not then.
a startup of sort
π
will look into editor blueprints
that may give me access to some form of editor events
Since I'm here, anyone know of a good tut for wall walking? Not wall running character like most YT tuts where the player is a human and runs along walls or upwards or grabs ledges etc, like xenomorpgh wall walk and that's not a payed spider plugin thingie? xD
like Jamiroquai wall walk ?
Jamiroquai's official music video for 'Virtual Insanity'. Click to listen to Jamiroquai on Spotify: http://smarturl.it/JamiroquaiSpot?IQid=JamiVI
As featured on High Times: Singles 1992 - 2006. Click to buy the track or album via iTunes: http://smarturl.it/JamiroquaiHTiTunes?IQid=JamiVI
Google Play:http://smarturl.it/JamiroquaiVIGplay?IQid=J...
You know what a xenomorpgh is, right?
May I point out I did not see any wall walk whatsoever xD
i blame drugs
What is the Editor Utility Widget added in version 4.22 in Unreal Engine 4
Source Files: https://github.com/MWadstein/UnrealEngineProjects/tree/WTF-Examples
Note: You will need to be logged into your Epic approved GitHub account to access these examples files. https://github.com/EpicGames/Signup
this will probably get me most of the way there
Is it possible to use same animations for different skeletons? Like the concept of the inheritance, I have a skeleton and an animation for that. I want to add a few more bones to that and create another animation, but want to be able to use the previous animation as well
You'll probably have to retarget cuz the editor is gonna scream that the bones mismatch I think.
But essientially, yes you could I think, if the bones are for something that does not affect the previous weights, like let's say you add tail bones or wing bones and non of them do anything with the normal body mesh, then it works, otherwise however, you will get weird animations and stretching.
i can use my Editor utility widget to select my character/track in the sequence, i am trying to get the set editor property to change a float value to 1 then save that setting, has anyone does this before? always giving unsucessful
Thank you I'll search about it
Doodlespagootle i need some help! I'm a beginner so pls be as gentle as if you were to explain it to your grandma. My blueprint shows my current way of making the AI play a sound upon sensing the player. I want to change it so that not every AI plays a sound (simple horde game so not every actor should spam the soud fx). I tried to do that with a multigate but thats not working too well.
π¦
when is that event fired?
Why would i need multiple blueprints ? I just want to add a "random" continue this execution path or not. As you mentioned ever AI executes this BP on its own so it would do the trick
If your are trust making them play a random sound. Than make a cue file, add a random node and plug in all the noises you want to randomize.
Here a picture I found on Google.
This is probably dumb but how can I get a player state ref?
Wdym, if you wanna access it you do it from a Controller with GetPlayerState
Anyone know how could i make an animation bluprint do things in a multiplayer environment through a clientside widget?
For example a player eats or drinks something on a loop so i want all players / clients to see that
Even new players loading in etc
you should ask at #multiplayer
Thanks, ill do that once im at the pc again so i can explain it better
Is someone familiar with ghost replay? I did a record of location and rotation of my vehicle and did a lerp with timeline. So far all good BUT it's still laggy because lerping from index 0 to 1 and from 1 to 2 and so on, will make the actor 'hit' two times the same index causing a micro lag, do someone have a solution for this???
Try making use of replication instead.
what you mean exactly? I was thinking about giving that coordinates to a spline in order to add points
Replication (and in extent Unreal's own replay system, albeit not really straightforward to setup) is more elegant solution to ghost replays than going for hacky connect-the-dots solution.
Overview of the Replay system for recording and playback of gameplay
The various aspects of replicating Actor objects and their components.
Doesn't really matter if your game is multiplayer or single-player - it can be applied to both.
is an asynchronous multi
ok I knew about the demorec but I didn't really give him a chance haha
I will try this dude, thanks a lot!
@wary tinselOn a side note. If you don't care about pinpoint accuracy, you can save a ton of memory and bandwidth by saving transforms with timestamps at much larger intervals than every frame and lerping between them. I did that once for a rewinding system.
I was saving positions with a timer at .2, store data and assign back to a puppet when spawning
but lerp still causes little lag because it repeats the index π¦ maybe I 'm doing something wrong
Specific timeframe saving makes that even easier.
Still trying to get this static mesh cube to match this box extent - this is super basic stuff, what am I missing?
the red cube is what I
should be the size of that orange box extant
What's the best way to have the springarm camera, not move left/right with the character turning?
Probably spawn it after the fact and attach it but don't match rotation on the attach event then just tick the rotation you want it to match
these are my components @open crypt
what would i attach it under? I only want the up down movement of the character movement to be inherited
I don't know a way to block it from doing that, that's the nature of having something parented, it's going to pass it's movement to the children
I think if you have a box extent of 100 it means the width of the box is 200, so you might have to divide your size by 2
look at this for example
Is there alternative way to change the parent class of a BP
file -> reparent blueprint or go to class settings and change the Parent class there ?
open the blueprint
Screen snip baby
Is there any other way by not opening the BP
lol, why?
I mean... perhaps you can write some sort of editor utility widget script to perform such a task but why does it matter not to open the BP lol?
If opening it crashes your editor I guess
Well that suks.
Hm... I always wondered, what to do in case of a screwup let's say inside a construction script and how to remove that script without opening it or maybe even outside of the editor like inside the windows explorer.
Not sure if that is the case but I've had it happen before. I'd try to use an autobackup then
You could perhaps go around the problem by putting something else where the parent class is/used to be. If the parent class is one of yours, that is
Essentially use the filesystem to do your reparent for you
An empty subclass of the thing you actually want to use as the parent, perhaps, as it should act the same way
I have the location of an actor (not moving), simple vector - how do I get another actor to rotate to face that actor?
In case you didn't figure it out:
Input location of your guy and the thing he wants to look at and thats how you get the proper rotation.
Man that is simpler then what I was going to propose lol.
Then simply use lerp/interp/timeline whatever to rotate him.
Now I wonder... π€ π
start is the actor that I'm moving, correctly (the start is the thing that is rotating)
I was thinking something like this lmao
Just put in start whatever it is you want to rotate and the target whatever it is meant to be looked at.
Not sure if it would work tbh. But it feels like it would work in my head.
Thanks I knew there was a simply way to do it
I mean, in backend, it probably does the same thing or something similar to it, but since there's a node that does it, why not use it. xD
Exactly.
Hahaha, I think that node is recent, I mean it is a few years in but thats still not that old all things considered (like how old the engine is essentially and it's version). If I'm not mistaken.
Nah, think lazy, lazy gets the job done more often then smart. xDDDDD
@trail crane sorry to bother but do u know if its possible to 'increase tick rate' of timeline node, so the difference between my values to use in a lerp node will be lesser
Tickrate can afaik never exceed game tick
Indeed, you can tick every frame, it doesn't get any smoother than that.
Don't suppose someone could help me work out why my decal is not doing what it should be doing.
These are my materials
Being created here
But looks like this
@gaunt fractal My initial guess on that is that your material you're using in the decal isn't set to Defered Decal domain.
Hey hey, a bit of a wild question. But is there any way at to make a real time Line chart which creates a line in relation to a variable. Is that something I can do in UI at all? If not can I do something similar in a 3d space?
Something a bit like this.
https://images.edrawmax.com/images/knowledge/line-graph-1-what-is.jpg
Look for Kantan Charts plugin that does exactly that.
btw it's free and open source
https://github.com/kamrann/KantanCharts
Great! Thanks so much
Hey is it possible to customize the editor to play different sounds when doing stuff such as clicking buttons and menus or when connecting blueprint wires etc?
clicking buttons and menus or when connecting blueprint wires etc
Why on earth would you want that? Must be one of those that also has a sound when typing on the phone. Very annoying. LMAO
I guess tastes, just hope you don't sit next to me with your editor. xD π
Uhm its actually for someone visually impaired so that he knows whats going on in the editor but sure dude you do you
Yo chill, just joking, also the did not know it was for someone that is impaired. xD
you opened yourself up to that when you made the humor at someone
Semi-true π
Oook... Everyone jump on my back? Jeez... Ok, np. LMAO
I'da just left it at what I said, but you come back with a "eh, partially correct"? π
the letters, mason! what do they mean??
On more on topic conversation, my decals are still funky
Any ideas why it might be using this texture instead of the one I set?
Its material Domain is "Deferred Decal"
Yeah that's the texture to be used when the material isn't set up properly
this is perhaps #graphics, but let's see the full material graph?
have you done the apply/compile/etc thing materials have?
Yup
Yeah you need artist input IMO - other than fiddling with the blend/shading settings I have no meaningful suggestions
also are you on UE5?
Maybe something broke
UE5 might have been the issue... its working now and all I did was turn some things off and on again seeing if I had missunderstood something
how do i delete all unconnected nodes in blueprint like "clean up" in material?
Hey folks, just a quick question about 'ownership'. Is the built-in multiplayer ownership setup appropriate for also establishing a gameplay 'owner' of a particular actor? Or should I keep a record of the owning player (from a gameplay perspective) separately?
Say I have a "House" BP, would I just store a reference to the PlayerController within the actor I want them to 'own', and check against that if they try to paint the walls, for example?
Ask in #multiplayer - I think Owner can determine the network channel used and you probably don't want to lump everything into a single channel. But make sure that's the case.
If my suspicion is correct, you'd want a different field for the owning player - I would actually suggest not using an actor reference at all - particularly if you want to ever persist this data
using a net ID would be the better choice
Failing that you could track a faction ID
Yeah, I sort of double-asked two parts to the same question in both places, so I think you're right, using a net ID or something would be best. Thanks though! π
Permissions system could also work, too
All of that is more involved than Owner = Controller
I think I'll try storing a map of int > netID or something, and then I can iterate over that to find the right player I guess
wait what
hmm?
go #multiplayer
Hello! I'm new to Unreal Engine and I would like to learn blueprint. I am currently working on a game prototype. The current problem I am having is setting up the camera. How it works is that the game will be a linear platformer with an on-rail camera (similar to Crash Bandicoot if you've ever played that). The method I would like to use is a spline system where the camera follows the player on a spline based on the level's layout. It will follow the player along the spline as the character moves forward and backward. I have tried to search for guides on YouTube but, no dice. If anyone would like to assist me, please let me know.
Why would I get a pending kill error on a blueprint function that happens in a construction script - It's on a level that gets loaded and then unloaded
@sinful hound your camera component (or camera actor), on tick, would have to set its position by getting it from the spline. In the BP editor, there's a panel called Palette or Library or something... You can look up all spline-related nodes there and you might get some ideas. For example, there's several "get closest [something] along spline" nodes where you can use the character's location or whatever and figure out a good place along the spline to place the camera.
I don't have UE4 in front of me, but in my imagination, you'd get the character's location, get closest distance along spline, subtract some amount from that distance (because you want to offset the camera behind the character a little), and then get location at distance along spline, and use that to set the camera location.
I'm not sure how you'd handle camera rotation though. Maybe there's some tutorial or project example you can get some ideas from.
Also you'd need to make all these actors aware of each other (camera, character, spline) so there's some level of "BP communication" involved.
where is this bound setting and i'm assuming it's for some collision detection of this actor?
Thanks so much!
and this does what exactly? why would it be set higher than 1/
I have no idea. π
Does rotating the spline points work?
Don't know, haven't tried
Ah. Ok. Thanks.
you might want to try a spring arm. If you go into the character blueprint> Viewport> add compenet> Spring Arm. then make sure the arm is a child of the thing you want the camera to follow. Then attach the camera to the spring (Make it a child) then when you play it the camera will follow the player around. Hope this helps
how do i add delta location offset equal to velocity?
how to turn velocity into offset delta?
I assume you want the camera to be further from the car when going faster?
I am not sure about the "vector length" node, but something like that. Use the speed to determine the distance the spring arm should have.
From what I understand, it's just a scale applied to the bounds of the object, which the engine uses to determine if it's in the view frustum.
If you've got a simple 1m cube mesh with a bounds scale of 2.0, you're basically telling the engine "pretend this cube is actually 2m and don't frustum cull it until the fake 2m cube is out of view"
what was weird is every component of that actor was set to 1, despite the map error
not what i need but thanks for the help. for now i found a workaround. cheers
Quick question, how can I either add a component to a Blocking Volume or copy the grid format for other things?
Why do you need to add a component to a blocking volume?
I could use the shape of it to add a sound reflector
Can't you just use the mesh for that then?
Yeah I tried, but it gets too many triangles and messy. I either manually set a shape myself or use an existing one
Right! Hmm.
I reckon you could create the shape using BSP. Convert it to a static mesh, and use that. π€
i dont understand rotation ,even though i have locked roll ,my camera still looks like it rolls when the pitch and yaw combine ,how can i fix it
How would I limit the number of hit events that can happen per a certain amount of time to prevent spamming?
use a combination of do once and delay
I'm trying something like that now but still don't have it right I guess
should look like this @clear meteor
np
Worked perfectly... there are a lot of uses for this setup. Thanks a lot man.
its like a filter gate
Yep, makes sense
how do i get the world to local transform for a socket? i'm trying to set a world space rotation of a mesh relative to its root component, but the root component is attached to a socket that applies a weird rotation
does that make any sense?
ah, does the component transform not update when you attach it to a socket until the following tick?
@unborn radish there is a command called attach component to component but i am not sure if thats what you are looking for
BSP you mean brush? I will have a look thanks.
the socket the camera is attached to is rotated 90 degrees ,and i just fixed that there
How might I beable to update the WASD controls so that when I rotate a free camera that W is still "forward" and doesn't become right or left if that made sense!
You could use the Forward Vector of the Pawn instead of Controller or such
@wooden rapids #online-subsystems Channel will likely be able to help you better with that.
Thanks Authaer i didnt saw this Channel ,sorry.π
Haha. All good. People there will just likely know better.
hello, ive got weird bug, trying to make that Npc move when I interact him with keyboard, when I press the key nothing happends, its event not getting into that InputAction on debugging.
maybe it's beacuse on a Npc ( that its basically duplicate of my character )
You have to be possessing the character to be able to execute an input action. Since you're not possessing this one, it won't take your input.
It's not a weird bug, but you had the wrong approach.
I'd suggest you to look for Blueprint Interfaces or Event Dispatchers if you want to execute functions across BPs.
trying to put an icon on a minimap representing the player's position, but it's not very accurate
quick question, I need to determine if my current rotation is within a said number of degrees of the look rotation, its in my head but brain dead when trying to do it in bp
would i break the rotators and minus the yaw then check to see if its greater/less than number of degrees?
There doesn't seem to be Delay Frames in 4.26. Does anyone know why/when they removed that node?
Just use equal, maybe/
Is it okay to use a static mesh as a overlap register (just like box collision)? I want to have a flat cylinder collision but ue4 doesn't have it in by default.
@mortal cradle I mean, sure, it's ok. Just keep in mind that the higher the poly count of the mesh, the more expensive collision calculations are for it
edit: To clarify, I think mesh poly count only directly affects complex collision queries and the simplified collision volume for the mesh determines simple collision query cost
That's way more elegant than how I would bank the time of the last hit and only exec into my script if the elapsed time was > some threshold
Actually, no. There is something called a Trigger Volume, where you can choose Cylinder as brush shape, which has flat ends.
@burnt nest Will check this out, thank you
hey! how do I call setactorlocationandrotation from my characterBP to move my character to a chest so the animation plays right on it?
I ended up placing the location rotation node on the chestBP, and it does indeed teleport my character to it upon interaction but it teleports straight to the middle of the chest (inside of it) and it won't rotate the right way! how do I combat this?
Does anybody know what I'm doing wrong here? I'm trying to get the health of the character (BDO_3PC class) my component overlaps, but the cast always fails. If I print the Other Actor pin it does print the expected reference, it just doesn't seem to successfully cast.
(Looks like a couple different issues, it was overlapping an extra actor and returning cast failed. I think this part is working now)
If I have a user widget as a variable, how do I get the size of the widget (X and Y size)
there is possesing. on being play didnt pictured it but there is
still got the same problem , i dont know why when I press play i can see that the overlap is happening yet when im pressing "E" - my interact key nothing happend. the casting in event on begin play
Show the possess node :p
But as mentioned, surely interfacing or input forwarding with bindings or whatnot could be a better approach if you're not ment to fully control the npc
this is all the possess node, or i dont understand. its my first project in unreal
There's no possess node
Enable input doesnt work on pawns.
Which i assume your npc is
oh yes he is. ic now. didnt know this ill try to find another way to communicate with it then
When I add an event to the graph of a child BP class, 99% of the time I'm also calling the parent class. Is there a way to speed up this workflow / make this happen automatically? It's annoying and sometimes I forget to do it, causing me to bug-hunt.
Maybe not transferable but dispatchers cant be overridden so its like always calling the parent event aswell
so the possessing just kicking me from my player and camera to the other character. its not working either @gentle urchin
Hey, I'm trying to make a blueprint actor spawn a spline actor, is there a way to set up its starting spline point location, its final spline point location, and how many points are in between, all dynamically within blueprints?
Sounds about right that it does. Inputs should by then be forwarded to the pawn, as long as nothing else is consuming the inputs
but i just want to click E when im on his trigger box, i dont want to control him in anyway.
Then event dispatcher is the way to go
Is there somewhere I can read about "actively" working with arrays? I've only used them for setting/grabbing references to single actors.
I need to run an on-tick event on an array from a sphere trace, if I use a For Each Loop to get the actor will only the last actor be affected? I don't know what to google to read up on how this works π
@gentle urchin ill try to look into it π thanks :)!
@proud sable i dont know links but for each loop will affect every actor in array
it will go through whole array and excecute the code for every member in array
Thank you, what if I were to plug an array member into a set variable? I'm guessing it wouldn't work the same way?
it will set variable every time code executes so the last one will be set after array finishes
you can use for each loop with break
so you can for example check if actor name contains "BoxActor" and if true, pop that noodle into break slot and it will stop that foreachloopwithbreak node
what are you trying to do?
I'm trying to perform a sphere trace to get characters in an area, apply radial damage if they die within a certain duration and then repeat the ability to any other characters who get hit. Got stuck a few times and was told to use an array and assign the results to a variable but I think I misunderstood, it makes more sense now that I've reread it again
once you get a hang of it its very easy
Yeah, I usually pick it up after one or two tries. Hardest part is just finding the documentation on how to actually do it first π
@proud sable https://www.youtube.com/watch?v=3A5PjUycPI4 i'd go with Mathew Wadstein tuts
What is the For Each Loop Node in Unreal Engine 4 Blueprints?
Source Files: https://github.com/MWadstein/wtf-hdi-files
I think thats a custom function? I cant find that random node in my Editor
I tried to make it like this but the actor will always spawn a sound just at different times (i'm guessing because for each event trigger it will redo the random nodes and eventually play a sound).
is it possible to draw debug style lines in the viewport in the editor?
Yes, use editor tick over event tick
are you saying to expose the tick with a custom event?
and call from editor?
nm
i didnt have plugin enabled
anyone know why the node "Find Path To Location Synchronously" would return a partial result when target is in a continuous navmesh ?
if anyone is wondering ,i figured out the issue from yesterday ,turns out local rotation and relative rotation arent the same thing , i replaced it with set world location
How would I go about this?
Oh true, ty
Short of using GAS which I'm thinking you're not using, you'll want to use some sort of effect actor for this
Since you can have multiple instances of the same effect in a chain reaction.
You'll also want to use a dispatcher or some other way of listening for the death event.
Is there any reason not to use built-in damage system in single player game?
Nah just use it.
It's not really a system as much as just an interface to pass numbers around in a couple nodes for dealing damage in different ways.
Alright, I'm going to use it. Thanks.
Had some conflicting results with google-fu about it, so wasn't sure to use it at all.
I mean it's not really a super great system, it's very simplistic, but it'll work.
All signs point to GAS lately but I'm stubborn. What's the difference in how GAS handles self-replicating spells compared to UE (or well, default UE)?
You're for sure right about the dispatcher, I didn't even think to try that. Makes way more sense than checking on a loop. I struggled to get dispatchers to work in the past but hopefully it'll work this time
Is this for single player or multiplayer?
Single player, multi character if it matters though
For single player just roll your own system.
I would just make an actor that on spawn, does the sphere trace, adds hit targets to an array and registers their death event with a dispatcher. If the dispatcher gets triggered, it spawns another of itself at the triggering actors location.
That's mostly what I have minus the dispatcher, I'm not super familiar with how they work. What do you mean by register the death event?
RIght now I have a sphere trace, add to array, for each loop and break result. From there I'm not too sure, I'm casting to the enemy blueprint for the "dead" bool on a loop and it's a bit of a mess.
This would be a subclassnof a more general Buff or Effect actor
@Noabear#0001 https://www.meizenberg.com/post/event-dispatchers-in-ue4
In this quick tutorial we're going to talk about event dispatchers in Unreal Engine, and how they can be leveraged to manage complex relationships between multiple actors. Event dispatchers in Unreal, are essentially just a way for actors to subscribe to certain events of other actors and then react to those events. This is very useful because w...
You could even use it in a multiplayer game, it isn't super terrible but making a better framework is somewhat easy - say you wanted to implement something purely in terms of a component. There is a bit of room between the damage functions and GAS, which can be overkill.
But in general most tools in the kit are there to be used (with a few exceptions). If it seems to make sense to use the built-in stuff, go for it. It does work.
Thanks, I'll read through this and give it a shot
Okay that makes much more sense than the other explanations I saw. I think the blueprint works now, but is there a cleaner way of getting a dispatcher from an actor array than casting?
You can try sphere trace for actors and filter it that way but it's whatever
How would I get the dispatcher for that though? Is there a way to pull directly from the actor reference or do I need to cast first? I'm getting a ton of errors this way so something isn't right
The dispatcher exists on the character, if you get a reference of type MyCharacter you should be able to access the dispatcher. You can either sphere trace by class MyCharacter or just get everything and cast to MyCharacter to filter. Either way is fine.
I would use the casting as you might want to do other things to other types of actors
Does anyone know how to trigger something for multiples object on the scene?
I mean I have sort a super power and when I overlap with it the trigger works ,but when I overlap with the second it doesn't work
I did not put a " DO ONCE" node or anything about that
No dice with On Begin Overlap?
?
I have the enemies set up with a custom "EnemyTrace" channel for TraceByChannel, I couldn't see anything like trace by class.
Casting works for me in theory but it spits out errors half the time about pending kill. I think what's happening is enemies are dying before the for each loop reaches them or something? It seems like the faster they die the more errors I get
Do you use OnBeginOverlap?
Yes
You got there just as I finished this implementation. It works but sometimes the first path generated is way off course so I don't know what to do about that. Thank you for the insight!
is there an async path collector?
I couldn't find anything searching the forum or here
This is my blueprint. I can't find why it's doing just for the first object
do you know what I mean?
at least when the path is going the right way it's an improvement
in my bp actor, i have a spline and a box collision. i tried doing this to make the box collision contain the entirety of the spline but it doesnt seem to work. anyone have some ideas?
this is the result
How big?
thank you for the help I guess i'm locked out then π
It really depends on the genre you're going to work on. No one fits all solutions.
But generally few things to keep in mind:
- Use naming convention for your assets and folders!
- Use source control to keep track of changes to your stuff (Git, Perforce, SVN, Plastic... the choice is yours)
- Adhere to coding standards.
It's not a custom node. It's a cue file which is an audio blueprint. You are making it more complex than it should be. Google ue4 cue.
First of all, thank you so much for being specific. I'm not sarcastic.
You have two options:
- Blueprint Interface - this is more of a one-for-all solution for cross BP communication; all you need is to assign the BP into the interface and either make interface function call or define the event.
- Event Dispatcher - similar to BP Interface, but more for specific actors use case
If you need to know more about both of them:
https://www.youtube.com/watch?v=G_hLUkm7v44
https://www.youtube.com/watch?v=6IOgkWv1lEY
https://www.youtube.com/watch?v=ayCEqL7XFZY
https://www.youtube.com/watch?v=sEcoWGrF1Hg
What is a Blueprint Interface in Unreal Engine 4 Blueprints?
Source Files: https://github.com/MWadstein/wtf-hdi-files
What is Blueprint to Blueprint Communication, or how do I call functions or get variables from other Blueprints, in Unreal Engine 4?
Source Files: https://github.com/MWadstein/wtf-hdi-files
What are Event Dispatchers in Unreal Engine 4?
Source Files: https://github.com/MWadstein/wtf-hdi-files
How do I use Event Dispatchers in Unreal Engine 4?
Source Files: https://github.com/MWadstein/wtf-hdi-files
Hello Everyone
I had a question. Im working on my very first game and I am amateur in blueprints. so far I made a character that walks in an environment and collects flowers. What I want to make is when the number of flowers reach 8 the game ends with a slide or a cut scene. How do I make that in unreal blueprints? What I thought works was to make my character Score equal to 8 and if its valid quit game. but it does not do anything!
Thanks in advance!
If you're adding 1 flower every time you pick one up, you should perform a check after each pick up to see if your flower amount => 8, if true, quit game or whatevs
.
Need some serious help myself. Im dying. It's been 3 days of struggle. I need to get the distance between 2 sockets. getting the world vector wont work because it changes as I move or look around since the item in question is attached to the camera (first person). The catch here is that the sockets I need to measure the distance of are separate components. Imagine a rifle with a socket on the iron sights, then a sight of some kind added with a socket on the reticle. I need the distance between the reticle socket and the iron sight socket. I swear I have tried everything
Is this for attaching different reticle?
@zinc wasp Its for attaching a different sight, if thats what you mean?
Yes, I am working on RPG game, quite grandeur in scope for single player RPG nonetheless.
My struggle is more so of animation stuff, as BP interfaces and gameplay tags provide elegant logic organisation and propagation for me.
sorry you mean in level blueprints? quit games does not work in my flower pick up blueprint: here:
Why do you need to quit on begin play?
Why do you even have to abruptly quit the game process after reaching the goal?
Lol ya, I guess I don't play enough COD anymore. Usually modular pieces would do the trick but I'm assuming your pieces are not modular. Not sure if its ideal for you but I'd would just make it modular in a 3d program. Fixing the pivot points basically to match up with the rifle.
@zinc wasp I have done that already. The sights are modular, different sights that can be attached to different specified weapons
I'll show you the example
Abruptly quitting the game in the middle of gameplay doesn't make sense design wise, unless you're making FNAF like set pieces where certain events would abruptly quit the game.
@zinc wasp I am trying to minus the distance between the iron sight and the socket I have placed at the Sights retical. Because the sights will have different heights from the different guns so It needs to be done dynamically
Well in your blueprint quit game would never get called unless points = 3 already.
And since it begin play it'll only fire once and thats it.
im not sure if its the right place to use quit play.
Overall I want to start game-->collect 3 flowers (for test) --> quit game. simpleπ
Also, do the check either on tick (which I won't recommend) or everytime the player collects the item.
@zinc wasp The sights are modular. Im trying to minus the distance from the sights reticle to the original iron sight position so I can dynamically adjust the height of the gun. You see when I aim the gun, the white dot (my crosshair) should match up the same as it does with the iron sights, with the new reticle. This example is without any adjustment to demonstrate without
Do the check everytime it picks up a flower.
I picked up a flower... Let me check if its 3... Oh look its 3... I could quit.
I see. yeah im not sure what im doing. Ive heard Event Tick can be expensive thats why I didnt go that path
So i have that as a widget if thats what you mean: here:
Ok thats why.
in this widget I collect these 3 and the widget says 3 so I think thats working
Ya you could use the widget number and check each time there is a pickup
All you have to do is wherever you pick up a flower, whatever your event on overlap is or pick up event, just check when you add the flower to your count if its at 8 and then quit or whathaveyou
BTW, consider adding scary effects to spice things up, and wait a few seconds before quitting π
@heavy burrow
far behind what I want to make. I just want it simply work π
I know you said you tried everything but what happens when you just use the socket locations to get the distance?
@zinc wasp the socket locations dont seem to measure between each other if they are separate components. The relative locations are different and the world locations change as I aim the gun up and down weirdly
wow thanks! how do I make that Event!? 
Add Custom Event
actually heres an edit. Forgot to add the flower @heavy burrow
its a custom event. However you're adding the flowers now
on overlap or press E or whatever
Get the world location and than translate to your players local location?
I'm actually assuming all the sockets are in the players skeleton.
right. Is this supposed to happen in my flower blueprint ? or level blueprint? or third person blueprint?
Can you add a socket to the player skeleton? But looks like you dont have a player skeleton.
Wherever you did the flower collection logic.
LOL.
got it
do I have to define custom event somewhere else? ive never worked with that I just made a new one and did this and nothing happened
@zinc wasp I have a lot of unused arrows and such cos of my abundance of tests but Im currently using the Sight skeletal and the weapon component
You have to call it. On overlap or however you picked up the flowers
.
@zinc wasp The weapons have different skeletons for animation and such so I cant include it in the player skeleton, But yes I dont have a player mesh at all so XD
Ya now I see your problem. From my understanding what your trying to do is get the distance between the weapon and its attachment and than add it to an offset to adjust its height.
@zinc wasp This essentially demonstrates the process I am trying to achieve - (this doesnt work)
got it . So I called it and it does quit the game but the numbering is weird. if I make it 0=> it will quit with the first flower. if I make any number higher like 3=> it will not quit at all.
@heavy burrow lets see your blueprint
so this number is what i am not understanding
you arent adding anything on your points at the beginning
that number you pointed to is the number you want to have collected before you quit
thats weird becuase my widget is viewport says that I do. ok I make that 1 and now Im gaining 2 points for each flower instead of 1
right that should be 3 for this test
so if you want to quit when you have 8 flowers, it would be 8. But you have to add 1 when you collect everytime or it wont be called
what are you doing in your widget?
Is distance vector giving you the correct numbers? Does the springarm changes location from weapon has sight = true?
I feel more that this is debugging than actually programming. The logic makes sense to me but something in it isn't working the way it should.
it does change location yes but this is what happens when I use this blueprint -
Oh.
tell me when you spot it XD
The pitch
ok I see why it adds 2 point when I make the first number 1. here:
If i include the X and Y in the distance check, it doesnt rotate weirdly but the distance is off
Is it centered with the camera?
this guys has 1 in itself
Center the springarm with the camera and than adjust the offsets.
but even turning that to 0 and making the point 1 and the 3=> still does not quit!
@heavy burrow you dont need to increment the score with your widget if youre doing it with your character. Just cast to the character from your widget and get the points variable. then set that to show as the text
@zinc wasp The spring arm is centered
The distance shouldn't change tho when looking up and down.
Maybe because its giving you a negative number when looking up
Connect a abs
it didnt appear to be
I think i tried before. It all prints as lower values in the center but higher values as i look up or down
Show a side view with the rotation point of the camera and weapon
They are obviously not aligned
they are very aligned
IS your lerp always = 1?
Which arrow is the master for the gun? And which one is the location of the spring arm?
The lerp alpha
the gun is the arrow directly from the camera there and the spring arm is selected
my lerp goes from 0-1
@lone garnet so are you directly moving the gun and then animation for the Bob when moving? What is directly controlling where the gun mesh is?
ignore any hand mesh information. I have no hands or mesh for the character. Just floating guns. If i need bob it is either camera shake or animation on the gun directly
hello , everyone is it possible to increase the text size for print statement in blueprint .
or spring arm lag for bob on the weapon
Attach a static mesh or another arrow to the gun attachment point, does it move at all relative to the camera?
the gun location is controlled via those arrow locations and attached to the spring arm which is attached to the camera
when I aim, it goes directly to the spring arm end with 0 offset
So spring arm is parent to camera and gun with no other component in between? And control rotation is what's driving the spring arm?
And aiming does nothing animation-wise?
spring arm is attached to the camera. The camera has no spring arm like usual. The weapon is attached to the spring arm. So it goes Camera>SpringArm>weapon
I took out increment score and added the widget but the problem stays still. with taking out increment score the widget also does not respond to picking up even with the fact that I called it
aiming currently Just sets the animation to the rest pose
Show spring arm transform and weapon transform
the weapons origin is set to the iron sights
so it may not look like it but the weapon has no offset from the end of the spring arm
I mean the transform in the details panel loc rot scale
He has a distance as an offset.
and ive tried having no spring arm length too
this is the transform of the weapon and the spring arm. They are both 0
Is the distance always the same?
I'm just guessing it has something to do with world location and relative location.
the distance from the camera when I aim is always the same
it is definitely to do with the world location in some way
like I said, if i include X and Y in the distance check, it doesnt effect pitch, But then the value is off
And remember, this pitch problem doesn't happen without a sight so it isnt to do with where I have my offsets in the viewport
Wait a second, are you moving anything or just rotating?
I am moving the weapon from its 'Hip location' to its new target 'aim location'. But these can be the same place and the problem still occurs
no rotations occur
getsocketlocation is world location?
i believe so
That has to be it than.
Because your setting up relativelocation.
Ya that sounds fucky
so what are you suggesting?
Is gun a static mesh or skeletal?
skeletal
Maybe just set a float variable as distance and than add it to the setrelativelocation.
Because the offset shouldn't need to change.
Once you get the distance.
I tried that. I set the distance when I added the attachment but it just depended on which way I was looking when I added the attachment
Why are you having offsets and distances? That sounds super weird. Just have a socket or scene component that the gun is snapped to when aiming. Make sure that socket or scene component is riding with camera
Just hard code it lol
Make the arrow component visible and check if it's parallaxing
it isnt
Show that whole attachment graph
The distance as an offset shouldn't change. Find the right offset when facing straight forward and use that at all times.
Does It screw up when you don't take the weapon has sight path?
it just uses the normal Iron sights instead
Well yeah of course but does it still do the parallaxing?
no
Okay then the problem is in your offset calculation, and I'm pretty sure it's because you are getting the position in world space instead of local.
yes thats where Ive got to
Just get the LOCAL z position of the sight bone and use that
No distance calculation, nothing
but i cant measure 2 different component sockets with each other in relative
Get the world and translate to local
You just need the sight bones Z location in local
I mean I'd just give each weapon a float SightOffset but that's whatever.
like this?
Yeah something like that. I don't know where your root bone is and all that stuff but it'll be something of that sort
I have given each weapon sight an offset in the struct of the item but the weapon heights may be different where you attach the sights
so the sights wouldnt be a hard offset every time
yeh that code doesnt work btw
What are the other options for space
World, actor, component
I would probably pick actor or component, depends on if the gun mesh is the root component
Anyway, that select node looks Goofy too.
Are you scaling anything?
nope
Also is the AimPoint X and Y 0 and 0?
X aim point has an offset
Then what's that select return if it's false? All 0s right?
just moves the gun to the aim point
So when you have a sight you're offsetting in X and Y? Cuz if it's false it's moving the gun to 0,0,0 relative to parent which is not aim point
What kind of output is the get socket location Z returning?
And what kind of number would you expect from it, something like five or six centimeters
if I have a sight, it moves the gun to the aim point as it would without a sight except it also adds a different value to the Z. Yes I'd expect something like that
But the only way it'll actually line up with where the AimPoint is if it has a sight, since you just said that AimPoint has an X offset but that node will return 0 x
it is currently outputting with local bone space, -0.00002
What about component or actor space
and in component space, 49.6
and in actor it changes based on where im facing. In the hundreds though
Yeah something is scaled or rotated somewhere. Try the other coordinates in component space.
Also I would move gun to AimPoint Location + (0,0,bUsesSight x Offset)
No select or anything
Y changes on where Im facing but X gives a nice value Id probably b elooking for. 4.something
yes blender
Ya I bet all your meshes have some weird scale or rotation on them, on the assets themselves. It's a pain but I'd get the export settings dialed in
I don't recall but I'd just play with the coordinate settings and experiment till it comes in without rotation or scaling
Don't quote me but I think something like this is what we're using
hey, does someone knows how to apply a force in a specific face of an object?
Somehow get face location, and get face normal, and you'll have the info to work with. You got a Hit Result to use?
What's the context, what are you trying to do
im trying to make my car fly from the botton, so in that way if it tilts you wouldn't be able to recover but any impulse or torque applied doesnt want to work, i've tested other models to see if my rigged car woul have some problems but it happens the same on the other models too
Just apply the force at a location towards bottom of car
CarLocation + UpVector x -100 would apply it 100 below car origin
Or just put a socket there and use it's location
a socket would work?
Yeah a socket is just a named transform relative to something.
ok ill try it, thanks so much for the help
nope
it doesnt work
its like the force its applied over the global z axis instead of the car z axis
i dont know how to fix that
this is what i've tryed
is it possible to spawn a copy of the camera on my player actor, and switch to it?
Thanks for your help both @zinc wasp and @faint pasture Still not fixed so far but I imagine it does have something to do with export/import. I'll just have to mess around with it for a bit
Hey everyone, I'm having what I hope is a pretty simple math/control related question.
I'm trying to get the yaw rotation in 360 around an object which is easy to do by itself, but what I'm trying to do is have that rotation value always start at 0.
So for example no matter which angle you're looking at the object, once you start moving the camera, the yaw would start at "0" and then be able to rotate all around up to 360 (back to where it started)
The problem is I don't seem to be able to find a way to do this without getting the world rotation of the camera/object involved, which is not what I'm aiming for
i've done that from a yt tutorial with this code and i spring arm
Huh, I think I follow what you mean! So I'm assuming the mouse X value is what is driving most of the "starting point" for the new rotation?
yeah
you can change that value to whatever you want
so you coul orbit the object properly
if you think about it its like a shooter scope aiming system but fixed in a point
Okay, I'm going to give that a shot. Thank you for the help!
btw the ball cam and the branch are not needed
np π
Hey there, I am fairly new to UE got a quick question. I have a BP_Player blueprint that contains a public variable called PlayerStats (structure). I have an UI element where I want to show that player's CurrentHealth just as a text. This is my current player ui widget. How do I access the PlayerStats variable of my Player Blueprint from the UI wiget? And is this the correct way of doing it?
i think that you could make a cast or make the variable public like the other one, but its just an orientation i dont have many idea in also kinda new here
Can i damage enemy using tag without using get all actor with tag?
Damage typically happens on hit, or on overlap, which would allow you to reference the hit/overlapped actor.
hello, i have a vector variable. How can i vizualizate this variable? I mean, to use Draw Debug line you have to have Start and End position of line
or could i get start and end position from this variable to use Draw Debug line
?
DrawDebugPoint
i am not sure, that point will show me direction
i just want to invert this variable
and be sure, it goes to right direction
is it posible?
I'm trying to activate an enemy spawner when my character enters the sphere collision on the spawner. This is the setup I'm trying but I still get no overlaps when I check with a print string. Both the capsule on the character and the sphere collision on the spawner are set to overlap eachother on a specific object channel with "generate overlap events" or whatever turned on
@fading wren DrawDebugArrow. StartPoint is Location. Endpoint is Location+(Normal*100)
Line works too I guess. Either way.
Ok thanks
Hey yall, got a quick question. Is there a way to fire an event when an object hit's a certain rotation point or do I have to have a rotation check on tick?
Do it on car z axis then. Force = somenumber x CarUpVector
@tired chasmNot in blueprint. Not unless you're setting your rotation in blueprint. Normally you'd override whatever movement component you're using, override a virtual function involving movement when it's set, check it after the super call and if rotation is what you want, broadcast a delegate.
How can I set the controllers rotation input? There only seems to be blocks that add to it
ControlRotation is part of the Controller
Get the Controller of the Pawn and then you should be able to access it
How would I do that?
Sorry if i'm stupid lol, I just started learning blueprints minutes ago
Just use the GetControllerNode
And use the return value of that
That's is the Controller that possess the pawn
I see
Also, would I be able to make my own function?
I have a lerp function that i made because the existing lerp function is confusing to me
@olive chasm Lerping is simply taking two values and getting a point between them based on a 0-1 scale.
I know
I lerp like this
But I was wondering if I could simplify it down to a single function
What is confusing about the default one then?
I just don't know how to use the default one lol
You put in Value A and Value B and a value between 0 and 1
0 is A
1 is B
everything else is in between
isn't there lerp nodes tho?
Well yeah we said that already :P
soz, i'll crawl back to my cave

Oh, i see, I figured it out
I thought the lerp node didn't work the way i thought it would because the alpha i was putting in was too small
Don't go reinventing the wheel until you can roll one handed to you.
nah jk imma chill and watch something, cya
thanks for your compendium on networking btw sir 
No biggie
I thought the lerp function worked with a delta seconds thing like some coding languages i've used
Like sometimes they take in a time variable
That's Interp iirc
Oh i see
@olive chasmLerp will always just go off of a 0-1 scale. For instance. Lerping between 0 to 100. An alpha of 0 is 0. Alpha of 0.5 is 50. Alpha of 2 is 200. Alpha of -1 is -100.
Finterp to or finterp to constant are what you're looking for. If you want a constant interpolation
But to answer the original question. Yes you can make your own function in any class you want. Just click here.
Something like a generic "lerp" function, that you might want to use everywhere, should be place into a special Blueprint
Called "Blueprint Function Library"
Cause that will be a static function you can call nearly everywhere
I see
Another thing, how would I make view bob with a sine function? Just like, while moving, it moves the cameras y rotation from 0 to -10 with a sine function so it bobs up and down
@maiden wadi hey thanks! I'm not quite sure what this means "check it after the super call and if rotation is what you want, broadcast a delegate" but I might have physics dictate the rotation of the object so I think that might make it a little complicated haha. If I have to use tick though it shouldn't be that bad I think. I might use a timer instead actually.
I'm not familiar with the calls that physics uses to rotate objects. But that'd still be C++ territory. You can honestly likely just use tick.
Just make a function that outputs a rotation given some parameters or whatever and it'll work. Though I'm pretty certain it can be done way more robustly with the camera shake system.
aaah alright. thanks! Yeah I think I can get away with using a tick for this! : )
If you're going to be reusing it everywhere it would make sense to make a function but you're still going to have to call that function on tick. But I would look into the camera shake system, it's probably a lot more robust than whatever you would cook up.
Hey can I ask for ideas on how to get a float value? I need to calculate the player height from ground when not jumping/falling, and only when the player climbs/goes up in a more sloped ground. So far this is spaguetti of ideas
Just line Trace downwards
that was also my thought.
I thought about it but doesn't the trace stop at the ground therefore being useless if the player is not jumping/falling (aka above ground)?
also just to let you know, if you're a BP that's in the character class, there's a node that checks weather the character is in air or not
When walking up a slope, the distance is going to be very small, on the order of like 20 cm maximum. When climbing, assuming you have a climbing system, the distance will be arbitrarily large.
Idk how you would do this, but can't you just do the players y level - the ground y level?
Oh wait nvm
Do you mean height from any collidable geometry or height from the actual terrain actor?
I mean by definition, if you're walking on something, you're not that much above it. Anywhere from 0 to like 20 cm
My english isnt the best so I will paste the picture, for example when the player goes up that slope, I need to know the value (and then filter to distinguish from more normal slopes)
Good afternoon β
Is there a good way to update a blueprint's asset from a marketplace's library? For example, a new version came out, but I moved the folder from the previous one to a more suitable place. Inside there are blueprints and they are used in many places. How to update them to a new version if it is downloaded by default in /Content/AssetName
After all, the result is 2 different directories π
You probably want the steepness of the slope, not the height.
Hi everyone, is there a way to. At runtime import a Static Mesh (FBX), and show a list of meshes in UMG. In the UMG Iβd like to see a preview of the mesh?
What are you considering "the ground"? Just Z= 0?
The runtime import will be the hard part.
I started to calculate the "ground" from the lowest possible Z position player can be, and thought process was to go from there.. But you gave me the right words, google now brought new forums and posts, will check there thanks; (and be back if I need more ideas) π
Iβm able to bring FBX in, this was done in CPP.
Iβm thinking of something like the Static Mesh Preview image as a texture.
hi guys i am using a mixamo character for some tests and i am having problems with the animations but i dont quite understand, could someone help me or have you ever gone through this problem
i get it to work with pretty simple mathe already
I don't know if those preview images get built at run time, I would doubt it.
Everything I'm seeing on doing this in a game basically just spawns the mesh in a little studio under the map and renders to a view Target
Yeah that'll just give the car a bump and it's up Direction every time you click the right mouse button. That doesn't sound like what you wanted to do but it'll work
Thanks Adriel, Iβll ask the CPP guys.
yeah thats what i wanted
also do you know how i can detect if the car is in the air?, because the is flying function always return false
no matter the state of the car
You can use a simple line trace, in the middle of the car.
Depends on how your car is implemented, I detect if a vehicle is in the air in my game by just keeping track of event hit
Point it down, and check the distance. If itβs more than a certain distance itβs in the air.
π
Basically every frame it is touching the ground, there should be an event hit on one of the tires.
You could also just keep track of acceleration, and if it's close to (0,0,-980) you are in free fall
hi guys, can i see which blueprint is giving me framedrops? im getting random frame drops, no idea what is causing it
Profiler
im a little scared of line traces bc i dont know nearly anything about them
but seems greats thanks
i think i will try this
thanks
@storm dove https://docs.unrealengine.com/4.26/en-US/TestingAndOptimization/PerformanceAndProfiling/Profiler/
An overview on the Profiler Tool used to monitor game performance.
seems to be easier
That's how I found out that moving a couple math operations to C++ made my vision system over 100 times faster
Yes it'll tell you down to the node
Just learn how the tool works, you'll be using it a lot if you're doing anything even remotely heavy
my new friend
Would anyone be able to direction me way of how to make camara turn when the charactor model turns ? i am trying to look up what it called basicly im trying to make camara turn in top down blueprint as i left click around
i assume what i need is rotation value of charactor model some how attach that to left click i dont know what to look up to do that o.o
nvm i figure it out
ok, i have this widget which let you open all the others in-game menu and set characters movement through the map; this widget is called pressing a sequence of buttons (alt + T)
can I place this logic on Player Controller or there is a better one if I want to let this widget be accessed in every situation that the game proposes?
I was thinking in Game Mode however I can not set a keyboard button command in the Event Graph π
Hello, I'm stuck somewhere and my mind can't get why this happens, So I have a gun that play animation when i fire and then there are 2 bullets spawning, 1 as ejecting shell & other as shooting from transform of 2 different invisible bullets , now the problem is when I add impulse to one of them the other one is affected as well with the other one's impulse, any idea why this happens?
The server can only have one level loaded at once, correct?
is there any way to 'shield' the character without directly editing the character blueprint? anticipate the damage using an actor component or anything of the sort
but still register the damage somehow so lets say i wanted some sort of a power word shield type of deal or perhaps a 'cheat death' mechanic would this have to be done in the bp directly
hey, i'm noticing some slight ghosting in the movement of my player character. I remember in the past seeing a video that described how to fix this, but can't seem to find it. anyone got any pointers?
something about predicting the location i believe
Anyone have the ancients demo installed? Can some take a look at tell me what the character max speed is and acceleration, please?
Hey guys, pretty low level question but is there any built in way to detect if the instance of the game is being closed down (i.e alt+F4 or closing down the game via ways not coded in by me)?
It's to do with saving game data and i'm sick of using a save game button to save variables, I was thinking about updating the save game data every instance of the variables in the save game data changing but
that sounds a bit extreme compared to the method i'm using atm.
I'm not crazy good with UE4 so 
You can specify a custom game instance and respond to Shutdown (maybe "Receive Shutdown").
I have no idea if that's early enough to actually do anything
But if you still want a "Exit without saving" you can set a flag to prevent the GI from saving on exit
You'd also need to track the currently active save/autosave slot
Hmm, sounds risky but is there any way to stop them being able to exit the game instantly? Like I remember trying to exit some wacky games where they pop up a "Are you sure you want to leave q.q?" UI
I mean if i can force them to click a save button it works that way too, which would be the exit button
Ok i'll go about it from the game instance. Thanks a bunch β€οΈ if it works i'll put you in the credits of this game i'll never let see the light of day.
I could suggest some things in C++ with a bit of research
But in BP that sort of thing is likely not exposed
best you can hope for is to just do stuff on that event but not do anything async
Test it out - that's the obvious solve here.
ty
Hello, I'm using a controller to rotate my camera in game by getting the axis values with the 'Gamepad Right Thumbstick 2D-Axis' event. However, after a bit of moving the camera, these axis values are set to small numbers like 0.016 which makes the camera rotate by itself. Does anyone know an easy way to fix it ?
Do i understand correctly, vector variable it is variable that contain coordinates (X,Y,Z) ? in that case, what coordinate will store "Wall_vector" ? Coordinate of Impact normal ?
Strange. Controllers can get this problem after a lot of use, so difficult to say if it's UE or the gamepad's fault. Anyway, you can check if the axis value is above a certain number like 0.05, and if true, process the input.
Yes, that is correct. If it's the location you want, use "Location" or "Impact Point". A "Normal" is a direction.
thanks, for answer. What coordinates would be stored in case if i write Normal to "wall normal" ? i mean, what should be in X Y Z to store a direction there. Just trying to understand how it works, i am doesn't have programming skills π
or, if rephrase my question, how can we store a direction, using just coordinates of one point
if i undestand correctly, we need two points, to show direction
Vector maths are one of the most complicated things you can work with in UE, I don't fully understand them myself. I believe a vector normal has a length, which means it can reference a point in space as well as a direction. You'd be better off googling vectors than asking me though. π
yes, i am agree, most complicated for me π i want to belive, when i win a fight with vector math, i will able to solve everything
I'm sure you will! π
Thank you Raptor it worked π
ok, now i am really curios, how vector variable could store a direction, using only cordinate of one point
i checked variable
it do store only one coordinate
and that allow it, to draw a line, that align to ball direction on a moment of hit with wall
screen was taken few second after ball hit a wall
Vector from 0,0,0.
Impact Normal is the Normal Direction Hit, I believe
Break Hit Result
0,0,0 of wall ? or from world ?
ahh wait . "Normal of the hit in world space, for the object that was hit by the sweep."
you mean it show me coordinate of blue point
so in that case, variable just store a coordinate of blue point(normal) and then just draw a line from world (0,0,0) ?
and that is showing a direction
in that case
will this be correct
Nope
ok, what exacly this
1 sec..
direction of the face normal of the plane you hit
The plane in my video has only 1 face, and it is facing (1,0,0)
here, my plane is facing up. so the normal of the face hit by the trace is facing up.
this prints (0,0,1)
@fading wren
shoot your trace to the floor, and you'll get (0,0,1) . This is because the face of the ground plane is facing up. +Z
Normals of the plane
thanks for video, and insctruion. Yes , i do understand, when i use this one
it will show me a normal of wall
which is mean 1, 0, 0
but i was asking about
if i draw a line from the ball
it show this coordinates, after ball hit a wall
and if i undestand correctly, it is coordinate of place where ball hit https://cdn.discordapp.com/attachments/221798862938046464/858599885518274600/unknown.png
Is ur wall perfectly aligned to the +X aaxis?
Is that a Unreal made cube, or a fbx u imported?
for what
To see if ur trace is actually hitting the box
hello can someone help me understand why my cpu stalls ?
yes, it actually works as it should
blue line is wall normal
red and yello it is direction
of a ball, on moment of hit the wall
i just try to figure out. how does this red and yello line works. if vector variable store only coordinate of one point
i mean to draw a line, you should have to points
Vector is a point
When a vector is describing a vector direction , then it's from 0
Can you print out HitComponent and tell me what you get?
wait, vector is a point ? i thought vector is a line
how to launch your game in a non-debug build ?
Plex, remove the static mesh from the Bp
ok
Ok, select ur box in the Bp, and turn Collision presets to block all
Then u should get what I expect
(1,0,0) or something whole like that
but i exspect to get a direction of ball at the moment of the hit
i do not need normal of wall
i need ball direction
I just wanted to see why you got this... https://cdn.discordapp.com/attachments/221798862938046464/858605053161504808/unknown.png
but nevermind... I think the answer is because the champfer box is slightly off. π
Ok, sorry... you need the ball direction?
The forward vector of the ball ?
Is ur ball moving? and u want to know which way it's going?
it is coordinate
of red square
place where ball
hit a wall
and it show a direction
of ball
at the moment
when ball hit a wall
ball on the screen in another position, because it screen taken like 10 sec after ball hit a wall
blue one is wall normal
When the ball hits the wall... you want what to happen?
Oh ok
if i have only one point
how ue4 draw this red yellow line
how does UE4 draw this red and yello line
?
if vector
is just a point
not a line
In ur trace you are giving it 2 points , no?
In ur trace, you are saying ... OnCollision ... trace start of ball, to end of ball plus ..
ok cool
could i draw i line using this variable
lets say i want to draw a inverted line
using variable Player vector
how can i do it
?
i have only coordinate of place where ball hited a wall
From wall to sphere?
correct ?
Where do you want to trace from ?
start point will be variable "wall_vector"(which is wall normal) - variable of "player_vector" (red and yellow line showing a directon of ball at the moment ball hit a wall)
From the Red box to where?
inverted direction of ball
i need calculate and draw a line that will show inverted
direction of ball
Join us for an afternoon of math... for artists! Bill Kladis and Wyeth Johnson, senior VFX artists at Epic, and David Hill, our Principal Mathematician, will walk us through examples such as Derivatives, Cross Product, Vector Transforms, Sobel Edge and calculating gradients around distance fields.
ANNOUNCEMENT
https://forums.unrealengine.com/un...
Check this out when you have time
yeah
i checked it
it doesnt help π
didnt*
they showing how this should work
but doesnt show blueptint
what is inverted Direction of ball mean?
Facing away from sphere?
not really. red and yellow line show a direction of ball, at the momemnt where ball hit a wall. screen was taken afte 10 second afte wall hited a wall. thats why ball placed not near a wall
In this free step by step Unreal Engine 4 tutorial video (UE4 how to) you will learn how to make a laser system that reflects light with emitter, sensor and mirrors using blueprints.
All my UE4 tutorials: https://www.youtube.com/watch?v=BT0jFArPtGM&list=PLEp7216xGGILh3i2BZe2E0ZEuiIGa-VQT&index=1
Download Light Bulb asset: https://drive.google....
this?
my internet keeps dropping
Yup. Look up laser beam on YT. Basically draw multiple lines in different angles
@fading wren just a final though ... the +X axis is generally regarded as the forward axis in Unreal. So when u have a point. The x axis is forward
+X being the forward direction, +Z up... so that how you get Direction from point.
so location of point in world have direct influence to direction ?
If u say Go Forward, it will take X as forward and go that way
I would say think of vector as a math/programming function, rather than physics function
vector stores 3 values.
That's it. forget about Direction. π
π this vector math is not for 3d artist brains
also, look up Linear Algebra
what for we need linear algebra in blueprints
very helpful for game mechanics
this playlist is very visual and easy to understand
This... what you just did, is Linear Algebra
vector + (vector x 500)
why do you plus GetWorldLocation to (GetForwardVector x 500) ? What is the effect of doing so? watch the linear algebra playlist to understand. π
Ok, I'm off . Nice talking to you. Night!
thanks for help π
it was nice to me too
Can you not preview values while playing?
https://i.imgur.com/oux1Dvo.png trying to debug stuff
even when my character is moving these values remain 0
did you select the entity to debug at the top ?
by default it's not selected 
ehh, which top :V ?
in your blueprint
there's a dropdown
which tells the engine which entity you wanna debug
d'ya mean the debug dropdown?
ye
i can select the blueprint debugger. But with that on, the values watched still just remain still
uh 
they just look like this
I guess it only works if the game is paused? Tho i'd like to debug it live, to see what the values are
think i figured it out
Hey so, how does one get this variable? I was only able to create the variable from promoting a open level blueprint.
It says world, and is a soft referance
Cant seem to find it when I go to create a new referance lol
If I directly put a particle system as a component on the player pawn, it seems to disappear after setting the player's transform (teleporting the player). Is there a way to fix this
hey guys im trying to make a shoot system for my marble game but im stuck,i want the projectile to be shot from the player(marble) to the crosshair i have.
But it keeps shooting from the player straight ahead.Any tips?
isn't there helper classes to get a reference to world anyway?
Hi guys. Got a problem with saving. What's a proper way to save selected mesh? Trying to save it as Static/SkeletalMesh ref, it works on editor, but it fails on build. Soft references and path are fails too
Hello, Question. when I execute this functions the game stuck for 1 -2 min and then continue, (all I'm doing is when Key pressed some of the actors's Material is changing and one of them is set to invisible- each of them alone works good only when im trying to apply all together its stuck) anything I can do to make it change smoothly?
is there any way to convert a struct text writeout into a new struct instance??
This is what I get back from the C++ side after an ExportTextItem
(EventName_23_3D53544A416C0930FF1931A8D83AC617="Event_BuildChest",SegmentName_5_06B0D40D46D4CC3D8B934B891D73FB16="Chest",BuildPart_18_EC765E91488CCD2B58837E8B8E49F964=(),SegmentDescription_7_E070DB7243757ED932867DAF456C600A="Build a usable chest",CustomIcon_19_61C359F744F0DBED73A218A8BD39D70A=Texture2D'"/Game/TemporaryAssets/Textures/Icons/T_Icon_War_Hammer.T_Icon_War_Hammer"')
Make it happen over several frames. 1 loop per frame f.ex
If it still lags, half a loop per frame etc etc
I would think its faster to bind them up to a dispatcher instead but dont have any data to support that statement
is there any implementation of SHA256 HMAC for blueprint available? if not, how would I implement it
if you have any experience with C++ at all, blueprint function library for your blueprint/C++ connection; and a C++ library you can find online should do the trick
is it normal that you have 150 loops inside each other?
you're not using the completed pin

Hey can someone help me? So my project was working fine yesterday, but when I reopened it today I got this error
why is everything an infinite loop
show the faulty blueprint? maybe it failed to save the latest version or disconnect some pins randomly 
this apparently
They dont share the same array size. Will it still work? Never used Macro before
@shrewd oar Put the loops AFTER one another, not inside. You're doing a billion loops here
@shrewd oar
Hmm could it be doable to make a mirror shows what the server sees? This way you could perhaps see if what you're doing is replicated
@midnight cove casting every frame is very expensive
on construct, get a reference of the character then just call it on update instead of casting it everytime
and from what I see, that shouldn't be an infinite loop error. Do you have other casting to bp player somewhere?
Is there a way I could adjust this setup to smoothly move my camera between characters?
Right now when I swap character, the camera does smoothly move to them as long as they're standing still. If they're moving the camera moves to where they were when the swap was initiated and then jumps to the actual location on attaching.
Hmm... with the setup you got here, I'm inclined to think "no". Since "Move Component To" evidently cannot update the location, you can either perhaps put another "Move Component To" after the first one, set the time to something quite low, and turn off "Ease In/Out" to make it catch up the the character quite fast. It'd be an improvement over teleporting at least.
Or you need to work with Timeline and lerp instead, and attach the component once it's close enough to the character.
I was thinking the same regarding the additional Move Component To node after the first. Looking closer though I don't think this setup works too well anyway. The camera rotates fine on the Z axis but if the swap begins from a high or low angle it twists weirdly before attaching
That could be the "Force Shortest Rotation"... might see if the twist persists at least if you turn it off.
I thought so too but it doesn't seem to be the case, repeating Move Component To also seems to make it worse. I guess I'll scrap the idea for now, it wasn't too important
Fair enough! π I still recommend either Timeline or Timer and lerp when you give it another try.
What's the viewpoint here, top down or over the shoulder or what
Okay yeah that actually works much better π Thanks!
3rd person, in between top down and over the shoulder would be the best way to describe it I think
Can I ask what your alternate character is doing while you're not controlling it? Sounds interesting. π
It's bare bones at the moment, but the other AI stay in formation and have their own fighting behaviour
Hi there, I got a small question concerning blueprints that runs in the editor viewport without pressing play or simulation. For some fast context : I have an Unlit planet shader with a blueprint where I can link any actor to act like a light source in the shader ( It takes the actor position and process the vector to determine from where the planet shader should be lit)
It works well while playing or simulating but I wish I could move my actor in the editor viewport without pressing play, then I could easily find the right position for the planet lighting and have the values registered in the material instance, wihtout having it reset after I closed the Play/ Simulation.
What would be the best approach for that ?
this part is also causing problems
hey everyone i got a error when i hit play my character autmaticaly step up and start walking in air all animation are working fine but why he walk in air i am using ik foot can this be the reason
uh somethinbg is probably setting your movement mode to flying
Do you mean that he's walking a bit over the ground as if hovering rather than walking on the ground, or that he can actually move upwards?
Is the only issue being able to move the actor in the editor without PIE/Simulate...? π€
Ive just had too scrap a massive script cus of how many bugs it has
Whats the best way too have the player rotate towards a set rotation
Like if you want to move right it finds the shortest path too 90/-270 degrees
Hey guys is someone familiar with ghost replay? I'm trying to interpolate my vehicle saved position with a timer set at 0.2.The replay it's fine but it's still laggy because I noticed that it repeats the index (for example it goes from 0 to 1 then from 1 to 2 then from 2 to 3 etc) Anyone know a better way to interpolate between position of the same array?
Find look at rotation
You should probably use Lerp (Vector) and Timeline or timer.
what I did but nothing...it's laggy
A timer set to 0.2 will run every .2 seconds. If you're also not using lerp, it will just teleport your vehicle between the points every .2 seconds, making it choppy.
Then when interping the rotation make sure x and y are zero on target so only the yaw rotates
Lerp between indexes ?
If you add indexes every second then you just have to lerp between index x and index x+1 every second
i did this
And the lerping can be done by a timer
Also thanks for your question , you just helped me solve this in my own project
there is a timer set a .2 and the timeline is the alpha
That will be very strange. You'll set the new index every .2 seconds, and the Timeline will try to finish before the timer ticks again. π€
If your willing to wait I can try to implement this once I get home
@zenith trout Bruh thanks, Didnt reallythink to use it like that
But that wonβt be for another 2-4 hours
I mean, it looks good the result but when printing it repeats the index and it gives like a micro lag
No worries
Instead of Index Ghost node, plus int, and then set, you can just use an Increment node. It will add 1 and set it all in one go. It's a small thing, but good to know. π
yes sure but will it make any difference? I'm stuck on this since days eheh
No, it won't. π
What I would do, is not run a looping timer. Just run the function you got, then run it again on the timeline's "Finished".
What you are doing currently is updating the index, then starting the timer, and then after .2 seconds, whether the timeline is done or not, you update the index again. They're interfering with each other.
tried also this but didn't worked too π¦
Run the timer on start
While it runs lerp from the current index to the current index + 1
Once thatβs finished increment the current index and play the timer from start
The speed of the timer will be the same as the time between each index (ie if you added the indexes every 2 seconds the timer would lerp over 2 seconds)