#blueprint
1 messages Β· Page 240 of 1
Thank you, does this work in shipped games ya think?
Pretty sure it does, you can test it but I personally have nothing from console command.
Fair enough, i'll do some testing. Gotta alter screenpercentage in runtime for high fidelity screenshots. Just running higher resolution aint enough sadly
does it make any difference to set the precentage more than 100?
Yeah definetly, I've set the editor to run 85, if i change it to 125 for example the difference is huge (when zooming on screenshots)
I see, allright
Need to find the sweetspot though, as running higher resolution + more screenpercentage can cause the graphics card to run out of memory easily
Hello, I can't for the life of me work out how to load a level (async, so that a widget can display with movement/interactivity) and THEN open the loaded level. Of course going immediately to open level makes everything freeze before opening it. What am I doing wrong?
calling LoadLevelInstance, to get an object and then trying to load an already loaded object seems suspicious π
This is definitely not the way to go about this. Why not use the loading plugin from unreal?
somehting like this, but I believe unreal also had a similar one
Only if you salvage it from Lyra, CommomLoadingScreen
I would prefer not to use a plug-in. but if there is literally no way to use the default engine to ascyns load a level then I may have to.
I mean plugins are the default engine
They aren't modifications
The code in the plugin you can just use in your project
But no, proper loading screens aren't possible in bp
Because widgets don't survive a world change
Okay, thankyou for the info. I will take a look at the plugin
Its a native plugin you can use, definitely fine to go with
(though these are loading screen plugins, not async loading smth plugins)
What if anything is colliding? Do you check at the very end? If so, what do you do??
It seems a bit innefficient to run the whole generator and then restart other smth
(Probably gonna remake all my stuff cus it was basically all built on child bps so im just gathering intel)
2. How r u grabbing info from the rooms? Since they are all random room classes, wouldnβt it break any lines? Maybe this is smth I didnt learn properly but I only was able to do this by getting it then casting to the master room, and grabbing from child components of scene components to get things like exits or collision boxes
Hi i got quite a beginner question about door opening mechanics, i put together a Bp where i have a collision box a door static mesh and a widget. When the player begin overlap with the collision bos the vidget got setted as non hit so it apears if the player press e it triget the door opening mechanism see on the picture. My problem is if i put two of these bp s in the level.. no matter which doors collision box i am standing in if i press e it always opens only the first one ..
No I make sure nothing collides before ever spawning in the rooms. I store the room size in the PDA and use FBox of the same size to do all the intersection / collision math before spawning
I keep answering the same questions. Reread some of my previous answers
Is it possible to get a struct reference instead of a copy of it? So you don't have to keep to re set the struct back to wherever you have it.
Like in this example I have it from a map, but even when using set by reference, it still does not update the original from the map, as if I do another get on the map it will not have the value updated.
Maybe not a struct, but an actual object somehow that would allow one to get its reference from the map, so no need to re set it back to the map later.... Mainly wanting to avoid have to re-set all the values back, which is a pain.
Arrays have GetRef. Maps probably not. Welcome to Blueprints.
You will most likely have to temp save it, alter it, and re-add it to the Map.
in blueprint, is there a way to name a magic number? say i have bunch of tab indexes and i want to provide names for each of the indexes. how can i do that?
You'd put the name into the tab
That's most likely due to how you are handling Input here.
It's very uncommon to put the Input into the Door.
You'd usually put the Input into your Pawn/Character and have an Interaction Interface that you can use to call some Interact function on any given Actor.
And then you either trace for the door on the Input, or you maybe already have the Door as an Actor from an Overlap in some variable and you call your Interface function on it.
Door would then implement the interface and do the code you have in your screenshot
Either:
Inside Pawn: OnOverlap -> Determine best overlapping Actor (e.g. via Angle) and save it to a Variable called "BestInteractableActor"
Inside Pawn: Input -> Call OnInteract Interface function on "BestInteractableActor" if valid
Inside Door: OnInteract -> Do Door Logic
Or:
Inside Pawn: Input -> Trace for InteractableActor -> If hit call OnInteract Interface function on HitActor
Inside Door: OnInteract -> Do Door Logic
Something like that
For what purpose? To get the relevant index using a name?
I have a playlist of different types of doors. (single, bifold and double) They do use an interface interaction system so you'd probably be able to substitute it but it might be worth looking at how to make interaction systems.
https://www.youtube.com/playlist?list=PLcwVLBaUNnHpXuMLCwYFB1PiPcTD-7HT0
I have a frozen material that I created which can progressively cover meshes/objects when you increase a param and Iβm not sure how I could get this to effect all materials that the effect is overlapping with without to add it to every material parent
Unfortunately maps return a copy, so as eXi said, you'd need to make a copy of the struct in a local var, modify the local var and then readd it to the map.
Alternatively, if the value of a map is an object, you can update values on the object (a setter function) and that would reflect anywhere that also references the same object. This isn't always applicable though.
Pretty sure if oyu want that on everything you'd have that as a MaterialFunction in your Base Material. But that's probably more #materials related?
Recommend checking out material layers. In fact Epic has a video somewhere about how they did exactly this using material layers for Fortnite.
hello
yea i actually have the effect as a material function and have it currently in my main material, but yea wasn't sure as this is more gameplay based, the material itself is made, just need to find a way to apply this to all of the potential materials in the world that are getting hit by this overlapping "freeze" like effect
will definitely try to find that one, material layers are different from landscape layers i pressume ?
Does anyone have examples of nodal/modular building systems like in Captain of Industries or Simcity 2013? Particularly having "anchors" that connect to different buildings that can only accept certain resources?
Oddly I can't find it anymore. But the overview docs on it aren't bad. The one I was thinking of just had a nice layout. It showcased how they basically do everything from the special effects of lightning/fire/ice types as a layer. And then the introduction WPO animation was another layer. And it turns into this list of effects that your things have, which you can affect with parameters. Layers are slightly nicer than material functions for this because you can affect their order better. Where as a set of material functions you have to edit the actual parent material with all of these in it.
yea im watching a lengthy one right now to get the basics. seems like this will be a massive W after i get it
considering all my textures are currenlty sprite texture / pixel art essentially, blending in differnt layers for dmg related things, burn, freeze , etc, these could all be differnt layers
i am going to lose my entire mind having to step away from my project for 4+ days and then having no idea wtf is going on
I think I was just going to cut the checkbox array and go back to comboboxes
Comboboxes are sad times. π¦
Annoying to code, annoying to style, shit controller use.
Trying to create a test animation in unreal off of ue4 manniquines. Followed a video and it's not working correctly.
Issue is that it isnt letting me pose existing animations from the anim weapon back.
https://youtu.be/tnZv7KQPai0
πGet Access To All My Unreal Engine Courses At : https://www.unreal-university.com/courses
πGet My Free Unreal Engine Beginner Course : https://bit.ly/46mUWMr
In this video I go over how to Make Animations For The Unreal Engine 5 Mannequin
#Animations #UnrealEngine5 #Uisco
I have a situation where I have 6 checkboxes, I autocheck 2, and I need the third check to auto-toggle the others to uncheck when it's checked - I think the comboboxes might have been easier
Please help me understand what I have forgotten here:
I'm trying to do a Line Trace By Channel for a custom Channel "Towers".
It works right for 1 actor so I copied the exact collision setting to the new actor I need it for (screenshot attached)
The Line Trace somehow does not get an actor hit.
In both cases it is for a Static Mesh and I checked it is set to Visible.
what is the first screenshot from?
The new actors Static Mesh
show the first one's too
I would check the actual collision of the 2nd static mesh asset. Also, does the line trace show a hit? What prints on hit component
it does not
Checkbox TraceComplex. If it hits from that, your asset has no simplified collision.
Top one the working one
bottom one showing red trace, meaning it never hit
yeah
so it's the mesh asset's collision
open up the platform mesh asset and add collision to it
Thank you both. π
TBF this sounds like an even worse case for a combobox. Comboboxes are for picking a single setting out of many. You have multiple toggles, which can be on or off and also affect each other.
Hey all, if 2 characters are using the same AnimBP, do they get their own "instance" of it or are they using the same one?
ie. If Character 1 sets variables inside the AnimBP, they affect Character 2 too because they are sharing the same AnimBP?
Separate instances of the same class.
So each character will be able to get/set his own values in variables defined within the AnimBP?
Correct. That's how it's intended. So you can set values in the update or from bound events. Then the animgraph can use those without having to leave it's fastpath. I believe it also enables the anim graph to be threaded as well?
OK, I have a hard to track bug that I thought might be because the 2 characters were updating/overwriting the same variables in the shared AnimBP, so wanted to double check as I'm pretty new to UE.
You've just saved me time looking down the wrong path - thanks, appreciate your help!
Do be careful debugging the AnimBP. One common issue is mistaking the editor instance which will be active when you have it's editor open. Causes a lot of confusion to people newer to animation work when they know they have it on a specific character, but their casts are failing visually in editor and such.
I'm definitely new to it but don't have any casts failing, I do them in the Anim Init and then cache it in a var and it seems to be fine.
Having issues with transitioning between states etc anmd it seemed like one character was updating variables which affected the other character, but if that can't be the case then I'll look elsewhere for what the problem might be.
The only way this happens is if you've referenced the wrong actor somehow. EG you're using something like GetPlayerCharacter to grab the character, but that would point to the same character for every instance instead of their intended characters.
I only have the one toggle I need to toggle, the other 2 are pre-set D:
Ah interesting!
I use Try Get Pawn Owner but that would be the same for both characters, as I'm switching between multiple characters.
This should be fine to use. As it'll get the pawn that has the mesh, which owns the animinstance.
Alright thank you, I'll grab some food and see if I can track it down now I've confirmed it's not that.
So I need some clear advice for how to implement two systems that work well together.
Recently I got tired of making widgets in one blueprint and having to manually change the same thing over and over. So I went for modular/scalable widgets. I got a widget for a custom slider with animations, that use an event dispatcher to pass onClicked information. This widget is used in a widget switcher in a settingstab widget that says the setting name like 'master volume' and what type of setting it is. (ex. Slider, ON/OFF, etc)
so my problem starts where I made a mouse sensitivity option. I multiplied the action inputs of the Look inputaction event with a variable. How do I pass what could possibly be numerous settings split in different widgets so how do I pass this information to the player without it being bloaty, performance heavy, etc.
Note that this game is strictly multiplayer as its like a fun 5v5 shooter, and things like game instance cant really be used since that saves data both server and client.
I -think- I need to make a base widget combo box/text so I can have a variable to mark whether it's default checked or not
Ive thought of interfaces, but that can get very bloaty very fast if I have a ton of information of settings values going back and forth. I thought of perhaps making a component class and storing the same variables there, and add the component to player controller and the UI, but im not too sure
What you're describing sounds like exactly what GameUserSettings was made for.
Having said that, GUS is kind of eh as far as portable settings. One of the plugins in Lyra wraps GUS and a SaveGame for settings. The reason being that GUS saves to ini files which are not portable usually. They stick with the machine and some settings like accessibility ones should be designed to travel from machine to machine. Where things like maybe input, sound, graphics are per machine so do not travel.
But that is strictly if you want that kind of portability for your settings. You can effectively put all of your settings in GUS and pull them globally from anywhere to read them. And then just let your widgets set them.
^still need help with this one, thanks
Someone could address?
i'm tryna make my tank shake and rumble, but instead it seems to wanna boogie off the map. While i support any boogie fever, i need help with making it .... not.
You don't really want to move the tank itself for something like this. This should be some sort of visual effect on it's meshes. The gameplay aspects like the capsule should not be used for this. If it also needs to shake the camera, then that can be a camera shake applied to the driver/passengers.
definitely dont wanna shake the camera!
Is there any gameplay aspects to this, or is it purely visual? Because if it's purely visual, a small WPO in it's shaders would be cheapest.
purely visual! TO THE SHADERS
yeah my university professor im still friends with suggested either making a text file, or use a data table. gameinstance is a big nono because you dont want to save client side info like volume or mouse sensitivity that loads to the server as well. and ive just been absolutely stumped on how I pass information everywhere. how do I take a float value from one of these settings or slider values and pass it to playercontroller without making it very heavy. thats somewhat my issue
Hi all, I am trying to write some tags to assets within the editor, but I am unable to then save said assets.
Any ideas on how I could save these to the actors in a scene?
Do you have the ability to use C++, or are you purely BP?
From an editor utility?
Yes
I think there are plugins that allow the use of GUS in BP only. Normally you need to make a C++ subclass of it. Odd limitation they've never really corrected for unknown reasons.
In BP only without outside stuff though, I recommend literally just having GameInstance locally initialize a settings SaveGame. It'll be local to each machine. And since it's a class, you can set defaults on it. And then anything that needs it can simply GetGameInstance->GetSavedSettings->GetLookSensitivity.
Transact is usually how you would do that to edit an instance. For example... Sec
Anyone familiar with smooth sync?
@noble robin You begin a transaction. This is basically like saying you're doing something. You add the transacted object, change it's state, then finish the transaction once you've done all of your transacted objects.
This also allows things such as Undoing the transaction once the utility has ran via the Undo or Ctrl+Z, similar to if you moved an object on the map or added the tag manually in it's details.
Ill try looking into that.
this is what I got so far as additional reference.
Also what do you think about using a component
Authaer loves components π
I think a component is very specific to an actor. Even if you place it somewhere more global like your playercontroller or game state, you still need to save these settings and load them. Which leads right back to a savegame object. Where as you could simply keep an object globally and pull these settings or set these settings from anywhere on that machine, which is much better from a settings pov.
I do love composition. But it's not a good call here. π
Aah I see, that's exactly what I'm looking for.
You're a legend, thank you!
This is essentially what GameUserSettings is for and does. It's jut an object that writes settings to an ini and loads them at start of game. You can then set and save them to their ini, and read them all you like at runtime from anywhere.
A SaveGame in the GameInstance serves an identical purpose except that the main difference is that it'll save to a binary file instead of an ini. But it's accessible from a BP only standpoint.
and from a widget point of view, where does game instance get called? because of course these are modular setting types. so theres a lot of widget blueprints. Do I go to the main tabs of the settings menu like graphics, audio, controls, accessibility, im essentially casting to gameinstance four times?
or the overarching settings menu itself
You would of course need to cast to your specific game instance class where you've made and stored the object to get the object to read or write to it.
But to make life easier, you can make yourself a BP library that does this for you via GetGameInstance->CastToMyGameInstnace->GetSavedSettings and return that through a Pure node.
or just use a save game as has been suggested, or learn the very little c++ needed to leverage game user settings
In this case I was suggesting storing a savegame object on the gameinstance. To avoid having to constantly reload it mostly.
Easy enough to load or initialize on Gameinstance init. And then free to use from then on without having to worry about hdd use.
How do I get an actor to drop to the ground? I created a new actor, added a sphere SM component - what do I do next to get it to simply drop when I place it above the map in PIE?
Either add a Projectile Movement Component to it, or call SetSimulatePhysics to true on the mesh itself.
While I have you, I'm simply trying to fire an event when my bullet (where this code appears, capsule is the collision around the bullet mesh) hits an actor. It should fire P_confetti, wait, and despawn. Shouldn't this work?
It should. Is it not? I'm unsure if you need to call anything besides set template.
I might even go so far as to say don't bother holding the emitter here, but instead simply spawn a new emitter at the location. Then you can kill the overlapping actor immediately.
They're designed to auto clean up, so it should play and destroy itself if you spawn it at location.
So I have the world space transform of an object. I want to take it's current local orientation, take its right vector, then rotate along that vector forward, what would be the logic to do that sort of transformation?
How can I cast to a blueprint from the character blueprint? I don't know what to put as the object of the "Cast to blueprint" node.
I recommend taking the time to go through something like the livetraining on Blueprint Communication. https://www.youtube.com/watch?v=EM_HYqQdToE
Understanding casting requires understanding class hierarchy. Knowing that a Character is a Pawn, and a Pawn is an Actor. You know that if you line trace a Character, it can pass that through the trace results as an Actor level pointer and will cast to Character successfully. If you line trace a flower pot and try to cast it to character it will fail.
What do you mean by "Rotate along that vector forward"?
hello,
i'm looking for explanations
I have a simple code that works, but it fires multiple times (once on client, and twice if the host is close to this multicast and also plays the animations (it's self hosted online system)
I would like to optimize the thing and fire it only once, like, only the client getting off fires it, or only the server if it's displaying the animation, it looks like the server alcays fires first if he is close.
How would you do that without making a gate ?
Is it possible to make an ACharacter crouch without a controller being involved? It looks like even if I find a reference to that actor, assuming it's not possessed by a controller, and call Crouch on that character, nothing really happens. However doing the same on a controller-possessed character works.
Edit: actually I think giving it an AI controller fixes it.
Let's say I have multiple "interaction" actors that are supposed to spin until picked up, is there a way I can make a derivable blueprint that handles the spinning and picked up/dropped logic without having to write the same code on every actor?
I want to make the ue4 manniquine an animation in the serencer but there is no option to adjust his rigging like the ue5 one. Why is that?
or sequencing, idk
that channel was hidden for me. Thanks for showing it to me.
How does one unload an object?
The object is a blue print based on the very first top level Object. I create it and add to a map, but now when cleaning the map, I want to first loop trough them and make sure they are destroyed. But there is no destroy for a base object...
Or do I have to destroy the outer object to be able to remove everything else?
I'm cleaning the map, but I'm pretty sure that I will just leave a bunch of object unreachable, so I'm trying to actually get ride of them first before cleaning
You don't really. You remove it from the map. In C++ you can explicitly call MarkPendingKill. But even then it will stay around until nothing references it and then be collected.
Oh so there is an active garbage collector for c++? I though those didn't exist in c
well in that case I don't need to do anything I guess, those objects were being used by blue prints, but at this point, all the levels and blueprints are unloaded, so I mainly going back to main menu. I guess I can just clean the map then
It's an Engine thing, not C++ specifically. But for sure in that case clearing the map should be all you need. This is all Actors do as well mostly. There's a lot of cleanup code before that, but it largely boils down to cleaning it out of it's UWorld, cleaning up it's components, and then marking it pending kill.
I see, one last question, the outter object in this case is the game instance class. Do I need to make the parent a different object, so I can explicitly set it to null? Just wondering if they being parented to the game instance would create a reference between them
cause the game instance won't close right...
well I guess I can have a wrapper object and leave this map inside it, so I don't have to wonder about it π€£ , then just set it to null
It doesn't create a hard reference. The only hard references you can have are UPROPERTY marked hard pointers. All BP properties are UPROPERTY by default. And all UPROPERTY marked properties are class properties, so function inputs/outputs don't count. So TLDR the only way to keep something alive generally speaking is to have something(not necessarily, but USUALLY it's outer) having a UPROPERTY marked pointer to it. And for that or those thing(s) to also be hard linked by soemthing else that won't be collected. In this case with it being the game instance as the outer, if you remove it from there, and everything else referencing it like actors and UI in a level are removed from level travel, it'll be cleared for collection.
nice, thanks for the explanation
cinematic renders keep crashing but they were working fine beforeβ¦ have a due date this Friday πππ any help?
I got a question.
I like to make something similar like a Exit 8 Game.
You go into a train and the next train station is similar to the first and you can endless visit train stations some have AI some have anomalies etc.
The question is how would i move between this worlds.
-
The first idea i had was to make them all in a row and just unload the one you don't use but this would make it very linear. Or would made it so that i need to do it multiple times to get alternate runs.
-
I load and unload the same level at the same location and the train just goes in a small circle. The problem is see here is that you spawn AI and sometimes they just don't properly spawn or work when working with streaming levels.
-
An other idea would be to just teleport the train to the beginning of the train station but i am not sure if that will create jitters to the player if they move around in the train.
The idea was to have like 15 different stations and fire a random one with "switch on INT"
I am curious if there is a better idea to do something like that or if i miss something, an alternative would be to not move the train rather the world.
Details panel
Thanks π
What crash?
Teleport the train and player. Teleport being the operative word. When you set an actor's location you can choose to do sweep and teleport. Sweep will slide the actor to the location and stop at the first hit. Teleport will preserve the actor's velocity as if you were jumping through a portal. If the character and train are both teleported and the outside is blurred by a reasonable speed or whatever, the player shouldn't really notice it.
I see i will try that out thanks a lot.
So the way you would recommend is to stack multiple levels at the same place and just stream / unload this sub-levels depends on which one i want.
Do you think that would affect the AI for example lets say on one Map i have an AI that chases. If i unload the level with the AI together and then load it will that work propperly?
I had video watched while ago where they recommend to have general outer walls and navmash with AI on the Main MAP since they like to fall through the floor etc.
Do the aI reset if you visit the same platform?
I'm inclined to say simply don't make them AI until the train stops or shortly before, long after the level has been loaded. Make the pawns on the level or something but before unloading remove their ai controllers, and when loading in, at some stage grab them all and create ai controllers for them. This also has the benefit of not making them derp around before the train stops for example so you get consistency for gameplay aspects.
hey is there a way to recreate this camera system?
as in rotate it clockwise on a specific axis
is there a way to turn a character manually via the movement componenet
I dont want to have to swap manually between orient rotation to movement and orient movement to controller and set focal point, kinda sucks
If you clear the current focus, the default is to follow current movement rotation.
oh shit really? Do I just keep use pawn control rotation on?
starting to wonder if I should just gut my player character and actor components of any variables I'd want to persist across levels and have them all pulled from gameinstance so I don't have to think about saving/loading or moving everything to gameinstance and back...
how do i make the bp spawn forward by 5000 units infront of the character based on which direction the camera is facing? The vector I have now translates it world space
camera get forward vector * 5000
sorry I am brand new to this. How do i plug that in combined with what i have? or do i get rid of everything i have?
also the camera is to side of the character will that be a problem?
isnt that a function already, rotate around axis
I failed
how do I make it local space not world space
you want to multiply forward vector with the distance
not add some arbitrary Vector.X afterwards
Are you sure itβs X you should be multiplying to your distance ?
Aye, unless you want it to travel specifically along the X path (comes in handy in 2D sometimes)
True that!
In blueprints, is there a way to reference a variable from whatever the currently loaded level is? How might I accomplish that?
do you mean is it possible to access a variable of the level blueprint from within other blueprint actors? if so, then no
level blueprints are really only good for quick prototyping or perhaps level specific logic, not good to rely on them for much else
In the game I'm working on, each level has its own "par" time. How would you organize that?
you could make a "manager" type actor that you place in each level to manage such state perhaps, or you could have it live on one of the gameplay framework objects such as gamestate, gamemode or gameinstance
the former is preferrable, as its easy for the game framework objects to end up as all powerful messes
but the latter is simpler
So just a switch by string and use level names to set the variable, or is there a better way?
oh i see what you mean
Sorry if I wasn't clear.
i still think it makes sense though
just have a special kind of actor that you place in the level that has the par property
and find that actor from your other actors to reference it
Thank You i will look into it.. tbh first instead of puting the input event on the interactBP i made a custom event and called from my character BP s key event and also made the same problem..
@sudden nimbus That's actually really handy. I never thought of using an actor in that way. Almost like using it as a sort of struct, huh? So the object can hold the unique value of the variable, and I can just reference whatever one is loaded through the class? Do I understand you right?
youd make a blueprint actor class and give it a par variable, then place it in the world, and change par to what it needs to be for that world. rinse and repeat for other maps where you might want a different par
and then whatever actors need to know what par it is, they would find this actor by class (cache it, dont fetch it constantly)
and of course you could put the other golf course related variables on it too
@sudden nimbus Ok, that's exactly what my understanding is. Thanks a lot. That's a really handy tool.
@sudden nimbus Wow. That was so easy to set up and exactly what I was looking for. Thanks again for the great idea.
np- if you make it to C++, then this is done with subsystems π -- well actually i think id still use an actor for this
Copy that.
https://gyazo.com/bfa280e275470522106d3338a976d916
hey i have this particle effect attached to player but when moving its getting disoriented
tips ?
You should look at data assets instead. It's a fancy uobject (the parent of actor) that's designed for just data. Actors can be too heavy to use just for data. If you get into the habbit of using them for data you can end up having a horrible time when you scale up.
Thank you for that heads up. I'll look into that right now so I'm familiar with it.
I can't place that type of class into the level. How would I go about instantiating that class?
Oh, wait. I see DataAsset. It appears to be a separate class altogether from the actor class. I was thinking you meant the "object" class, which appears to be the only parent of the asset class. Or I just don't yet understand what I'm looking at as far as the heirarchy.
There is only ever one instance of a data asset. For example, you create the primary data asset and add the relevant vars to it. You then create however many data assets you need using the primary data asset. When you get the data asset, it'll be the same instance regardless of where it's fetched. (Like how if you get a static mesh it's always the same (not to be confused with the static mesh component))
So to clarify, it wouldn't work well for what I wanted to do in this particular instance? I wanted each level to have a unique value for a single variable to fetch. However, when I don't have to have unique variables in that way, the dataasset is a good choice?
You would create a data asset (using your primary data asset) for each level.
Oooh. I'm going to have to do some more research on exactly how to use this, but I'm starting to understand now. Thanks!
well then you'd need to tie the data asset to the level in some way
I do exactly that for level metadata
you could indeed do it by aligning names or other such things, but that is brittle across renaming
I wish there were a nice simple k/v metadata thing for levels
I don't think that is avoidable, after all if you rename a level any references to it in the project settings like default map will break too
no with an actor it would not break
Fair, I just mean renaming levels isn't something that typically goes without additional work
Hey, something that I've noticed is that the first time sounds play, they're delayed. I've searched around and tried some fixes that were suggested but nothing worked. Is there a way to force audio to load to memory (I'm assuming the initial delay is them being loaded into primary memory) at load time?
What kind of fixes? You just gotta load them async ahead of time
that's what I was gonna say but don't audio components have a hard ref to usoundbase
or is it soft
I guess it doesn't matter if you are spawning the audio components
which is probably what you're doing. so just async load them ahead
no you definitely do, I've dug in rather deep on a dynamic music system in c++
but it super depends on what you're doing
how are the sounds being played?
fwiw quartz is there to schedule audio -- it's job is to allow you to be sure audio plays at the exact moment you want it to (not before or after). if you use quartz to play a sound you can certainly schedule audio to a particular tempo or the like-- but that takes a bunch of setup
but you don't have to use quartz to play sound
In a build, if you're not using a soft ref, it'll be loaded when the BP is loaded. The editor is a little different as it loads things when it needs to use it. (as opposed to preloading)
We do, it's called 'Soft World Reference'. We can't have a hard ref as that would force the level to be loaded which is a terrible idea lol.
why if I use simulate physics on my projectile it won't travel but instead is static?
thanks mate - i thougth as much - i might go down teh c++ path
hello devs , plese need a help , i got destructables (Geo Collections) in my BP , and has some anchor fields for geo collections also inside of Bp , but i can connect geo collection to those anchor fields that are in my bp, i can only select anhor fields that are placed on the level , is there a way to select Anchor fields that are inside of my BP ? please β€οΈ
I'm currently just using a Play Sound 2D node.
It might be that this only happens in the editor. I'll have to try it when I do my next build.
Where is this logic? Is the array var a local var?
sorry yes so the static mesh is a variable i added
and i'm defining it in the viewport on the details pannel
i'm trying to have a mesh follow a spline and moving that spline at runtime
But it's creating meshes every time i input as a player
here is another version with a spline mesh component but i couldn't set the collision properly
or rather this spline mesh component wasn't following the base splein
what is a alternative to 'on begin overlap' and 'on end overlap' because i have this problem that after running it once, the second time it wont work
can anyone help me out? basically, i have a cover volume, it has a bool, that i want to tick on or off, depending on what type of cover it is, crouched, or standing cover. issue is, the variable keeps interfering with the other cover volume that is placed down, so if one is crouched cover volume, and the other isnt. both end up being crouched... im really not sure what im doing wrong. ill see if i can post some screenshots in a bit. i feel like its gonna be something really stupid. as im a noob. but i tried so many things that im at a loss now lol
hey how can i make a spin move like this? i have an animation for it but not sure how to trigger it and to deal damage when the player does it
one sec wrong ver of the clip
i hope i can be clear enough, but i have this problem. As you can see in the video when I try to blind the enemy the first time, it will go through and it will work. It still works until he starts moving again, at that point it just stops working and i cant blind the enemy again. I think the problem is either in the last event blueprint or either the 'on begin overlap' and on the 'on end overlap' blueprints. Anyone any idea how i could fix this?
try setting your timeline to play from start instead of just play.
Is it possible to update an object per frame rather than per tick? Iβm trying to parent an object to my camera, but the issue is I need some precision. When I do it per tick the interpolation introduces some subtle inaccuracies
Iβm basically trying to grab my hmdβs location every frame and move the object to that location
that didnt fix it..
Per frame is per tick by definition.
Unless you've changed the tick interval
π Did anyone know how to implement Payment gateways like stripe/razorpay subscriptions in UE based game ? π
Hmm, thereβs a bit of a lag between my camera and my object and Iβve tried fiddling with all the settings, but not sure whatβs causing it
hello, why the SoundWaveObject return value of FinishRecordingOutput does no sound but has the correct duration?
Get Player Character 0 returns the first character found in the local computer. Get Player Controller does the same?
Correct. In fact GetPlayerCharacter is actually simply GetPlayerController->GetPawn->CastToCharacter
Thank you!
So how come text pulled from a stringtable won't be able to load in-game until that stringtable is opened up at least once in the editor after opening the project ?
Is this a bug or a normal thing ?
out of interest when the player crouches, is the capsule shrank down or not ?
Yes. It's a common issue with some people who want it to be over time, but crouching instantly sets the capsule to a crouched height.
I feel like that might be a bug? Though I've never personally had that issue I don't think and I stringtable pretty much everything.
It looks like the problem is coming from the GetRegisteredStringTables node, the output array is empty until your stringtable is opened in the editor first
sweet it's just cause I'm working on my vent enter and exit anims and I wondered if there was a function already implements the logic to shrink the capsule which I believe i've found
i have this blueprint thats a transparrent mesh and a trigger, i wanna use the blueprint in place of a water volume, how can i make it so the player is able to swim in it, similar to how swimming works in mario 64 https://youtube.com/clip/Ugkx_yxkaXqP_xy0F4Mtv6d7490zHdlNXkC5?si=rbmEOkG9FSD782VM
40 seconds Β· Clipped by KIRA Β· Original video "Super Mario 64 - Hazy Maze Cave - Swimming Beast in the Cavern - 45/120" by MrGamingZone
NintendoLawyer has entered the chat
shhh they have bigger issues rn lmao π
Nintendo never has bigger issues
true, i just meant im not worried lol, ive seen other games take inspo from them n its not like im using their assets lmao
It's fine as long as you don't imitate their super awesome patented two step method.
the similarites stop at the point of its water π
sm64 is just one of my references
anyone know how I am meant to deal with player going into a vent cause at the moment I have to resize the capsule else it gets stuck when it vent
but when I resize the capsule it ends up being half off the ground and well it then ends up with player being motion warped ontop of the vent rather then inside it
I'm sure there's an easy way to do this, but I'm getting confused.
I have BP_X set in the world at a certain location.
I'd like to press a button (already have the interact logic and the BP_Button set up) to move BP_Y to BP_X's location.
How can I reference each of X and Y's locations in this BP_Button?
Why not just use the default crouch function?
i have in the end
Where's the fun in that π
WTS complexity. Giving it away for freeeeee.
I'm having a case where I have a polyvalent actor that becomes different things.
In one case it's a loaf of bread, in another a trashbag.
Each mesh has its origin at their lowest point.I made a construction script to offset both the actor against the environment and also to offset the mesh if needed.
For some reason, my trashbags float but my loafs don't... I am not sure why...
ahhh i figured it out
instead of local bounds, get component bounds
trying to have a ui animation play, but it dosnt and gives this error
If I'm trying to get a transformation to happen at the push of a button, does anyone know how to set the original mesh to invisible once I press the button to "transform" into the other mesh?
I'm trying to create a breakable / poseable cubes system like in minecraft but for a limited map / level and I want to create all the optimization stuff to generate those blocks only the visible faces to not burn people's devices. Is it possible to do all that stuff in Blueprint ?
You may suggest me to use the Voxel Plugin as it does most of the things I want but it doesn't handle non cubic blocks, like stairs for instance, so I need to recreate that stuff from scratch and I need some guidance on where to look for to do that in Blueprint (if it's even possible) π
hey im using spawn sensing is there a way to disable so it cant se thru walls ? or do i have to do workaroun with tracing and such ?
You might check out the dynamic mesh and geometry script stuff. I think it has some voxelization stuff in it. Unsure how far it'll get you though.
accessed none means that it's a null. You need to define it. If you add a "is valid" node in between, it will probably return false
set visibility boolean to false
you mean pawn-sensing? I personally stayed away from it because of inconsistencies and packaging issues. Your best bet is using a trace system or even a dot product system
I severely doubt you will optimize anything this way. You might as well use a texture atlas at that point and LODs and you'd be on par with it.
Its also worth noting stairs absolutely are cubic voxels. You just lower the resolution of the voxels
Well, increase the resolution even
how should i have it set up then
I don't know your full setup, but you need a reference to that specific widget as a target
you have a "target" but more than likely you promoted it to a variable and never set it
hmm setting Scene components to visible [fasle] keeps their collision on ???
if you spawn your widget, refer to it in that target variable and then play the animation
yes, you had asked about visibility.
If you want to remove it, a sneaky way is to set its scale to 0,0,0
ty that was my issue
oh quick question tho my ui slides in from off screen but my camera is cropped to 4:3 so u can still see the ui as its sliding in, how can i make it hidden behind the screen border
ok my cheap solution around it kinda works lol
so i have these two blueprints that trigger an objective ui and get rid of it to "complete" the objective, how could i add to this to make it like "collect x amount of blank blueprint" and then completing that completes the objective
aye playas, tryna get my players camera to face the talking NPC and if i google it i'm not gonna get my daily quota of people interaction - i currently have what's in the photo, where'm i going wrong?
What's doing the camera facing normally?
Where does the camera get its rotation from during gameplay
Mouse controls!
Mouse controls which modify control rotation, correct?
Yes'ms
So keep that same energy. When you want to look at something, do it through setting control rotation.
this is how my brain interpreted that
True but "stairs" was just an example of multiple blocks. I know that horizontal and vertical slaps are also cubic voxels but for example.
Making a single block out of multiple parts would create more vertices and faces compared to a single block I guess ?
Like also how would I handle the block placing to place them only on grid ?
Camera points in Control rotation direction
Just set controlrotation
how can i fix this? im not rly sure whats wrong bc the variable is there
engine thinks that variable doesn't exist, just delete the set variable node and try re-adding it
if it still doesn't work then go to the blueprint that variable exists in and make sure you compiled
Hey, I'm trying to use the use show only list of actors in scenecapturecomponent2D but it doesn't show up at all. Has it been moved?
Perhaps you need to select "Use ShowOnly List" first for the Primitive Render Mode?
how do i wait for all here?
Working with animations, following a tutorial, the "Isfalling" works, but it doesn't get "IsCrouched" from the character amd set it in the ABP. Jumping sets the IsFalling Var, but the IsCrouched in ABP refuses to change, even though it changes the one in Character BP, it doesn't update here. (But falling does). Why might this Var not be updating?
You basically need to use some logic to check if the other delays are completed which means using some booleans. Here's an example I made in a macro.
Are you certain that the IsCrouched variable in the character is actually being set to true? Your code here would have the IsCrouched variable in the ABP set to whatever value the Character has.
Yup, got print strings that confirm the variable is changing in the Char BP, but not reflecting that in the ABP
Are you looking at the correct instance of the ABP?
Put them all in a single line. You won't load much faster by requesting them all at the same time.
That's all i've got there
where can i find the default engine.ini in the packaged project?
there was a way i could edit the resolution through that file
i forget where to find it
You'll see more if you press the play button.
That gives me a "spawned" option. Selecting this doesn't seem to change the behaviour
nvm
You'd want to select the instance that you want to look into. With this selected, you should then be able to inspect variables and breakpoint on the specific instance to see what is happening.
I'd suggest maybe putting some print strings on your update event in the ABP and see if the values are what you're thinking they are. There is no reason why a value from one blueprint wouldn't report its correct value to another unless you are using the wrong instance of that blueprint. Apart from that, maybe try restarting the editor and trying again.
VERY SIMPLE blueprint actor question, I posted a dropbox video. This is hitting a wall for me, please have a look (just trying to geta component reference from another blueprint so that I can rotate a piece of an object) https://www.dropbox.com/scl/fi/7jmohpto62iksepuwt88a/blueprintActorQuestion.MOV?rlkey=xwvzgs3tqfwyy6vpr75m9aypr&dl=0
is spawning child BP that buggy vs level instances?
Yes it's one of the thing you should avoid
@bright trench
https://dev.epicgames.com/community/learning/tutorials/l3E0/myth-busting-best-practices-in-unreal-engine
This article covers most of the common myths around unreal
Is there any reason to prefer GetClass -> Equals BP_Foobar -> Branch vs Cast To BP_FooBar? Is one of them much faster than the other?
Is the correct way to get a soft ref to become a usable hard ref (and not just a generic whatever) of the right kind to use async or blocking load then feed the output through a cast? it works, but I have no clue how wonky it is.
They're two different sets of logic. One is asking if it's specifically a BP_FooBar. The other is asking if it is or inherits from BP_FooBar
You could mimic the cast by using a IsChildClassOf. But in the end a cast will do the same thing and is likely quicker.
This is...partially correct. You're loading the actual class. The loading node simply passes it back to you as a UObject levelpointer, because it has no idea what it's loading and the idea is to keep it generic to avoid hard reffing the class. Putting an output pin of the same type you're loading defeats the purpose of a softref since that would make the class link and force it to be loaded anyhow same as if you started with a non soft pointer. Which is also to say that if you're casting after loading, make sure that you're casting to a parent class with no assets and stuff. So it should be AsyncLoadAsset->CastToParentWithFunctions
My use case here was just to ask the runtime if this object was of class x, without actually using the object as that particular type. Not sure I fully understood that correctly, would the Get Class Equals approach not be faster if I'm not planning to cast that object in the end?
Oh, good, sounds like I ended up at the right solution (I was already casting to a parent). Thanks for the details.
They are both fairly cheap. But I think you might be misunderstanding what a cast does. You have a pointer to an object. Usually this is an Actor level pointer, sometimes UObject. Sometimes a specific type like GameInstance or PlayerController, but not quite at your project level's type.
Lets just stick with Actor for simplicity since it's used commonly in stuff like OnHit, line traces, etc. So you line trace something and get an actor level pointer back and you want to know if that hit actor was a B_Chest. Well you game has B_SmallChest, B_MediumChest and B_LargeChest. All of which are children of B_Chest and you want to know if the hit actor is a B_Chest or one of it's children classes. So you can do two things. Cast to B_Chest. This of course succeeds if it is a child. Or you can check IsChildClassOf by getting it's class and running that on a branch. Both are fast and valid.
But Casting is faster. This is because casting in itself is extremely cheap. Casting is practically free. It's just a pointer conversion from AActor level to B_Chest level. In fact the only part of a blueprint Cast node that costs much of anything is the fact it does a validity check after the cast and returns valid or not. But even with this validity check, it's still faster than the other method simply due to function overhead and cpu cycles. Not by much in the grand scheme of a game but enough.
Consider the complexities.
- One is a pointer conversion and asking if it's valid afterwards.
- The second is getting a secondary pointer to the class, and then feeding that to a function that walks up a chain of classes to see if any of them match the original which can be 0-20 checks and then a branch to switch on the outcome.
The second is notably a lot more complex than the first.
To follow up on this. Some simple tests. Very basic 50k loop with only the before mentioned logic. First a note of the loop itself. Second is casting. last is a class is child of check.
Wow, this is amazing, thank you so much @maiden wadi π
I was somewhat thrown off by reading https://forums.unrealengine.com/t/casting-vs-class-equal-to/128027/6?page=2 , specifically the last post.
btw, this isn't bp but a Cast in unreal is the same as static_cast<> , right?
Lol.. these people. "Calling" a cast node has ZERO ZIP ZIL NADA do to with the loading of the thing. You don't load something when you call a cast node. Literally it's a pointer conversion.
What cast nodes do actually do, is have an output of a pointer. This creates a linker. This also happens when there is a member variable that is a pointer or class of the other class. Or any OTHER functions with inputs or outputs of the other class. Anything like that creates a linker. It does not load when you call these functions, including casting.
Unreal has two systems of things that you need to understand. CDOs and linker loading what classes link to.
Starting with CDOs. Every class is loaded and has a CDO created. This is a single instance of the class which is copied for runtime use. You have a CDO of every class you have. Like your player character in a single player game. You would have two instances technically. The CDO, and the instance actually instantiated into the world. If you have a B_Wolf, and have a pack of 14 of them, you have 15 instances of that class. 14 in the pack and the CDO.
Linker loading is the ability to make sure a class has everything it needs loaded. You have three classes, A, B, and C. A Links to B, B links to C. Well A needs to use B and B needs to use C. Thus when you load A to create it's CDO, you have to also load B to create it's CDO, which has to load C to create it's CDO.
Like I said, linker loading causes this and linkers are caused by anything that is a pointer of the type or a class of the type. Cast nodes just happen to be a common communication tool that get blamed for this issue, but it is not casts fault. It's the fault of bad project structure.
And on top of this, it has zero runtime CPU hits. This is entirely a memory issue where you can end up with way too much of the game loaded at once.
Thanks for all that, that makes a lot more sense. I'm bummed that people might not find this response in the future due to the chat format, feels like that should go into a wiki or a post on the web somewhere so that people stop being bitten by it. I'm making copies into my own knowledge base, but that doesn't help anybody else but me :/
No worries it's a daily reminder for all us regulars
Topics like Tick/Cast comes up all the time
Is Cast like static_cast tho?
Thx, a comprehensive and illuminating explanation as always. Sometimes I wish I had you and Daturaβs patience π
how can I get a variable from an ambiguous actor reference? have an array of classes getting picked from randomly, spawning an actor, but now I need to grab variables from it. how can I do that?
without hundreds of branch nodes, if possible
I have a powerup system I've made with the goal of having over 100x completely unique things happen or be affected. Currently I have it when you get a powerup it gives you a gameplay tag, then based on that gameplay tag it then goes into a massive switch. One for each powerup basically to figure out what it should be doing. Now this creates an absolutely massively tall switch node.
What I'm curious about is, does anyone have any suggestions on a better way to set it up so I don't have a massively tall switch node wall? π
Lol, it's fine. I've probably written that or similar at least a dozen times.
You should have your own AI, trained on your knowledge to, that can answer this stuff automatically
Hi I am making lava and I cannot figure out how to make it ignore the enemy
you are applying damage to the last actor to overlap
the timer is started when the player is in the lava (any actor that does not have the enemy tag overlaps), but damage will be applied to an enemy if it enters afterwards
I noticed that effect but I am not sure how to connect these correctly
should I be using way less?
I'd recommend you make it a damage type the enemy is immune against or implement the whole lava damage separately as an effect that can be applied and then does its thing
From a generic Actor reference you have Inheritance & Casting, Components, an Interface or some C++.
Inheritance would mean you'd need some common parent class that objects could share that have the properties that you care about, then you can use your actor reference and cast to that parent class and get the values you want from your cast. If you need to have diverging hierarchies (which you almost certainly would), this would require further casts, making it somewhat branching so this only works well if you know that the actor reference you have is of a certain type, lest you end up casting several times trying to find the right parent class.
Components would be something you need to add to your actors that have the desired properties. From an "Actor" reference you can then get the component by class, and retrieve the values you desire from it. This also has the benefit of being modular as you can check if the actor has the component and if they don't, then you know it doesn't have that value.
Interfaces should probably be your last course of action as it requires implementing the interface in each actor class that you want to retrieve values from and having them return the value from the actor itself. This can be used in conjunction with Inheritance (ie. implementing the interface in a parent class and not overriding the interface in children) so it can be somewhat simplified, but interfaces typically make it difficult to follow your code flow.
C++ You could literally make your own node that could "find" a property of an object by name and return its value without having to do a ton of branches as there is C++ available that can look through the properties of an object by name, but this would also require you to use strict naming standards for the variables that you're interested in passing around in such a manner.
Inheritance wouldn't work, spawning child BP is the bugs I was tryna get away from.
interfaces I tried and were nice but as you said, very grotesque code not very fluid.
I want to learn UE C++ but I took a look at that and said not today.
components seems right. im mostly just making dungeon generation and trying to stop turns or stairs over and over, so its mostly a list but yeah being able to check is probably gonna help and it being modular is gonna have future me thanking me.
(also thank you I can tell you put a significant amount of effort into helping a random internet user :) )
Whatβs wrong with spawning child bps?
Youβre not using child actor components I hope?
You are mistaking child actor component with deriving a class as part of inheritance. Those two has nothing to do with each other.
^Word
Is there a blueprint that allows you to get the distance of an object to other geometry?
Like making a vector with a set direction and see how long it is when it ends at another object/mesh?
There is the 'Get Distance' node. Alternatively, you can use a line trace if you want to take into account collision.
Could you tell me more about how the line trace works?
You define a start and end location for the line trace and if it hits something it can return the location that was hit. Additionally, it also returns the distance from the start to the hit location. (to name a few things)
Oh yes that is exactly what I need
Are blueprint input nodes binding the action to the actor's own input component or to the local player controller or somewhere else?
is there any real difference between using input nodes in PlayerController or Player BP itself
I've not checked the source code but from my understanding, it's handled through the player controller. If you're using enhanced inputs (which you should be if using UE5) then via the enhanced input local player subsystem located on it. If you're using hard bound key inputs (which I would avoid), then this is just handled by the player controller.
I see, so blocking the input of the actor won't effect those
In terms of function no. However, if it's on the player controller, they will function regardless of the pawn that is controlled. This can be useful for things that aren't specific to a character.
When you give an actor input, you have to specify the player controller. This just means that the actor will receive them from the specified controller. In terms of enhanced inputs, the input action still needs to be on an active input context mapping on the subsystem for it to fire/trigger on the actor.
Yes, but enabling/disabling an actor's input still adds or removes it's input component from/to stack right? But if BP input nodes are bound to controller, this won't have any effect?
guys, why can this shit happen? I didn't recompile anything, I just dragged it out of my PC pin and it was there all good on assign, but on compile it says this
It adds/removes the actor to/from the stack on the input component used by the player controller. In most cases, the input component will be the enhanced inputs one.
The signature of the event dispatcher doesn't match the signature on the custom event. By signature, we mean the inputs/outputs. The event dispatcher will have inputs and the custom event has outputs. These don't match which is why you get the error. This check is done why you compile.
it's CPP delegate, be like:
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnAbilityQueueChanged, TArray<FQueuedAbilityInfo>, QueuedAbilities);
You can pull from the 'On Ability Queue Changed' event pin and create a custom event, it'll automatically create one with a matching signature.
yea, I did just that
It could be a load order issue then. With it being a C++ delegate, it might be worth asking in #cpp. Other than telling you to try recreating the event, there's not much else that can be done from a BP perspective.
I have a boolean who changes how an Actor is constructed in its parent constructor (cpp) but it doesn't seems to apply when i toggle its value in a BP extending this class.
Is this the expected behavior and if so is there a way to have the cpp constructor run like a BP constructor would be everytime we change a property in editor ?
Nah it's similar to a dynamic cast but using unreal's RTTI
StaticCast<T>() is a static cast
Hey, is there a way to move a bone of a skeletal mesh at a specific location in world? instead of moving the skeletal mesh?
Omg ur right I fricking read that wrong thx
Thats a day of my life gone
Lol.. If I could trust it to actually say it correctly.
is there a way to change projectile speed midflight? from blueprint
Affect it's velocity directly. I think you can also set max speed.
How is it different?
Is it because static_cast will crash if the type isn't the corresponding one (type safe) and Cast in unreal will not crash at all but just return nullptr (not type safe)
it's a runtime cast not a compile time cast
Cast<T>() doesn't particularly care if the types are absolutely unrelated because it just uses Unreal's custom RTTI to figure it out, whereas StaticCast<T>() checks at compile time, so it's a safe conversion
they turn off default C++ RTTI in Unreal because we have reflection
got it
Hey guys! Having a logical brain fart here..
I am spawning (BeginPlay) two different blueprint classes equally around a circle. I am then adding these blueprints to a singular array where I attach them all to the spawner so that they are children.
The spawn works fine but I want to be able to have a dynamic variable that I can change during play. The issue is that the radius is only currently being used for the spawn logic and so using that for anything else does absolutely nothing.
How can I approach changing the radius in EventTick from where I am now
You can try on EventTick to first change the radius to the desired value (like an FInterpTo for example), then do a ForEachLoop through that Atoms array you have and for each element do SetActorLocation, recalculating their position with the new radius value based on the same logic you are using for the initial spawning
Also depending on what these are for. This is a good case for Niagara.
in one of my blueprints, the game literally pauses for 1 second before executing it. Anyone know what might be causing it?
it's only one blueprint custom event that's causing it
Show the code, we canβt possibly take a guess at what you mightβve done wrong π
Big loops. π
I do love the dumb fire questions
can someone explain to me why someone would use skeletal mesh over camera actor
A camera actor is well an actor and a skeletal mesh is a component that goes inside an actor. You might need to provide more context.
Sounds like you're making up features. π
im looking at ALSV4 in this current situation, as I digged into the assets I saw that cameramanager BP exists and it has no camera, just the skeletal mesh. no camera being referenced anywhere and camera skm has animbp. I know this is not ALSV4 discord but...
just trying to understand the logic here
It's a common thing to do. Camera components suck.
using SKM as Camera?
I fail to see where the view port itself is existing in this case with the SKM
No. Using it as a view target. And using the camera manager to determine where the player's view should be based on the gameplay.
What is their CameraManager BP? What class is it based on?
PlayerCameraManager class. might be custom c++. not sure
Right. Open up the BP and look at the functions list. Did they override a function with Update in the name?
Is it possible to add a collision box to an actor component? Can't find any way to add components inside actor component
That's an engine class.
No. Actors contain components. So it either is a collision box, or it's not.
BlueprintUpdateCamera exists but it is not overridden as i see
27 functions are overridable
I see. will check that documentation
Now I'm more confused. What is the correlation between the skeletal mesh and the camera manager?
I assume CamComponent doesnt exist in this context then at all
you can download ALSV4 from marketplace for free and see the code for yourself
but animbp as I see it has transitional booleans and conditions
to move from aiming to idle, etc
Apparently it has a photography mode. o.O
I saw several actor components that added collision boxes when they were added to an actor, for example the free component in the epic store that adds a mini map to the game, you add the component to the actor and it comes with a collision box along with it.
I still dont understand how PCM is superior to the Camera Actor, are there any big improvements over it? is PCM updated more often?
I didnt really hear about PCM until now, I always thought camera manager bps were custom made with camera actor attached to the hierarchy. well, in this case it has been for me so far
The PCM is created by the player controller so I don't think it has anything to do with the skeletal mesh specifically. UE creates one regardless for managing the view. Does the one in ALS override any functions or add any new logic?
animbp for the camera skm
CameraComponent, and by extension a CameraActor(Which is just an actor wrapping a camera component), are bad for a few reasons.
First being that they're scene components. Scene components cost transform updates any time they're moved. Have a game with 20 players? That's 20 spring arms and 20 camera component transforms updated every frame basically.
The second is that they're very rigid. You're forced into a linear trailed view along the spring arm.
You can of course manipulate these things to make the views more dynamic. Simple case is a camera that switches view sides of the actor based on a wall they're hugging and the direction they're looking. You can move the spring arm, but again scene component transform updates.
Using a camera manager you can simply process the scene and decide where you want the view based on gameplay, and not have to care about the components.
I'm unsure if ALS is using camera manager for this. Doesn't seem like it with the lack of the update event being overridden. But that was my general reasoning for mentioning that camera components suck.
so im assuming PCM is more optimized and better solution for multiplayer games and overall singleplayer games
As usual "It depends". You can get away with a spring arm and camera fine. But in general it makes the game camera rigid and hard to make dynamic. And it doesn't scale well in multiplayer. There's just a lot of neater, more dynamic camera work you can do with a camera manager style implementation.
I think the skeletal mesh in the camera manager is so they can use an animBP to run logic from.
Where is the skeletal mesh in the camera manager though?
Camera manager isn't really supposed to have scene components.
creates new ALS project
Let me have a look lol. I'm curious now.
That's odd.. I wonder if they're copying the target's animations to this skeletal mesh?
They use curves for everything and update them using the animBP. The PCM just gets the curve values and uses them to update stuff.
Which I guess makes sense because the animBP would make blending different states much easier.
Huh. Do they actually use any animations or whatnot in that animbp?
Or is it just being used as a state machine?
No animations so I guess just as a state machine.
Makes sense though from a designer perspective. I mean camera work is closely related to what the view target is doing. So it's easier to go that route. ALS is older than StateTree, but I'm curious if a StateTree component would be better or not.
I think the animBP would be better because it'll blend between the curve values when switching. I can imagine trying to setup something similiar with StateTrees would be a nightmare.
Yeah. Plus it's related, so it's nice to have a similar UI.
for transitional stuff I recommend highly using Logic Driver Pro.
I've seen that, but I think I'd prefer StateTree.
someone created attack combos with just Logic driver pro which was somewhat impressive. but overall you could make a whole game logic just with transitional states
I liked state trees when I first looked at them but there's definitly room for improvements. Being able to swap them out at runtime would be nice. Not sure if that's been added since I last looked though.
Hey guys, I have an excel sheet with items down the left and objects across the top, which I then cross reference to find the cell with the value time it takes to use the item on the object.
Before looking into it I thought DataTables was going to be what I needed, but they actually don't seem suitable now I've looked into them as you can only get the row which would return a struct of every single object column?
What would be the best way to do this and retrieve just the time value for the item and object being cross referenced?
Ooof, the turns in ALS aren't great. :/ The legs just pass through each other haha.
What are Items and Objects?
In what way, what filetype/datatypes?
In context to your game.
Oh, so imagine like Hammer -> Nail would return 5.0s, but Hammer -> Wall would return 60.0s, or similar to that effect.
Basically how long it takes to use the item on the object to complete the action.
(ie. in the above example - hammering a nail vs hammering down a wall)
It's usually easier to do this by types.
You'll end up with a lot of overlap. A lot of 5s and 60s entries for similar things for example. So it's usually better to simply say a Wall is Large, a Boulder is Large. A nail is Small, a Walnut is Small.
Then in hammer's data you classify how long it takes against certain tag types.
For Hammer you have Small = 5s. Large = 60s.
You end up cutting down your data significantly.
Yeah totally, but the example I gave was simplified for the sake of not complicating the question - small/medium/large wouldn't work in the actual use case as the interactions are more varied and unique per item/object.
In my previous engine I used a grid datatype which was a fast 2D array, then used enums as the row/col keys but thought datatables would be the right thing in UE, but turns out it's not now I've looked into them as they woudl return a lot of excess data.
BPs also don't seem to have access to 2D arrays, you have to use 1D array + manual indexing from what I've read?
That's all a datatable really is too though. Get Object row, get time.
Unless I'm misunderstanding (which is possible, am new to UE) the Datatable method would return the entire item row, which would include every single column.
there could be hundreds of object columns in some cases, so that seems really wasteful when I only want the value from one.
I thought there may be something I was missing/didn't know about so thought I'd ask here.
Would there be more objects than items?
Can all items be used on all objects?
So I've got an obstacle which can be burned, and it's got a set of damage types considered to be "fire", which controls what can burn it. And that's all fine.
Thing is, I'm introducing other types of actors which can be burned, and so I want to somehow centralize this list of damage types. But I have no idea WHERE to centralize it, especially because these things are generally bad use-cases for inheritance (because they're part of different inheritance hierarchies already which make much more sense than inheriting from Burnable)
Overall I would say there would be more objects than items, yes.
No all items cannot be used on all objects, some will take quicker/longer and some won't be compatible at all.
Also may be relevent.
All items will be avialable on all levels, but not all objects will be in all levels.
probably easier to just use tags
Can damage types even take tags?
actors can
I would probably just use data assets lol. The data asset would just define what items can be used on the object. You then create a data asset for each object. When you interact with it, you check the item in the data asset and get it's value.
Sure but actors do a lot of things. I don't want "CausesBurning" as a tag on an actor, because that actor could also just bump into the object and that's not burn damage
So if worst came to worst I could rejig the data so Datatables would return the minimum about if columns per level, but still not ideal.
I was thinking more along the lines of Tag: CanBeBurned
Okay, I have no idea what Data Assets are so I will look into them, thank you!
but yeah, bear in mind the Damage system is old and very primitive, so you may need to make your own
The problem with that is it doesn't really solve the problem, since these things that cause burning are, first and foremost, just doing damage. A fuel tank exploding is a radial damage event, but also, lights burnable objects
Hmm, maybe.
I could just make my own root damage class
I'd probably just make a 'Burnable' actor component.
Oh now you might be on to something there! It could bind to the AnyDamage event and supply its own "BurnStarted" event to the actor it's attached to
Yea, the component would say, 'Hey, you should be on fire' and the actor would decide what it does when it's on fire.
Aw fuck now I'm generalizing this into a DamageReactive component which just takes a set of damage types and a min damage threshold
I'm like this sometimes lol. I like actor components, saves me having to repeat myself. π
@dark drum So looking into Data Assets they do seem suitable, however if I add items/objects later I will have to go into every single object the item can be used on (or vice versa) and update it, which isn't great.
trying to get leaderboards to show up in a t chart sort of format .. but one keeps going on ontop of the other, any help?
That is a BP limitation, yeah. In C++ you get a pointer to the row back and can pull data directly.
ah apologies! this is the code
the weird thing is, the first time I run it, it stutters for 2 seconds, but if re-run the code, it suddenly is fine
I'll show what "blow wheel" is
@dark drum The game is still evolving so items/objects will be getting added/removed as we go and having to manually update every item/object doesn't seem the best way atm, though maybe when things are finalised it would be?
I'm just surprised there's no way in UE to do a specific row/col lookup on data.
However thank you for making me aware that Data Assets are a thing, I had no idea! π
Have you done any profiling to see whatβs causing this hitch?
never done profiling in my life haha
π
Time to learn, else youβll be stumbling in the dark. But first of all make sure your test in standalone because thatβs how you should profile anyways
It's worth noting that you could keep your stuff in an excel sheet and simply import that data into data assets. Requires some setup though.
You can also open up data assets to edit them similar to a datatable.
What does the blow wheel do?
IT FEEDS A VECTOR VALUE INTO A SEPERATE BP, WHICH IS JUST AN STATIC MESH AND NOTHING ELSE
sry accidental all caps
My theory is that spawning a seperate BP 4 times (each of which is getting a transform value) in a single event might be what's causing the hitch
but i dunno
I just don't quite get why it would hitch the first time i run the code, but it's smooth thereafter
If you disconnect this, it doesn't hitch?
i'll check
i need to restart the project everytime because it's only the first time running that it hitches
it only hitches when it runs blow wheel x4
oh it hitches when i run just one of the functions
wow
Bit odd. Nothing here looks like it should hitch once and then work fine til project restart. So yeah. Profiling it is. π€·ββοΈ
Is there a way to start a decal hidden and have it fade in when something happens? I know I could Spawn Decal Attached but that has the dual problems of not seeming to expose the fade-in options, and also forcing me to work "in the dark" for the size, rotation, position, etc of the decal.
Working on my combat game and have ground attacks and combos working.
How would you go about making airial attacks and combos.
More specificly lifting yourslef and enemy up in the air. Would it be a basic knockback node? How do you account for gravity and attacks that send you back to the ground, ect?
https://youtu.be/TcPqaP2XsX0
Hi,
β
We welcome fellow developers and game enthusiasts to our server Tri Monkey Studios (TMS), we are a team of 3 working on our first project, we currently are working on this project part-time since we are short of funds, but we have covered a lot of ground in the past few months and we are excited about the outcome we have achieved so far.
β...
lets say a space ship blows up and debris spawns from it, how would I make it so the debris matches the direction and velocity of the ship?
Currently, the debris just detaches and falls way far behind
I try to create a loop-able tunnel.
I managed to make that horizontal work but the problem is, it has some glitches, for example the floor glows up for a moment and sometimes it has a slight movement in the camera where it moves you like half a MM to the left or right.
What could be the problem with that? Or would you do a loop-able tunnel different?
In the video i made 2 boxes and basically overlap them and spawn 1000 meter to the RIGHT where the exact same tunnel is. Eachtime i walk forward or backwards i overlap the box and it moves me to another corridor.
I did try with "Teleport" and "Set Actor Relative Location" they have both that slight glitch.
I only tested in Editor not in a Build Game.
How are you spawning the debris?
Show code
i think the right first step is to add impulse, but im wondering what I'd get from the exploding ship to "impulse" in the right direction
There's also get/set PhysicsLinearVelocity
that seems to work nicely, many thanks
:)
Using Timelines. Why does the Finished pin never execute?
- The Timeline has a curve atlas that's half a second long.
- The Timeline does not have Loop enabled.~~
I am expecting to hit Finished after the atlas reaches the third key, shown here.
I have answered my own question. I needed to enable Use Last Keyframe. π¦
remember the units in Unreal are tiny
default impulse is basically "Velocity change in cm/s per kilogram"
so an impulse of size 100 on a 1kg thing will change its velocity by 1 m/s
if you check Ignore Mass it'll just be velocity change
Does anyone know why when my animations play using animstates, it seems to disable my characters interaction sphere. I have an event checking for current interactable items when they're within the radius and it all works fine, but when the animations start playing the collision detection stops
show code
specifically, WHEN is the check for interactables done
Should I check the Pass By Parameter option when sending a large struct to function even if i dont make any change on variable? Does it make function more optimized since it doesnt copy the parameter?
Why are you using move and look to do the check?
just tick
although you can just do the check on begin/end overlap
but it doesn't make much difference
incase someone drops something inside my sphere
it wouldn't pick it up until i left and came back
does dropping change the collision preset?
its also needed for finding the closest interactable
I dont want it to run on tick because thats going to be bad for performance
anyway this isn't the issue
I have the print on tick to show my current interactable which works fine, but as soon as animations play it loses the interactable until the animation stops
how can i set a random float to either 90,180,270,360 not random float in range 90-360?
so 4x fixed values
Could you make an array of the 4 values as floats and then have it pick a random one
the environment looks good, did you make it yourself? otherwise, where did you find those assets?
random int in range x 90
aye and clamping at 360 that would work also
if the int is in range 1-4 it'll just work
true
array way is also more smooth if i need specific values also
could work with a math formula to
Ugh, I've got the classic "why collider not colliding". Actor isn't taking damage from a radial damage event directly beside it. Here's the radial damage, and the collider it SHOULD be hitting
The worst part is, both of these are working independently. The RadialDamage can damage other objects farther away from it than this actor, AND the actor reacts to other things on the Gunfire channel, I can shoot it just fine.
solved it *
Have any of you all remapped this button to something else? It seems like F5 would be a good candidate for it?
Okay, learnings on this: Apply Radial Damage and it's Damage Prevention Channel are... misleading. It traces on that channel, but what a HIT means is not what you'd think.
Specifically, a trace on that channel hits the hitbox of my actor. A naive idiot would consider that a "hit", but that's not how ApplyRadialDamage works. ApplyRadialDamage wants an unblocked trace to a component of the actor which blocks the VISIBILITY channel, so if the trace on the Gunfire channel hits something, that's not a "real" hit, even if that component DOES block the visibility channel TOO
Actually no, it's worse than that. It apparently wants an uninterrupted trace to the center of the object, so objects can block THEMSELVES from taking radial damage if they have ANY component which blocks that channel? This is ridiculous
Hah, all that was chasing red herrings. I just needed to change the ObjectType to Pawn from WorldStatic, apparently ApplyRadialDamage has hidden functionality where it does not apply to WorldStatic objects
It's tracing to origin of actor too right? or at least origin of component
seems a bit pessimistic
I don't know, honestly. All the fucking around with trace channels and which of several nested collision components was being hit, none of that went anywhere and I'm not sure my conclusions were sound. In the end I didn't even need to have the component block Visibility, which is the first thing I fixed. Changing the object type just immediately fixed it and I don't have the heart to try and break it again in a different way for science
Perfect, this worked! I didnβt think it would be as simple as reusing that math
I actually wanted them to slowly rotate too so i added a theta offset too on the actor location ( i would have tried relative rotation )
Thanks so much<3
Hallo!
Does anybody know how you can focus an editable box but also hide your mouse?
Widgets have a set focus node. Hiding your mouse is done with set show mouse cursor
I know, but each time I set the focus of to the editable text box the curser appears again
Show your code
1s
But tbh I havenβt tested this specific circumstance so who knows, maybe itβs something in that slate function
1)This is when first Interacting (Placed in PlayerController)
2)To keep the focus(Placed in the Terminal Widget)
thx anyways ^^
yes
Try moving that node after the SetFocus execution
you mean the show cursor
Currently SetFocus comes after you hide it so it prly needs hiding again
Is there any way to specify a function / event that needs to be run from a struct? My current setup is having an enum in the struct and switching on enum. I'd just rather not have a massive switch statement for easier management. π
What's the actual use case, what's the actual game mechanic?
Hey guys I'm attempting to make a 6dof mechanic using physics thruster components to drive the orientation and movement of the ship.
The problem is when I move in a horizontal and/or vertical manner using analog the ship spins around; however, when I use digital keys, the ship flies perfectly fine.
I'll show you a snippet of forward and backward movement.
So in that case when I move forward or backward, the ship spins right.
I just have a lot of abilities basically and each one modifies variables, and then spawns or activates something, etc. Some of the sub things are modular, but they need to still be activated based on the ability selected.
so what is an instance of this struct, an individual ability?
Yeah, it's all from a data table that has info about it.
Show one of them
I mean yeah I can load it up in a minute. It's a regular struct. I can add variables if you think one type would allow this.
forgot to mention that I use a wooting keyboard which is a hybrid between digital and analog.
Here you go, I'm not sure what you're looking for.
So it'll all depend on the context and what your abilities can do
But a health up could certainly be something like
Stat: HP
Modifier: +1
Duration: Instant
You're basically making GAS lite right?
Yeah, the functions aren't the problem. I have all of that all done. I'm just looking for a way to execute the function from the data table without a super tall / large switch node. That's all. π
Yeah pretty much.
What are the most options in any 1 dimension you'd have?
Sorry, I don't follow. Options in a dimension?
Like you can see how the choice between ModifyStat, SpawnCard, SpawnMonster, and which stat to modify would be 2 dimensions. There's 2 choices you make, what type of effect to have, and what to effect with it
Give me a complicated card, the most complicated one you have
Ok, I add a component to the player, a widget, the power up has stats on how long the duration is and the amount, those get stored in a variable and updated if I get the powerup of different tiers depending on the tier.
There's more but that's a start. But again, the functions aren't a problem at all. A lot of those are modular and reused.
Where are you doing your switch? What are you switching on?
The gameplaytag in the example you showed?
Yup, the gameplay tag.
Each one has its own, and sometimes I use the gameplay tag as well.
Nah don't do that
You're saying that all the logic for Health Up is behind a switch that takes the Health Up path?
No no, all the different power ups / cards are under a switch. Health Up is just a random one that just does the health stuff based on the switch.
I just don't like it π€£
Inside those are functions and stuff that are reused, just collapsed for easier movement / access
Yeah don't do that
Yeah, that's why I came asking for a better way. I don't like it lol
Most of those could be expressed as modifying x stat by x amount for x duration
and you can compose things
an attack isn't one effect, it's an effect that applies effects
Most of those need to set and update specific variables. So I can't just bulk do them.
why aren't the variables just a tag:number tuple?
tuple?
if you're wanting to go data driven go whole-hog data driven
HP:10
Spread:2
MaxHP:11
MyStats = Array(StatTuples)
Not following. What is a tuple? Is it a struct?
it's just a pairing, you can use struct sure
or map
map of tags to values
MyStats = TMap<Tag, Float>
Yeah, that takes care of some of the variable stuff, but like I said, they're mostly all quite different. Like some have UI, some have effects, some spawn things, etc.
I still need to do X based on the powerup. So I don't see how this solves the switch.
you can boil it all down to combinatorial processing of an effect with maybe a path for custom logic for the rare thing that can't be expressed normally
just make sure effects can apply effects
and you can damn near do anything
So if I get something unique, that's not like anything else, which the majority of these are, then how is it supposed to do what it needs to without the switch?
I'm probably being very dumb, just hasn't clicked yet
Give an example
I'm assuming these are cards like in Hearthstone?
Like the example I mentioned above that makes a widget, gives and effect, a bunch of stuff
Nope, not at all
UI, yes Unreal Widget on screen
So if I understand correctly...
What you're proposing is that all functionality options be as things in the struct / data table of all possibilities, then based on that it would need to check if it has an input and based off of that it'd do just that part of it.
Something like that?
If you give me an example besides HP Up I can give you a bit of a sketch of it
something complicated
Like if it adds a widget, then it checks if it has something in the slot, if it does, it then checks the settings for the widget, etc.
You want a BP graph of one of them?
just describe it
What are these things, items like in Risk of Rain?
describe the actual gameplay
Ok, here's another: I create spring arm components, add a BP to the end, attach them to the player. Number spawned is based on card. If I get other cards it modifies them so they get re-generated with the new values. There's also a widget that appears with a cooldown with specific values and icon showing the powerup and cooldown of it.
I'm good on the actual gameplay and setting up the functionality, it's still in prototype stage after all. lol
Yeah, just an orb that damages enemies in range. It rotates around the player. π
Is this like Vampire Survivors?
Absolutely no other thing is like that
Nope, only one
In that specific way
No other one has anything that orbits around the player
but do other ones spawn things?
Not as a constant thing, I have projectile attacks, but that's its own separate thing from the powerups
Like I said, they are all mostly unique. I was just trying to see if there's something better than a large switch. It's fine that there isn't. lol
why don't you just have BP_PowerUpBase with events OnApply and OnRemove and variables for all the common powerup stuff? If your game design isn't super systemic then going data driven is not the best idea.
BP_Powerup_Orb
OnApply -> check how many BP_Powerup_Orbs the applied character has in MyPowerups -> do logic
Conversations like this make me love GAS.
I mean it's ok but it's also pretty opinionated and the boilerplate is a bit much
I have the functionality on an actor component, and stuff that is reused I have modularized. So for example I have a few different types of widget setups for whatever I need and I made it use a single function with exposed settings. So stuff like that is great.
Thinking in abilities and effects though is a good way to do it
Plus later on I can use it on enemies as well if I wanted to this way. π
What boilerplate? O.o And how is it opinionated? Other people say it's too generic.
Originally I actually had it pure gameplay tags for stuff that I needed to check true / false, but when I added tiers I decided not to add a gameplay tag for each tier and go crazy so swapped it to more of a variable storing system with the occasional gameplay tag when appropriate. But the downside is the significantly bigger switch. π€£
I mean spread increase and spread decrease and hp up being separate paths is a bit much
barring the whole summon thing 1-off, most things can be condensed to modifying x stat by y amount for z duration
Well health up modifies health, which have their own functions and variables. Sperad increase modifies the auras, that have their own setup. They don't mix variables or anything. I don't know why I'd want to combine them.
Most maybe, most of mine? Not at all.
Hell in one of my projects Ammo is a stat.
HP, Mana, Ammo, Spread, Accuracy, Speed, they are all just numbers that go up and down and are interpreted by systems in different ways
How would you do an out of ammo click in GAS, that can be heard by everybody? Assuming ammo is an attribute.
I haven't touched it for a while but about 2 years back I remember it being a damn nightmare to make work with a twin stick shooter we were prototyping. I like to keep everything as agnostic as possible as to whether it's being driven by a player or AI and it was just a pain.
And you probably have separate variables being set for each, right? So exact same setup I have. With functions that probably let you set and modify each one.
Nope, all the same
tag -> value
or name -> value or enum -> value
How is a tag a value?
tag value pair like i was saying
Yeah, but then that's a struct or something like that, that is also saved like a variable. No?
ya
Yeah, so done differently but effectively the same. You have variables being saved based on what you choose.
Main different is you have the variables combined in a stuct in this case where if it's like 1 value then I have them separated
so HP Up can just be:
HP, Additive, 50, Instant
MaxHP, Additive, 50, Instant
HP Double can be
HP, Multiplicative, 2, Instant
Yeah, pretty standard functions from what I can see. All makes sense there
Expose some variables, select what you want or plug it in, all good to go.
How can I check if 2 actors are facing each other?
I have a building snapping system. And right now I am checking the z rotation, subtracting them.. and if the difference is 180, allow the snap.
but the issue is for vertical snaps... no longer relying on the z.
dot product of their forward vectors
This is what I use to see if I'm blocking in the right direction. The Damage Dealer variable is the other actor.
If you already have their forward vector then even easier
This is what ive got so far.. but doesnt account for vertical.
Hey there. Been digging through tutorials and struggling a bit. 
TPS game, I have ADS working with the CameraBoom Socket and now I'm trying to make a shoulder change/shoulder swap option.
Problem is the shoulder change option I've seen relies on moving the camera itself and not offsetting the boom, so if I can change that parameter only it should be easy.
I tried to change the boom position entirely but if I do that ruins the center on the character (not just for ADS). According to his stats his socket is still 0 even though he moved it. It seems to be orbiting the character properly. (2nd image is the tutorial's position for the CameraBoom)
That doesn't account for location at all
nothing about location.. just look direction or rotation
confused by this but curious.
you get the forward vector of the look at rotation... and then convert to dot product..
with another forward vector lol
The dot product returns a 1 when two things are looking exactly at each other using the forward vector, and -1 when looking exactly away from each other.
ooh
The top part just gets the forward vector of the other actor, if you already had it you could get the forward vector and just plug it in.
so a dot product is 1 if values are opposite??
1 if facing -1 if facing away.
Is your test if they're looking at each other or just if they are looking in opposite directions? You said looking at each other
so if 2 actors were standing next to each other... facing .. west for example.. the dot product would be -1?
It would be one. It's -1 if opposite
yea want true on the branch to fire if 2 actors are almost exactly opposite rotation.
And that would be the dot product of their forward vectors
No, if they both faced the same direction it's be some value between -1 and 1. 0 if 90 degrees for example.
It's not a 1 OR -1, it's a float based on how much you're in the same direction.
Opposite rotation and facing in opposite directions are not the same thing. Rotation and the direction that your forward vector point are not one and the same.
What do you actually care about, that their forward vectors are pointing in almost opposite directions?
this
thats whay I have the tolerance of 10, but require a difference of 180
the issue was verticality too though and im having an issue where an extractor building (with down facing snappoint) isnt snapping to a mineral (has upward facing snappoint).
If dot product is less than -0.9 or so
What do you mean by snap? How does your system actually work. You put building where If when?
I'm guessing you have seen components or sockets as snap points and if two of them are close enough together you snap the building such that the second one is in the same location and opposite facing as the first?
close!
we are mathing basically the offset of the snappoint (as a component) from the center of the BP. Then on overlap, if facing each other, allow the snap.. which is using the math mentioned and making sure 2 snap points from different buildings come together.
BUT keeping the snappoints from moving within the building they are part of, if that isnt obvious
-1 dot is full 180 correct? then tolerance of 10 degrees in that case would be .1?
Is this how this would get used basically?
It would be the sin of 10Β°
Is that another node? How do I convert that to a tolerance pin?
Is everything 10Β°
just the tolerance. Building rotation is 45 degrees, but 10 degrees seems like a safe tolrerance
like E and R rotate building by 45
but the 10 degree tolerance should be enough for those random float values that get thrown in when rotating things
Just hard code then, if dot product is under -0.985 they're within 10 deg of opposite facing
Can things be rotated in any orientation or just in yaw?
I appreciate how thorough youre being haha
yea they can be rotated in both directions BUT not all.
Both? There's 3
Is this a side scroller or effectively that?
3d casual base building game
how did you find this value?
-0.985
-.1 was close enough haha but you were very precise
That'd be 84 degrees
0 is at right angles
0.1 is a lot closer to 0 than 0.98
cos(10deg) = 0.984
So if you want to use an angle in your design then the cutoff is -cos(angle)
And there's nodes for that
hey all , I have a blueprint in my project I want to replace with a version of the file from a back up project, what would be the safest way to transfer the file over? i know I can migrate a file from one project to another but im not sure how that is handled when wanting to replace an existing file with one from another project directly by the same name.
I needed a positive tolerance instead actually... I think
wouldnt work negative but its working!
What's the dot product, print it
I was so frustrated at this haha.
In 3d you really want to know your vector ops especially dot and cross product
-1 exactly.. which is good
but tolerance of -0.9... was not working for some reason.
id just migrate everything over. Then start surgically replacing files in the new project. I think itll ask if you want to overwrite if there is a file of same name in same file path.
thanks for the help!
do you have a video on hand about these 2 being used in BP?
O.o The same way you do anything visual or sound wise in GAS. You literally just play a Cue. You just activate the weapon ability. Check resources. If they don't have them. Play out of ammo cue and exit the ability early. If they do, pewpew and commit costs.
Almost got it.
Doesn't that cue not go across the network though?
I hear click, nearby person doesn't because I technically didn't do anything
Of course it does. Server does it too when you activate so it does to everyone. Sec booting engine.
So in both paths the ability succeeds it just takes one path if ammo and another if not?
I think the problem was that I was using ammo as the ability activation cost or whatever the thing is.
Technically. It doesn't Succeed. It just Activates.
Hi, Ive used this system to move the camera backward at a specific speed however i want to also have the camera move side to side based on if im moving left or right. Duplicating this system for left and right doesnt work tho as it just stops working when im walking forward and turning at the same time
Does anyone know a method to do this better?
Tick. Lerp, relative velocity/direction
could anyone tell me why this is happening ?
i have floor whhich is displayed at raycast hit ; however when i do the check if it has nametag then it shows access none
i have gg at the nametag arrray so i exect it to return true when line is hitting floor
i even marked the floor with tag at outliner but i do not get why tag check is not working
π¦
Select the actor in the scene if it is a static mesh, or if it's in a blueprint, open the blueprint and select the mesh. In the details panel, in the search bar type in "tags". from the narrowed list add your tag and try again.
it is a static mesh at outliner
i want to know why when i do hastag check it makes the error of not access
both section of the Floor STaticMEsh has the tag gg
even if they did not have result should be false but not the error ?
trying to check validity and it says vaild . .but again when trying Tag array then contain item it do not return true however it do not show error π¦
any help pls ? at least verification that this bug ( probably ) ?
as a beginner you likely won't run into too many unreal engine bugs
you'll find that most bugs are your code, not the engine
in your case the error is likely because the linetrace wasn't hittting anything
to your info im not a beginner and my linetrace is working fine
it turned out that i need to use cast to not get this error
which is again i do not understand why
because you are trying to access a null reference

so your component has the tags, but you're checking to see if the actor has the tags
@opaque acorn seems like you should really be checking if the hit component has the tags
looking at the source code, ActorHasTag does not check to see if components contain tag
and ComponentHasTag doesn't check if the actor has tags, so you can't substitute one for the other
ComponentHasTag
bool UActorComponent::ComponentHasTag(FName Tag) const
{
return (Tag != NAME_None) && ComponentTags.Contains(Tag);
}
// ActorHasTag
bool AActor::ActorHasTag(FName Tag) const
{
return (Tag != NAME_None) && Tags.Contains(Tag);
}
i corrected it before the last post @desert juniper but still that error is showing ; however printstring is returning true . .
and when you perform the validation check it still is throwing out an error?
is it possible that one frame you are getting a blocking hit and thus print is coming out as true, and the next frame your not and instead you get an error?
You do not need to use a cast to check first, the problem is that your trace may not hit anything in which case the "Hit Actor" would be a null reference, but then you're still trying to check if that reference has any tags. You can use the return value on the Line Trace node to ensure that you're only performing your following logic if the hit is valid, otherwise, you should check if "hit actor" is valid before trying to access it.
specify what isn't working
if the fish doesn't move at all, perhaps you don't have a navmesh in place
just one of the checklist to check
print the movement result
it fails
its floating
sounds like an issue
can i make it not regard height at all?
flying objects are not really supported out of the box afaik
since the fish is very small as compared to le bot
Am I insane or did they completely change how to change morph target values in UE5.4 and beyond? I used to be able to grab it from the skeletal mesh π€
he wont move at all now
Instead of replying with text, show your code, output etc
How is anyone suppose to help if you just reply with, doesn't work
and now he's sliding
So it moved before?
yea it started patroling the area
Sliding has nothing to do with the movement I believe
sure but he still isnt moving as such
wont regard anything
You are still doing the same thing imo
The fish is floating, it is probably not reachable by the a.i
Feed location beneath the fish instead
Shoot a ray trace and use the impact location as the destination
how do i set that up? i only recently started using the engine
Look up line trace
do you want me to run it every tick?
is there a way i can make the ai disregard height entirely?
and simply move to the xy co-ordinates of the fish?
ai data incase needed
Is it possible to turn it off completely so that the camera has no influence on the character's direction of movement at all?
hey im working on a boss for a world in my game, my idea is to have the suggestion that theyr shooting cannon balls randomly on the map as the player is playing similar to shy guy beach in mario kart, https://youtu.be/S9AbS4hzGco how could i recreate this to every so often shoot a cannon ball towards the player
Tool-Assisted Speedrun by me.
WR by the time this vid was uploaded: 01:21.924 - Sword
Apologies from the start boost. I will redo this.
Edit: Actually not redoing this at the moment. I was able to improve the beginning a lot but I just kept losing time afterwards, so I guess this TAS is not bad if you don't count the start.
Su...
so your ai is moving but it's going to z as well ?
it wont move because the fish is too high
so your bumping into the fish ?
i don't get what you mean "it won't move" ? the ai character is stuck ?
the bot is suppoed to catch the fish
he is stuck in idle
ok so he is supposed to "see" the fish ?
nope
thats outdated
hol up
tries to chase player but fails
actually well it doesnt do anything
stands there in idle
ya because it looks like your setting itself to itself position ?
you want to chase the fish correct ?
so then move to the position of the fish
this is in fish ?
yes
do you have navmesh set up
yep
i was thinking if i could make it go to only the xy co-ords of the fish and ignore z
just break the vector for destination
a move to node works just fine
out of player location break the vector and make a vector out of x y only
ok so the fish is your character ?
ye
yes but you pass z into it
im doing that in the bot
it still doesnt work
ur just subtracting it
making it go straight into the ground
just set it to be 0
if the ground iz 0
is
are either print strings showing up ?
nvm im too dumb for math
failed is
got the problem
somehow the bot isnt seeing the fish
why idk
yea i have one for the bullet
but should that make a big difference?