#blueprint
402296 messages ยท Page 804 of 403
normalizing a vector just makes the length of that vector = 1
basically makes it an orientation vector
similar to what you might get from GetForwardVector or GetRightVector
yeah, exactly
I'm looking up that node... probably not what you want https://docs.unrealengine.com/4.26/en-US/BlueprintAPI/Math/Rotator/NormalizeAxis/
Normalize Axis
the output of the Dot node will be -1 to +1 like I said earlier. Higher numbers denote more similarity
so the result that has the higher number is the target that the component is facing
wondering if this plugin looks like it will do the job? https://www.unrealengine.com/marketplace/en-US/product/simple-instanced-spline-mesh?sessionInvalidated=true
No idea. It's not hard to do it yourself though. Just learn about the spline component (and hierarchical instanced static mesh component if desired)... It's pretty straightforward
Does anyone know why this wouldn't work
in your player controller, check the mouseover event boolean
its off by default
Mine is on, from previous testing
Hey all, I have a pretty dumb question. How can I transform the world rotation of an object relative to a specific vector (in this case, its velocity vector). I'm trying to recreate the magnus effect
does your actor collision has channel visibility blocked?
to expand a bit more - its X rotation speed relative to its velocity vector would provide force in the left/right axis, and its Y rotation speed relative to the velocity vector would provide force in the up/down axis
yes my actor blocks all
did you use a breakpoint or print string on the event itself? or are you just basing it not working on your bool Is Hovered
I have checked, the event does not fire
did you change your mouse to UI mode only?
you can try using the node MakeRelativeTransform
Where would I check?
i mean if you added the code, if you didn't then by default it should be working
it should work in ui mode either
yeah its a been awhile since i did mouse events, so i dunno anything else to try.
yeah i havent made it UI only or anything
I have no clue what could be wrong
I really need the object itself to kind of work as a state machine because it will make all my other logic a lot easier to implement
I can only assume its maybe because I need procedural meshes, and those seem to just never work correctly
can you try with a normal cube?
but GetHitResultUnderCursor is working on this object
oh yeah procedural mesh might just be missing something in it's class, i just tested on a similar third party component Runtimemesh and mouse over doesn't work either lol
yeah its definitely the proc mesh
giving it a collision box works
that doesnt work for my gameplay purposes though
right
you can get the bounding box of the proc mesh and add collision boxes at runtime or during generation, etc
can you show me your mesh?
GetHitResultUnderCursor is what I was initially using, but this function seems so much better
yeah understandable
"Hey, it might be a bit late but might work for someone else running into the same issue. I just tested to bind an OnBeginCursorOver event for a Procedural mesh (PM) on BP and is working fine. I set up the PM in my c++ class and then extended it to BP. Make sure the Player Controller has enabled all the mouse events. I hope it helps. Cheers. "
found that though ^
yeah me too
lol
I tried that method but it didnt work
using the Actor event should lets it detect things other than the proc mesh i assume, which is nice
thanks!
Getting this "generating spline meshes" message over and over and the fps goes way down when I click play. any ideas why?
To check which direction I'm spinning, I use the delta rotator node. However, eventually my rotation will go from 180 to -180, which looks like I'm spinning the other way when using delta rotator. Anyone have an idea as to how to fix this?
as in spinning left or right?
proc mesh as in instanced static mesh?
right
No it is generated at runtime, it can be anything
procedural mesh component
I do know the collision functions, because it gets hit by other hit events and physics works
it is a procedural mesh component
oh
now testing like this
you'd think it would fire twice, but it doesnt work even once
yeah because there's something in the engine that doesn't register procedural/other meshes for mouse events ๐คทโโ๏ธ
I've gotta say I have gained such appreciation for games that have core functionality surrounding proc meshes
they are such a pain
did you delete the original mesh cube after copying?
Oh?
@static charm any ideas? Just getting nonstop list of these
nope but i separate them apart so i can see them
hmm nice
Can this be overwritten somehow? I don't see why they would ever build in this kind of limitation
what engine version is everyone using though?
4.27
if i untick create collision then it doesnt work
@worn fjord make sure you aren't spawning extra things like in a endless loop. but the single message just means that's it's generating material shader for the spline mesh type, at least i think so.
when i add impulse for movement do i need to normalize it as when it move an actor on the x it kinda move in the y direction randomly. even though y is not plug in
found this in the plugin FAQ, really weird it says it is not meant for runtime?
oof, yeah that guy should have put it someone in his frontpage that it's not for runtime use. or just fix it so it works at runtime.
So umm Where to start debugging this? This is Wheeled car
Is your wheel collision setup properly
Unfortunately I can't copy a static mesh
When you adds sections, you ticked create collisions right?
I use Create Mesh Section and then Add Collision Convex Mesh, because doing them separately works much better
ticking create collision pretty much never works
I can try though
lol what, that actually worked
this is the first time ticking Create Collisions has actually made a collider that worked on any relevant hit event
usually it just doesnt work and I need to build them separately
do you need simple collision/physics. i would test that too if needed.
I believe its that
Since
On your procedural components
There is an option for use complex as simple
I think?
Maybe you just need to untick the use complex as simple option in thr procedural component
Hello guys. Im super new to programming in general and blueprints. Im actually an artist who does 3d models/meshes and such. Im working on a personal passion project but unfortunately am not too certain on how to create a specific system i would need. Any pros out there that would be willing to assist or such?
Since manually adding collision = simple collision
What is the system you need help with?
So 2 things. Firstly i want a way for the player to for example push a button and my map changes from snow to no snow and vice versa. Lets say my base map had snowbanks and ice everywhere and frozen lakes etc. After a button click the map is the same but changes to a summer version. So all the assets with snowbanks and ice just vanish and if i had texture of groundtiles with snow they change to a version without snow. Something like that where i have different seasons but the same map. Another example would be if theres parked cars on my map. When its snowy the cars texture material has snow on the roof but with the button press the material changed to a normal version of the car without snow on it
And second Im in need of a parkour system. So vaulting, climbing and shimmying across ledges. Ive seen many parkour blueprint tutorial but none of them have everything i need in one. Its usually just a peice or two of what im looking for
tyring to add music for when health is under 40, is this enough ?
I dont see why it would not be enough.
if you have ways to recover hp
you probably want to remove the music when more than 40 health?
yeah that was what I was going to ask
my 2 cents:
- tag your toggling meshes (snow), store all actors with tag on begin play (so you can toggle them all off by input). For materials, param collection so you can affect the same variable and have multiple materials reference the same.
- ALS or make your own :/
Pretty much, I am not so sure how to program a parkour system.
one part at a time ๐
any other way than fade out ? is there a way to stop spawn sound ?
I see alright. Well i shall see what i can do. Im super new to all this so im just kinda learning what does what and such. If i need further help ill let you guys know but thank you guys!
Both of those systems would be a challenge if you are a complete beginner though.
You might want to try and learn some fundimentals first.
Honestly I would say, they would be straight up impossible without a tutorial or someone telling you exactly what todo. Alot goes into those systems.
a bit of advice, features that overhaul or heavily modify the template movement behavior can be rather difficult if your new
yea
Yeah for sure. I deffo should. Im gonna see if i can learn online or maybe if i know someone to help me learn
this also goes for camera work
dont let me discourage, just know that if it feels hard its because it is ๐
No discouragement here haha. Everything you said is facts and its always better to learn and fully understand what your doing haha. Im gonna see what i can get set up and what i can do to learn
You guys have been a big help tho haha. So thank you all
when you fade to volume 0, by default the mixer will stop the audio
you can straight away call stop
in the sound cue ?
but it probably would be awkward for the music to cuts straight away
the audio component
only fade out when you want to stop the audio
something like so
call "RecoverHealth" (probably should change the event names) when you recover hp
tinker around and you can rearrange them
Just made this simple bp_actor script i expect the order of i mention "hi" first then i mentioned "hellow". But hellow displays first in the screen .
someone plzz help
it doesn't print first
print string goes from topleft and older messages are pushed down
thanks mate
I want to playsoundatlocation when a ball (using projectile movement) bounces. When I use the OnProjectileBounce, it works well, but I am having a problem. When the ball is rolling on the floor, it plays the same sound again and again which I don't want (in other words, spams the audio). I only want it to play when it actually seems to bounce.
the ball while rolling
the ball while bouncing
Any idea how to fix it?
Make a bool is on ground
Have a branch in the code that plays the sound (somewhere before it)
The branch will run when on ground is falsw
(Or if you use the NOT node when the condition is true)
If it still plays its probably because it slightly losses grip to the ground so you could see if the distance to the ground is less than 10 or 20 or something small like that
can i add different widgets to 1 array?
Array is one type of class. If your widgets can be stored at their parent class level yes.
Check what the addunique inputs are
Mmm. Pure nodes.
it might be that two nodes are calling from the Random, so the random is different
Still not sure why that node is Pure.
say again conrad?
over the years, there's been some of those quality of life improvements that did not actually improve life. Like getters on setters, or having multiple function outputs
the Random. ButtonPress is accessing it and then RemoveIndex is, they're different nodes
so for example, you could get the random index, set that as a var, then use get from array to fetch that same one
remove index uses the same variable
its set once and accessed after by other nodes
you could try to test what the index returned is by putting a print at each step between nodes
test a few times as random is random
Order of execution numbering on your current logic.
strangely works only one time
but theres 5 elements
like it removes them all
oh no theres 1
yea now i get it random calls for every node
is there a workaround?
Drop that into a function, random just the index, save that locally in the function and use it to get the element from the array and then use it to remove index.
not quite what im suggesting
Also should use a function and a local variable for the integer. Doesn't need to be in the class's global scope.
you still have random be accessed by two different nodes
still calls integers with no elem
Hey just wondering if anyone can help with this. I was spawning a character on my main character and got that all working but i noticed perf was tanking having a new character spawing like that so i decided to make the other character a skeletal mesh component and set visibility then play a montage. But now for some reason montage's wont play I can only play animations directly on that character. I have made sure the slots are setup properly for the montage so i dont think thats the issue this time.
what could cause a "get none" when trying to get a player controller?
Chances are you're starting PIE (play in editor) with Simulate first.
what do u mean by simulate first?
but it sometimes bounces right
So then the distance from the ground would become 0
I dont know how your game exactly works hehe
You could have a do once node
reset when it leaves the ground
So the first time it hits the ground it plays the sound
and its reset when it leaves the ground again
Context matters a lot with that node. Multiplayer? Where is it being called?
level blueprint
begin play
it is a multiplayer project
Beginplay is dispatched to the level before Pawns are created usually.
thank you
this is the blueprint for the ball. It plays a sound when it bounces (except forwhen it bounces off the bat, as you can see I have checked its not the bat)
and heres the problem, it spams the sound
it was rolling
but i want to play the sound only when it apparently bounces
sorry for the lag in the video
hi, is there any way to acces these variables from blueprint and how?
I would like to change these gear ratios via float variables and similar with tires. I would like to change some values thru blueprint variables.
How can i do it?
Haven't used that component, but given they are under "tramission setup", it seems if they are accessible they would most likely have "Get Transmission Setup" or "Get Forward Gear Ratios" nodes or something like that
and similarly there would be a set or update node for them
Am I supposed to be able to override details of inherited scene components in data only blueprints with parents? Cause I can only do so in the full blueprinty editor, but after reload it still opens up as a data only blueprint. Am I missing something?
Nah it just assumes you don't want to change anything else, it still works
It was pretty confusing, because I was searching for a change I had made and it was hidden inside the full editor. ty, anyway
Is there a way to get a very low resolution scale? I need ~15% to get a "retro game 320p resolution", but it seems it goes not under 33%
Not sure I'd rely on the resolution scale. I'm pretty sure that's an easily overridable ini setting.
Seems like a material would be the way to go for that type of effect
Anyone know why setting relative location of any component mesh from within my characters bp would make the mesh just disappear? no matter the value meshes just vanish when i run any logic to move them.
for debugging can you make vectors (arrows) poiting when you are playing?
im just running this simple code to see if the mesh moves at all in the scene
ill try the debug stuff now
you are using world location as reference
which should also be relative location
bottom left node
nvm found a solution, drw debug arrow works
now i just need to get anim montages to play on that mesh.
for some reason i cant get any anim montages to play on skeletal meshes that are a part of my character bp
the skeletal mesh needs to have a animation blueprint before you can play an animation montage on it
hello, i was wondering is there a way to make materials/landscape-materials react to actors placed in the world at runtime? E.G. when i place a tree on grass the surrounding space around the tree becomes dirt etc.
hey how can i make logic for changing offset of the springarm. i tried using keybind -> flipflop -> timeline -> starts from 0 value, then goes to 150 after .5 seconds has passed(smoothly).
then i added + to the springarm offset and set the final result for the springarm offset but it always results in very high numbers like 1700 to the right or 1800 to the left.. doesn't matter if i use vector track or float track
i basically want to make a toggle so that when i press once the camera slowly goes to left side, and when i press again, it goes back to where it was
anyone know how to fix the bug where when you right click and the add actions for blueprints box just disappears?
its an Nvidia graphics card problem assuming you have one. latest drivers cause issues like flickering in chrome and windows going blank,
there is an "official fix" but it is not working at all,
i suggest you download from nvidia website 457.09 driver because it's the only one that actually works (any version after that causes issues)
ah right ffs, my geforce experience has been broken recently I guess that might have something to do with it
the issue has been going on for approximately 3 years or so, without any fix, i started myself experiencing it after i upgraded to rtx 2060 but not sure why it exactly does this
driver works fine tho, literally the only thing that worked lol
Here comes a fairly open question, where do you people find casting to a blueprint class instead of interfaces to be a good idea? Widgets? Components that will only ever attach to a specific type of actor? never?
All of the time. With the exception of the rare case where interfaces were actually created to handle.
really? wouldnt that just create a million billion dependencies that would load on startup?
trying to combine your two essays in my head rn but summarizing, casting is fine but do it to class 99% of the time?
@smoky marsh To briefly clarify on this. Interfaces are only meant to house functions that can be used from a similar source. Consider a widget that can be passed a UObject pointer, and display the remaining time in it's text. You could make multiple actor types from managers, to core framework hierarchies like GameState, or even your own actor class hierarchies, and return different times based on those class's variables. This allows this one widget to not have to cast to five things to get it's values but call one function on a single pointer type.
Sorry i shouldve clarified my confusion, i know how interfaces are supposed to work and your posts have sorta made me realize that they shouldnt be treaded any different in unreal than in traditional programming.
what i was confused about was say i need my widget to bind to the event health update on my player, or have my enemies bind to the events on my player, then i would cast to my player to get ahold of the events instead of using an interface?
Well, your player character CDO will always exist. Or at least a base class of it. So casting to that base class in a widget that uses it or enemies that do, won't have a single bit of affect on memory cost. The class they're casting to to bind the event from what already loaded.
but the other way wouldnt be true, having my character cast to enemies that come 100 levels later would be a waste?
can someone tell me what i did wrong? i am trying change colour of my character gear but is not working
Semi correct. Your enemies should all share a base class where most logic can be at least called on. So you'd be casting to that.
i guess what i should just get my head around is not being worried when i see the size map of my small shovel which barely has anything in it be 150mb because it references the player, but the player would already be loaded anyways so it's not an issue
The main point is to avoid loading assets. If your AI are different, differ them in assets. You can do this either by having default empty Skeletal meshes and populating them from SoftObject Pointers, or you can create children of your main AIBase, and place your skeletal mesh assets in them and never cast to the ones with assets set.
final question, or at least final i can think of, seeing as this project is restricted to blueprints, does unreal handle casting to a bp class that will always be loaded in any differently to casting to a cpp class?
Vaguely, not so much. Basically if you have a hard pointer of any type, whether it's a cast node or a pointer in the properties list, it'll make sure that class's CDO is loaded before the class with the pointer in it.
Also functions count for this. Functions that take pointers or return them.
that should be fine seeing as the only objects i can think of currently with hard pointers are UI stuff which dont get spawned until the players begin play
Bear in mind that they don't have to be instantiated. They just have to be pointed at via class or instance.
Just having one of those forces the object CDO to be loaded.
oh okey, ill keep it in mind if i see that crop up, thank you super much for answers all the questions, it clears up quite a lot of misunderstanding i had about this in general
Quick question about this. What if the base character class has 10 object reference variables/pointers. Will casting to this base character cause those pointers to load similar to loading static/skeletal mesh components on the character like you mentioned? Or will they only be loaded when e.g. calling a function found in the base character that uses that pointer?
theyll be loaded
really casting can be summed up as: don't think about it, but if you can find ways to cast fewer times, do it
@smoky marsh A great example is the GameMode's default classes and level loading. I have these classes here on this map. If I look at this map's reference viewer I see the second image of this map referencing that GameMode. If I look at that GameMode's reference viewer. I can see all of those set classes there.
So before this map can instantiate, it has to make sure that the TacticalGameMode's CDO is instantiate, and before that can load it's CDO, it has to make sure that those six other classes have their CDO loaded. And that just goes on and on until the hard references stop.
This is stupid cheap for most classes as they're insanely small compared to even a 32x32 texture.
but also, understand what it is you're doing when you're casting
Ah alright, thanks
You can load thousands of base classes into memory and not flinch. But things like Sounds, Textures, Meshes, those are where your sizemaps will skyrocket.
Yeah i tend not to worry when it comes to most things but anything that references the player or an item instantly gets huge
the cost of a cast node is literally just about 1.25x the cost of a branch
something like that
but seeing as the player would already be loaded in, it shouldnt be an issue?
It won't have a single bit of impact on your memory management in that case.
god i wish i could tell the editor "nono, this class right here WILL be loaded, don't make it take up 99% of my sizemap"
๐ค
Are these the main topics that will help understand stuff like casting better?
Partially. It's also just an awareness of how Unreal's garbage collection works.
i doubt it, i understand that stuff perfectly well but it takes someone like Authaer explaining casting for me to actually get it
yes
polymorphism is what casting is alluding to
Im not used to garbage collection, im used to knowing what is taking up what space
hierarchies is where casting is happening
and handling it myself
think of casting as... well, a casting call for a certain role/type
the type you're casting is asked to "act" as something else, within its limits
I can't imagine they would have, other than the blueprint communication stream
but also because this is general OOP stuff that is upwards of 30 years old
so there's plenty of good resources out there
feel free to ask questions
this is genuinely one of the topics I think is really good for knowing how to make blueprints work and future proof yourself against mistakes
Memory management is a difficult topic because there are instances of classes, and then there are object CDOs. Anything that is a UObject is managed by it's pointers. The difference is subtle. You don't so much have to manage it yourself as just be careful with what you save pointers to.
A Widget is a great example. You create a Userwidget, add it to viewport and save it into a local pointer in your class that spawned it. Now you remove it from viewport, but it will never get garbage collected since it is in that pointer. If you then null out the pointer to it without it being on viewport, eventually garbage collection will come along and clean it away.
This is no different with Asset objects like say a SkeletalMesh. If you start up a game with an empty character class, no mannequin. Then you load the mannequin skeletal mesh from a SoftObjectPtr and set that in the Character's Mesh SkeletalMeshComponent, SkeletalMeshComponent saves a pointer to that mesh in itself and keeps the Mannequin asset alive. If you then change the SkeletalMesh to something else, garbage collection will come along and sweep away the Mannequin mesh from memory, as nothing is pointing to it anymore.
Purple Class variable count towards keeping the CDO of a class alive as well.
whats the width of a collision box?
whatever you set it to be?
whats the standard unit width
Guess its time for me to start being even more liberal with my soft pointers
you can literally see the box extents in the details panel
oh i can didnt know that
Heyo, I have a hopefully quick problem.
I followed a tutorial on making a shotgun, just a for-loop and this random location added to the END of the LineTrace.
Now it works perfectly!, but i want to control it with a variable, that I called "Spread", but the "randomFloatinRange" all just return zero. the variable itself return what it is set to. Is that not possible in a for loop?
i thought you meant the locaiton and then multiply that with 2
so for every face it extends outwards
by that amount
so the box size would be double
What does the AllowPrivateAccess specifiers do?
UPROPERTY(BlueprintReadWrite, meta=(AllowPrivateAccess = "true"))
float YourPropertyName;
well for me at least moving on, is there something similar to the event any key but just for numeric?
how do you mean numeric?
numbers on my keyboard, indiscriminate between numpad and normal
๐ They help. Just bear in mind that it's pretty pointless for gameplay classes usually if you keep heavy assets out of them. They're only truly useful for assets. SoftPtrs to Textures, Meshes, particles, etc stored in Datatables or Arrays. Normal gameplay classes with logic in them are so tiny that they're barely a blip in your available memory.
right but no letters?
yup
anykey and check on the key
that was my initial instinct as well
maybe there's even a function for something like IsAlphaNumeric
Could always make your own project input for it as well.
but I haven't looked
I need lunch, how did i miss something that obvious
nvm im retarded.
overwritten it in the child-class
right click the component in the component hierarchy > add event
ah nevermind it's dynamically added
then you'll have to bind
how do i do a simple begin overlap event?
drag out the blue line > bind to on component begin overlap
then from the red pin in that new node, drag it out and type in CreateEvent
remember to connect the execution for the bind
like ths
yep
I am stuck in a math problem. I want something akin to normalize to range, but with a third value.
So basically, I've got a range between 0-1
If the value entered is between 0.2-0.8 then the return is 1
If the value entered is between 0.0-0.2 then the return is between 0-1
If the value entered is between 0.8-1 then the return is between 1-0
Hey guys so I'm running into a really weird issue with my project now. As you can see in the video below when I initially hold left click everything works fine. The line trace shoots off towards the mouse cursor (albeit a bit of axis). But for some reason after the first time doing I then have to double click to get the line trace to start working and when I hold left mouse the cursor then disappears and is locked in place. I have showcased the code I am using and the fact that I have set the input mode to game only to show mouse cursor in event begin play and this isn't changed with any code throughout the rest of the project. https://streamable.com/a4hq30
so to summarise I am trying to make it so the line trace shoots off when just clicking once and to prevent the mouse cursor from disappearing when holding left click
use a curve?
In lieu of some really clever math thing which I don't have a mind for, make a pure function (a new function but marked as "pure" in the details panel). The function should have a float input and a float output. And in the function, you can branch the logic based on which range it falls into
Oh yeah, a curve asset lol
That is clever
Interesting, I have never used curves before, i'll check them out ๐
Thank you so much!
sounds like you also want to use it with constant cutoffs so you don't get slopes
there's the animBP
well I meant not using montages ๐
any time you use a montage you miss out on using the anim thread afaik
if you mean these, nope
might not be a concern
what are you trying to achieve again?
your call but it's always better to think stuff like this through first rather than going for the "simple" option
and especially for this there's a node for that in the anim states
or rather, a functionality for that
CanEnterTransition
but it can't be used with montages because they're outside the anim graph
so again
animBP?
so for example you have like a 3 swing attack
if you input movement, the swing will stop?
If it matters you could set a playrate variable aswell when changing playrate
anyway I would definitely consider moving that entire setup to animBP
it's complex enough to warrant it
Thus have your own playrate returning the desired value
you can use anim notify to determine if a montage is stoppable
true
Or anim notify state
so you can determine whenever you want to stop
Which is more accurate for stoppable imo
Or perhaps thats what you ment^
Notify state allows you to set 'windows' where things could happen
So frame 3 to 10 could be interuptable, while 8 to 15 could be combo-periods
One message removed from a suspended account.
One message removed from a suspended account.
show code
Hi guys! Is there any simple method to create debug table via blueprints? Something like printstring but without spam in conlsole
One message removed from a suspended account.
use set input mode Game and UI instead of UI
One message removed from a suspended account.
talking about the state window, is the only way to check the window is through on begin and end notify from a play montage node?
@remote meteorSwitch on notify name - do whatever u want on whichever notify u want
was thinking if we were to use this node, theres no way to get the notify then
Huuuh no ? Inside the notify state
You inform whatever bp must be informed about what it has to know
yes yes these
In the notifystate class you make
There is notify begin, and notify end, which lets you tell the char bp that it can now combo, and which combos it could pick, f.ex.
๐ right, found it
what errors?
oh I see
it's not the delay
it's because you set the variable of black screen after adding the variable to viewport
black screen should set first, then it should be added to viewport
@odd ember Thanks so much for the help! The curves worked perfectly, also, I learnt something new about UE! ๐
ok isvalid removes error , but im sure im only calling it once..
fk found why its happening, im dumb
Does anyone have any experience with ShooterGame? I'm trying to get it so the camera rolls, but there's no actual camera component...
Then it's probably handled by the controller and you wanna set control rotation
Hi , how set skeletal mesh from actor 01 in actor 02 ? (both of them are skeletal mesh component... ;/
Hey guys, I was doing this earlier and wasn't sure if I was doing it right, but now I'm no longer pursuing it so it's purely a discussion now (rather than me trying it out and reporting back).
How would you go about the flickering flashlight in horror games? What I did was use a timeline to loop, but I noticed that once I left the trigger area it would still continue to loop. I tried stopping it, but it didn't stop it, though I think this may be because I didn't plug it into the original timeline node's stop pin and instead did it on a copy of it. But are there better ways?
Lol thats easy ;p .Thank You so much @trim matrix
Light Function Material
great, thanks, hadn't thought of that
if you need something simple like closing in a distance and it will flicker
and it will return to normal after you get a distance
its doable
Only use those on dynamic shadow casting lights though. As light function materials require that, so it makes those lights more expensive.
yea since it's a flashlight, it's moveable and casting shadow and all
unless you have like fake light cones then you will still need to handle everything in bp
If you do it via code you have more control over the outcome than a just a relative factor of the output intensity.
if its a holding flashlight
elsewhere, I'm a bit confused why the engine keeps missing clear blueprint execution nodes every now and then.
I have a simple sound cue that loops around the map. It activates between X hours and Y hours. In my blueprint I have clearly kept START and STOP nodes for the cue to fit this time interval. Throughout my development, I had no issues. I gave the packaged game to my cousin, it was fine. I gave it to my friend elsewhere today and for him, the damn cue never stopped. It makes no sense why the engine skips some nodes sometimes. I've now literally had to put STOP nodes everytime the time of day changes to make sure it's not playing when it's not supposed to.
i suggest handling it with bp, and curves
for now it's just an attached spotlight to the char. Simple stuff. I put a timeline and lerp to go between the limits of intensity
engine wont skip nodes without a reason, will need to see how you do it to check
no, there's no copy function
my death event checks for health points if its 0 it kills player. if its more it reduce 1 and restart level but here it keeps reducing all life points then restart level. what did i do wrong.
after adding the new component, you have to manually set whatever needed variables to the new component
you would have to create a new component and copy over the necessary settings yourself
xD
you are subtracting current HP from zero, so you'll end up with a negative value
how. i wrote -1
Is it possible through blutilities or editor widgets to filter a content browser's widgets by one of their properties? I need to extract all non-focusable widgets. there's one of them that isn't focusable but idk which.
๐คฆโโ๏ธ ofc... forgot about bulk edit - thanks!@remote meteor
i made it -1 so how im i reducing from 0 ?
that is (0-1)=-1. I don't see the point, but u know ur own game ๐
how can i make it reduce 1 from the variable
GETcurrentlife - damage => SETcurrent life
and you fire any "isdead" check AFTER you've set the life to a new value, not before
yeah, that would -1 to the health
but still it didnt work
did you set your default health point to some other value?
the defqult is 0 and as you play you collect items that increase your health +1 each time and recuce -1 every time you die
but its reducing everything one you die idk why
anyway your damaged event should look like this
after you get damaged
then you decide if you are dead or not
did you check if you add your health correctly
you mean in the health item that add one health point ?
just temporary set the default value of health point to 10 or something
and try again
Hi! im new to unreal engine 4 and im trying to learn how to do simple stuff like picking up object and making my character attack. Im following this tutorial where this guy explain how to pick up a weapon, in his video he can connect the array element node to the (pickupweapon) node, But for some reason i get this error that makes me unable to connect them.
you can find that out later
the video is blurry even tho its on 1080p
none of these things are simple
i mean they are not, but where do i start tho ๐ญ
the pickup function belongs to the item, not the player character
random youtube tutorials will do you more harm than good
i set the default to 10 and when you die its set back to 10
ohh, i see
so i guess its going back to default idk why
hi, am currently trying get a tile location on a tile map. Using the world location from ConvertScreenLocationToWorldSpace so the player can click on a tile using their cursor. However, I did not find anyway to get a tile location based on worldlocation. Is there is something i am missing or something better I can do?
my question to you is
what are you trying to do with the restartlevel command
so the way you would want to do something like this is that you would need a manager that knows the location of all the tiles
then when you click, you pass the location you clicked on to the manager, and the manager tells you which tile you clicked on
its an endless runner game so when you die and you have more health the game does not end but restart the level for you
oh i did not think of that, thanks
when you restart level
everything on the level will be reset'd, including your player character and all its variables
you should manually reset what its needed and the location of the player to the start point instead of restarting level the whole
i see so instead i need to respawn the player
no you want keep your player character
because your health is inside, if you throw it away, the health is gone
you just want to set the player character to the starting location
i ll search on how to do that thank you
there are many ways to do this
i removed the restqrt level to test but the health points decrease by more then 1 i guess as long as its still touching the obstacle
how can i fix that
touch as in overlap or hit
this is the obsticle
hit event will call very frequently if you keep banging it or rubbing the surface
my sun manages the time, it shoots an event for changes like morning, noon, etc. (enums)
In the level BP, I have the switch case for these enums. So a simple "start" and "stop" for the sound cue during the times I want it to be started or stopped.
i would suggest to use an another overlap collision to do this
which one do you recommend that only apply onnce and not recued more then 1 points if it kept touching it every time
i believe end overlap wont fire without overlapping
๐ค
use overlap instead of hit
i ll try it out 1 min
you will need to change your collision response to the player character to overlap
yea I had a similar issue with widgets being drawn more than once, which was mostly fixed by do once and resetting on end overlap
begin or end overlap ?
begin
begin overlap -> do once -> draw widget
end overlap -> destroy widget -> reset do once
i tried both of them but they didnt reduce hp nor kill the plqyer
maybe you can have a simple capsule collision and use overlap for that instead of the static mesh?
You'll probably need a collision box/capsule so you can actually overlap it..... and maybe use an interface instead of casting to your player
If I use SetArrayElem with an index that is outside the size of the array and SizeToFit disabled, will it just not work?
@remote meteori tried that my character goes through the block and sometimes it reduce 1 sometimes more
do you have more than 1 collision in the player charactor?
no just one
i mean in your player character
turn off the mesh collision
if you dont need it
only the capsule component has it enabled
How can I check which actor is overlapping on trigger? I need to see if the player or an ai is overlapping
from the other actor
the easier way to do this is to get its controller and cast to player controller
turning it off like this right
provided if your player will never unpossess from the player controller
well, atleast thats my way of thinking, an ai also can possess a player character blueprint
can you print what are you overlapping?
i have the mech collistion turned off as well
on the other comp node
sometimes one hello sometimes more
which one is that
other actor is a promoted variable right ?
Yes
i couldnt link the variable to =
Hey guys, I've been wondering if I can create a few buttons that will control the things like bloom, motion blur etc. in blueprints? thanks.
oh cool and could you help me a bit with that? I don't actually know what nodes to use
oh wait
I found something online
hey guys so i'm very new to unreal engine, barely a week, but i've got a clear vision of what i want to create and for now that would be a system to control the speed of my spaceship from 0 to 100 basically, in order to do that and after many hours of trial and error with other nodes like impulse, i created this blueprint which partially works the way i want, i can turn the speed up in small steps from 1 to 200 and i can turn it down just the same way
what happens though, is that my physics thruster just stops the ship in place once it falls below a certain number (anything under the number 66 or somewhere around that)
there is no mass set up for the static mesh (i think i need that later on though), damping of 0,5 both linear and angular (also tried without it)
did i understand the physics incorrectly? shouldn't it ''fly'' for eternity if the damping is set to 0? why does the thruster that should push my ship forward, even if just very very slowly, just stop it in place/doesn't react below a certain number? i couldn't find anything related to my problems and very little regarding space ships or space games in general.. i hope you can help me
hey guys I have the following setup that I want to switch the character I want to possess. That's working fine with the P key but if I jump and switch to the other character, it just floats like this :
https://gyazo.com/a2f4a040eed082bba19a4021b23ca1d3
here is my blueprint :
https://gyazo.com/62190b4b28ef04fa891883d5549d4bcc
Any suggestion would be awesome!
Ive seen that it could be a bug https://answers.unrealengine.com/questions/772546/character-gravity-afther-posses-not-working.html ?
if it's your first project and you've barely been at it a week, why not try something simpler? the first car you make isn't going to be a ferrari either
anyway you can try #legacy-physics for your question
otherwise I recommend learn.unrealengine.com
@odd ember well i got basic movement with roll pitch and jaw done already so the logical next step for me was to expand the forward movement system by controlling how fast it actually goes instead of on/off, was i setting the bar too high?
you tell me. I wouldn't personally get involved with physics for stuff like that, and tbh I would research the topic thoroughly before committing to any one solution
but if you think you can handle it, go for it
hey guys I have the following setup that I want to switch the character I want to possess. That's working fine with the P key but if I jump and switch to the other character, it just floats like this :
https://gyazo.com/a2f4a040eed082bba19a4021b23ca1d3
here is my blueprint :
https://gyazo.com/62190b4b28ef04fa891883d5549d4bcc
Any suggestion would be awesome!
Ive seen that it could be a bug https://answers.unrealengine.com/questions/772546/character-gravity-afther-posses-not-working.html ? (modifiรฉ)
whatever is going on, this is not the full picture
omg i feel so dumb thank you haha!
@ebon harness Wait. Is your linear velocity dampening 0, or 0.5?
This is a known thing. I don't remember the easy way around it, but Pawns don't generally move without being controlled, as they rely on inputs from the Controller. You could possibly try keeping a blank AI controller around and have it possess the thing you Unpossess.
@maiden wadi i have tried both, same results
Hi, I had a similar issue. Do you have one mesh for the spaceship or multiple?
it's a makeshift ship with 3 seperate static meshes but one as parent/root @glossy mantle
Im so dumb thank you
Ok, and you set damping to 0 on all meshes right?
Maybe seems stupid but have you tried enabling mass and setting it to 0? And maybe try doing that for all of them?
Why isn't this working? I have no idea why it shouldn't
It's usually much safer just to check the player's locally controlled pawn.
What do you have the boolean value connected to?
It's a branch
I mean, the event OnComponentBeginOverlap only executes once right, so wondering if you need it to be continuous
Yes in a way
The OnComponentBeginOverlap can happen (very theoretically) infinitely but it worked before I added that bit in the picture.
Level blueprint?
@glossy mantle damping is set to 0 on all meshes, physics simulation is only turned on for the arrow part as the cylinders would just be left behind otherwise, doesn't change the speed problem though even if it's only the arrow
mass cannot be set to totally 0 only 0,001 if set to 0,001 it does fly at thruster strength 1 but way too fast, at 200 it begins to do loopings even
is there a way to make a variable type instanced like I can in c++ with the uproperty instanced?
Then that won't work. You're checking against a random pointer type and not an actual instance. If you want to know if it's a class type, check the class IsClassChildOf or whatever it's called
Had to go look up the definition for that specifier. I've never seen it used. I'm not sure why you'd need it in BP?
I think I could just use a struct instead, which should have the same functionality for what I need
Okay, i read on some forum once that you could have negative damping to achieve som effects. Otherwise i have no idea, sorry i coulnt help
@glossy mantle i will try that later, thanks for trying to help man it's alright
Hi I would like to be able to "push" my character by dragging the mouse (the more the drag distance is the more powerful the push is) and make some wall make my character bounce without losing speed, the whole is in top down do you know any tutorial that could help me? I already set correctly the camera and removed all the friction from the ground
So like a sling shot or launch mechanic similar to a ball runner game?
Don't do that
@hexed barn Break down what you want to do, one step at a time. Break down into little parts what you want to do, and deal with it one step at a time
ask if you need help
yes
basicly my idea is to have the playing being launch only on x and y axis with no friction and bounce on any surface (later I will try to put surface that slow down)
So 2.5d?
But since im pretty new to unreal im more trying to do like little project by little project and this one look a bit too hard for the moment
I was planning on doing 3d but using a camera on top
so I would be able to use physics in some way
So top down?
yup
This doesn't seem like a complex project- It may take a while depending on the layer of depth you want but totally achievable
rn I have the correct bounce and friction but it don't bounce on wall
Honestly my plan was to have a game with fast gameplay multiplayer where you stack speed (with a cap) and put it in props to launch on your friend to kill him
I use top down template so I don't think so
Make sure the wall is static and collision is on
I will try thanks ^^
If you are using your own models and haven't generated automatic collision, you could add your own collision or use set it to complex collision within the static mesh.
But if your simply using the built in simple shapes or geometry, they should already have collision.
Another thing that you may check is if the collision profile for your character is set to collide with the object type of the walls.
For now im just using cube and the character is just a capsule component shape like a ball
Im changing something in the movement because for now I was just doing impulse on one way
but I did this change
It did bounce of the wall thanks ^^
right now I only have few thing to solve (im gonna try to solve them by trying different things to learn a bit more the engine
thanks it's help me a lot already ^^
Remember, if you ever get stuck, there are plenty of people on here that are very willing to help ๐
I will remember thanks again ^^
np
Anyone know how I can get 2 or more ai of the same class working at the same time?
?
yes but since its of the same class their actions often conflict
and one breaks and the original works fine
or sometimes they both break
It normally works with one tho
k
The ai does other things
but this is just the movement
which seems to be the main thing breaking
is the breaking happening because both AI are trying to use the same references?
yes I believe so
i guess, better asked, how does the ai break?
what is AIChosenOne?
Chosen actor (more specifically, out of a bunch of triggers) which the ai is told to go to
How so?
Thats because the script repeats
Thats a good point
I can think of an inefficient way of doing it (by putting the second move in a seperate event and on fail try again) but is there a better way of repeating the second ai move?
are you sure its because of another AI? you've tested this thoroughly with just one?
Yep
i am attaching a skeletal mesh component from my character to a destination in the world and that is working great but if i move my character after that the skeletal mesh still moves with me. is there a way to detatch it then re attach it after the animation plays?
oh i think i found it. detach from component works
I'm getting an error saying "Accessed None trying to read property" when I have multiple actors of this AI class on the circled node. What could be causing this?
where is the documentation?
https://docs.unrealengine.com/4.27/en-US/API/Runtime/Engine/Components/UPrimitiveComponent/OnComponentHit/
like this documentation doesnt explain much
Event called when a component hits (or is hit by) something solid.
Is there a way to move the vector of speed without reducing it? basicly I push my character but if he go up and I push down it slow him down and I would like to change the direction he go then apply the impulse
this is what I use to do a sort of slingshot
rn I know how to rotate the forward vector but I don't know how to set the rotation to be the same as the impulse
i have 2 objects/chars on a plane. trying to figure out what relation they are, as in p1 left, p2 right. or p2 left, p1 right. i can get camera right vector (which only pans left/right) so it should be a good frame of reference, just unsure on the scripting to determine which is on left, which is on right, etc.
I think I somehow got it but I miss the thing to put it in action
I have a class that has a base class with variables in it. when I'm getting the class defaults for the child class, the variables all show up as pins and i can check it and use it. but once I compile, it removes the pin itself and errors? Not sure what's going on here. it worked just fine before I gave it a base class.
and it says "in use pin Type no longer exists on node Get Class Defaults". But it's clearly there, i can see it in the menu.
uh
how do u do delete this
everytime i delete it
it comes back
i want to keep navmesh
but not recast navmesh default
I had a similar issue in the content browser, not the world outline like yours. I had to go to "filters in the top left (of the content browser) > miscellanious > redirectors" then it would show these hidden redirector files that would keep recreating the things i was destroying. i don't know if it has something to do with something like that or not
yah idk i cant find a redirector or anything similar in the world outliner filters
@ornate linden try right click and get parent
doesn't seem to be an option for it in the context menu
@hexed barn what is the issue?
@ornate linden there ahould be. You can also show parent class variables. Basically it doesnt know where the variables are.
It's no longer checked?
yeah
it unchecks itself
hmm. it's inside of a graph. not sure if that matters. I print stringed the type outside the graph and it prints it properly
I would like to not lose any velocity when changing direction, if im going up and push to down I would like to rotate the current velocity to go down and then add the new impulse
Ah so like skating
I though it was about forward vector or since I only use impulse it's not using forward vector
It's also compiling fine the first time, but if i compile again it breaks. I just print stringed the type within the graph right before i try to use it and it both prints fine and also is used correctly. but it won't compile the second time and i have to recheck it to compile and play again
Add the vectors together. Get current velocity and add to it
Hmm. I can't repro that.
@maiden wadi he reparwnted
im gonna try
Cache thinks it has it but on compile cant find it
Oh. I missed where he said that. ๐
@mossy mist Even if there is nothing to draw a nav mesh on. Like Landscape, or StaticMeshes.
I tried that because for some reason it seem logic but it don't work since I didn't add the vectors together, what thing I need to add the vectors together?
I honestly don't know why this is the case, but if i drag a new line off of my event for my class it works, but if i drag a line off the reroute node above it and do the exact same thing it doesn't work (where it unchecks itself after compile).
I don't know what the distinction is, but I guess its working.
and the only thing going on in that graph it would also be going to is getting the class defaults just like i am here
wild
@hexed barn make vector at the end right before impulse. Then add that with current velocity
But that is weird you should keep velocity anyways
Why does your ipulse cancel out current velocity?
it don't but if I do an impulse opposite to the current velocity it reduce the speed
Makes sense to me
well I think either I don't take the good velocity or I failed something in this
Yeah scratch what i said @hexed barn
I thought your regular velocity wasnt maintained
But it is and i am rereading your Q
Absolutely wild. It works when i just get class defaults. but if i create a reroute node on the line at all, not even going anywhere, just create a reroute node, it breaks instantly.
which is a problem i didn't have before giving it a custom base class
well of what I think I just need to double the velocity and add the new vector to it, so 1 velocity cancel the past one and then the other velocity+new vector make the new speed so I don't lose speed
But I can't make it work for some reason
@hexed barn ok i see it you want to maintain momentum even when changing direction. Impossible!!
But you need to basically save the magnitude of your vector, normalize the new one and add magnitudes before multiplying it with new direction
Ok I will try that ^^
Im thinking about it but I don't really see how im suppose to do
@hexed barn you see what i mean? Your vector has a magnitude and direction. Just get the magnitude and then add it to the magitude of the new direction vector
How am I suppose to save the past magnitude?
Get the velocity vector and get mag
Impulse is useless. You have to set vel
Cant say much else not at computer atm
I think I get it
rn it's like before but I replaced impulse which is good because it was too restraining
now I need to save the mag and add it
Yup
Maybe there is a physics theorm or a simple node
Prpbably pythagoras or something
Time to find my old math lessons then ^^
It is most likely pythagoras of x and y velocity componenta
Im just a bit braindead
Nah you are good ^^ im the one asking help ^^
Hello everyone, I have a little question for you and I would be very glad if you could help
I'm using this algorithm for attach sword to my character. But when i press to pickup key, it's not fitting to related socket. Is there anyone among you who has ever experienced and deciphered such a problem before?
The main problem is not location/rotation/scale rule. I have now taken these settings to snap to target. But this time it also looks like this.
I never did but I saw a video talking about that if you want I can send it to you (I have never watched it but It seem to be about the same thing)
So I'm waiting for a link from you ๐
Hey guys, in today's video, I'm going to be showing you how to spawn an actor at a socket location, and you can also attach this actor so that it moves with the socket. Although, that part is optional.
#Ue4 #UnrealEngine4 #Ue4Tutorial
00:00 - Intro
00:16 - Overview
01:0...
I hope it will fix your issue ^^
I'm starting to work on now. Thank you in advance
how to get player controller index
Generally you do not. There's no use for it in Singleplayer or Online gaming code.
@agile edge in a console, controller 1 is player 0 and so on
I found out what the problem is, basicly I was adding the velocity whitout changing it
I maybe shouldn't have use this message to ping you
@agile edge get player controller
This is the inverse unless the idea is to manually check each
Please do not use Controller index IDs.
but how do you get a player ref then ๐ค
why do you need it in the first place ๐ค
@remote meteor shenannigans
im thinking like probably only local multiplayer kinda things will need that information
correct
Controller Index IDs are a terrible system. It doesn't work, and you will make terrible mistakes trying to upkeep any sort of system with it. If you want to compare a player, you should do it via their OnlineSubsystemID, or PlayerState's PlayerName at the least.
this seems to work
local multiplayer UI
oh maybe controller ID is bad
Manage it with the player's AHUD class. Then controllers don't matter. You can get that player's HUD's controller with GetOwningPlayerController.
1v1 fighting game basically that can be played locally or online
if you need somthing like a smashbro character selection screen
yea it's basically smash bro esque
you need to do something more than just that
getting index is for when you have multiple controllers on the same machine. If there is online play, dont do it this way
AHUD should spawn and manage widgets. Widgets can get their own controller if you pass the HUD's owning controller through it.
Get Player Controller ID seems to work locally; I didn't try network yet
you need somthing like these for networked controllers
just.... GetLocalPlayer instead?
what are you trying to do where something else is responsible for your player controllers?
when SideScrollerCharacter gets hit, it updates the health UMG
that function isnt exposed to bp ๐ you can make it yourself tho
as for that
you can use owning player on the widget to do that
just subtract the hp of the pawn normally
but when you spawn hp bar for the players
bind the respective pawn hp change delegate to do widget update
oh okay maybe that makes more sense - SideScollerCharacter can have a health UMG instead of hardcoding health UMG in game mode
if you were talking about character selection screen cursor and such then you might need the controller index thing, else you dont really need it
Is there a way to align a velocity to another vector ( example: if I have a vector that go to the right I align my velocity to this vector so I don't lose speed even if my velocity go to the left)
you get the length of the velocity, then multiply it to the new direction you want to go then override the velocity
btw it seems to work even with network play though your idea does make more sense
I tried and it didn't work, this is how my bp, basicly at the left it's the new vector im applying and I trying to add the velocity in the same direction so it don't slow down
I want to swing the sword according to the mouse's axis changes, just like in the mount and blade bannerlord game. How can I do that?
Im not sure it will work but I think you need to find the mouse position , make it become a variable and then take the mouse position again on another action (example released left clic) add them and transform it to a vector
this is what I did
in top it's when you clic
and at the bottom it's when you release
the multiply and make vector are maybe not the same since for me it's made to get a sort of slingshot effect
but I think it should be the same thing for the rest
Nah you are just lucky im trying to do something that have a similar mechanic ^^
But thanks it's always a pleasure to help ^^
can anyone tell me in which specific cases it is good to use data tables?
eg where audio settings (music, volume, etc) should be saved? since GetGameUserSettings does not include this type of option
i thought about using data table, but i dont know if its a good choice
@rigid fractal datatables are amazing when you have multiple different yet redundant info to use.
For instance 2 enemies. Sure you can hard code their hp and damage. But what if you have 400? Easy in excel. What if your value was too low or high? Very hard to change 400 times.
I perssonally use them for anything data related that isnt on my player character. This includes icons, types, values, etc
not to mention you can drive stats by a formula and by changing the driving values, all health could be adjusted
Right? Amazing stuff
gotta make an alternate enemy? just copy the row and insert new
Exemplary
right
but in that case, what would be the best choice?
are these variables?
anyone know of a good way to code a projectile to have an arc as it reaches its destination?
yep
game instance is a good place to store things you want to keep between maps, but otherwise, you'd want to use save slots to store data to be fetched even after the game closes
perfect then, some video settings i made using GetGameUserSettings because its all there, but no problem, right?
anything and everything you want to store even after the game closes should be in a save slot
good luck
Our project recently starting digging into soft references to lower the number of dependencies. In blueprints how to do you spawn an actor from class using a soft reference?
pretty decent video to help https://vimeo.com/420428343
Quick demonstration video of using Soft Object References and Async Loading to stage out loading and spawning objects in Unreal Engine 4. If you have questionsโฆ
Anybody knows why the progress on this Achievement isn't going up by 1, when I run this code the achievement is completed, not progress added by 1.
progress might well normalised to 1 = 100% so you would could try setting it to .01?
Yeah I did that already, didn't work out. The achievement finished immediately after I won a coin
Hi! Wondering if someone can help me with my spline instance mesh construction script. It is currently making my buildings look like this, when I instead want to be able to alternate between the meshes and have them be at normal size.
export them as png or make your own and have them import to new file
Actors to ignore
Or make the projectiles no longer block the trace channel
Which is camera in this case
For bullets the second one would make more sense ๐
You can also add custom trace channels in project settings
yeah the actors to ignore im already trying, but it looks like its a bit buggy, sometimes I get a message that the hit actor is the bullet
I must do sth wrong
time for more tuts
Well the issue is you would need to add the bullets every time one is spawned
Which is just a bad idea.
Nooo donโt do that
Way better to just change the collision settings for your bullet
You have 2 sections: one for trace and one for objects
So either make a new trace channel to use and set the bullets to ignore that one
Or have them ignore the camera trace channel
I just made a new ,,dash,, channel
Yeah thanks mate that works, thaught actors ignore would behave differently ๐
You only really use it to ignore a special actor or two... most of the time trace ignore is easier ๐
Hey guys I have a question, how can you do a trace that returns multiple collison points? For example, when I do a box trace it returns only one hit result when collided with an object, I want it to tell me each and every point it collided with, like in this picture
You'd probably be better off just using multiple line traces drawn around the radius of your sphere trace. What is this for though?
How would I do that? by doing multiple line traces and offseting each one by a very little amount?
It's for spawning something like a blade that cuts any skeletal mesh in its way
So I need multiple hit points, in order to have multiple bone names and stuff
its not quite what you have drawn, but MultiTraceByChannel (orObject) will let you get all hit results from a trace, but it will be returning a hit success for each different actor not for multiples of the same
Not possible. A trace generates a hit, not a shadowing or whatever you're after here.
Yeah I know, it'll basically penetrate the first object and return a hit result, then a second and then a third until it finds no other objects.
Easiest method is probably going to be to just make a function out of it. ForLoop. Start with 0-7. In each loop, use the iterator to multiply an Angle. Angle can be gotten from 360 / MaxLoopCount. Use that to define a Roll in a make rotator. Use UpVector and rotate it around the Xaxis using the made rotator from the Angle. Multiply that rotated Upvector by the sphere radius. Transform that into the desired trace's local space using it's start location and rotation. And now you have a circular set of line traces.
There would be infinite points in that array anyway. You'll have to do this on your own.
yeah, you'd have to do it in a scan like how these smart people are suggesting because you need to check the hit at multiple points on the same object - sounds complicated
If I have an actor with a few hard pointers and mesh components, like a player character for example, which is always loaded. Will casting to it not have much of an impact on performance because the actor is already loaded? What if 20 actors are casting to it?
Or is that not how it works?
never thought of it that way, as long as the casting isnt constant you're fine though
I'd also be somewhat shocked if there's not some plugin laying around somewhere that offers easy shape cutting of meshes.
i doubt 20 casts even at the same time has much impact
Sorry how do I get the angle you're talking about?
That would depend on the number of pointers in the actor though right? Because it would have to load all of those references. Although this might only start affecting performance when you have hundreds of pointers.
someone else might know how to answer that, but its too abstract for me
it's not that it can't access it
you just don't have something that can cast to it
you should be checking these values
@swift pewter Pointer count doesn't mean anything. Neither does number of casts. It's just about the CDO type that those pointers reference. If the object's CDO is always loaded in your game, having pointers to it or casting to it is not going to affect a single thing besides the CPU cost of BP casting, which is so neglegible that you can do it a hundred thousand times every frame and probably not notice it. The loop literally costs more than the cast by about seven times.
The only thing I'm thinking here is that he would have to loop for multiple points inside the circle as well ๐ค
with different radius to get all the hits
Ah alright, got it. Are there any resources that helped you understand this type of stuff?
Way too much time on my hands. ๐ A lot of it was taking vague articles about it and then following source code to see how soft pointers handle. Also having to work with UMG and understand how garbage collection works is crucial. When you create literal millions of buff widgets and crash the game, ya done. ๐
Also on that note, there's a max UObject limit in the engine. I don't remember what it was offhand, but I've broken it.
Literally millions though.
I'm trying to rotate my camera back to the default position after the player moved it (like in GTA). Thought I'd first try out if I could set a timer to modify the rotation, but already ran into an issue here as this wont work:
It also gives this warning:
I assume this might be related to the parent begin play? But overall I'm not sure how to approach this task the best way ๐ค
@normal adder You're just missing an Event. Need to call the red BeginPlay as well.
Oh lol, I assumed since this is a child the "Parent begin play" replaces the red one. Thanks!
If you're used to other coding. That's Blueprint's way of calling Super. Basically it just calls the parent class' beginplay.
because the input is not always a player
Great info, cheers
Masada try using an isValid node on the pawn reference
If the pawn is valid, it is a correct reference to a player.
Sometimes better than just using cast failed branches
not quite true
a playercharacter is always a pawn, a pawn wouldn't always be a playercharacter
True, but this way you are verifying first of all if it is indeed an actual player
Itโs like debugging
Right now you need to figure out what is being casted in there, why it is failing etc
And is valid is a good way to check that, as well as branching off of the casts success output nodes like you said
could just instead print hte class ๐
Ig, but then for beginners thatโs complicated
Iโll stay out of it tho because you sound quite experienced.
Foxxxy makes a valid point, when it's false print the name or class of the actor
just to see where these incorrect references are coming from
I have this issue, where this node returns false always,
When I tried the under cursor by channel version everything worked just fine. Also i set use mouse for touch in project settings when using the under finger version.
I have a vague memory that this only works while finger is down. If you're doing this on a Released style event, it won't find anything.
thanks, ill try that in a moment
Is there a way to line trace from object that is being overlapped by something and have that trace to test what is the distance to the first point outside the overlap?
is it possible to load 120 streaming levels at the same time trough sequence? ๐
or 100% crash
sure why not
I think you could even use the collision boundaries
what do you mean by one after another? loading the next once the completed of the first is done?
or sequence?
yea completed> completed> ..
but wouldn't you already know the closest direction since that's from where you originally started overlapping
what kind of crash was that?
I have a vector calculated for the direction using something else, so along this vector i need to find first non-overlapping point, before the vector sends the actor moving. actor itself will return end overlap, i just need to get this info before it actually happens cause i need to set a time based on the distance
okay so how I would go about this, is actually start your trace with a good distance in the direction
and then trace back towards the origin
like this if that makes sense
if that would instantly give you a hit, you would just need to increase that distance
so you would start the trace even further
I get the "Initial over lap" from that trace to see when it hits? or does overlap also count as "hit actor"
it should give you a hit actor
alright thanks, I'll try to work it out this way
Resetting the camera back to default instantly I got to work now, so next I'm trying to rotate it back smoothly. Using Rinterp like in the picture seems to only do 1 step (so to speak) and then stop though. Is there another method to do this or am I just doing this one wrong? Basically trying to have the camera swing back behind the car in a smooth motion after the player moved it around with the right stick
it works over time yes
Got it to work, thank you so much
and line tracing this actually helped me found some mistakes on the original logic, so win win
nice! good job
I got something weird happening, for some reason one of my functions returns the same value every time. I checked the values with the debugger before they exit the function but I still get the same result. Is this an unreal bug or am I just being an idiot
its returning a struct
show code
Is there a fire-and-forget alternative that could be used in this case or would you say this should be done entirely differently?
Hi, is it somehow possible to change the center X and Y values of touch interface using blueprints?
I would like to set those values at beginplay (or later), is it even possible?
a timeline is the fire and forget alternative
if the node exists?
i need to sleep, thats what the problem was
Hey all. Little help?
I'm having a hell of a time trying to figure out how to implement a blueprint (BP_DisplayCase) which displays multiple instances of another blueprint (BP_Items) and lets you use the editor's details pane to set the settings on each of the items before runtime. I use an ENUM to select which variant of the item to spawn in each display location (the ENUM is used as the key for a data table which serves the correct variant's soft static mesh reference for async loading at runtime) and also want to edit other variables like each item's float and rotation speed. So kind of data-centric procedural generation where all the variables are defined and stored before runtime, but then the values of all of these variables are used at runtime. I want it to be streamable and performant.
show code
sleep ๐ค
What works is that the construction script for BP_DisplayCase generates an array of BP_Items, an array of their transforms and the BP correctly spawns the Items at runtime. Or, rather, the BP_Items are added as Child Actor Components to the BP_DisplayCase instance at runtime. I can see the variables all sitting there in the details pane of BP_DisplayCase. But I can't edit them.