#blueprint
402296 messages · Page 765 of 403
Thank you both!
@odd ember@native willow On a side note, since you guys were mentioning engine wide FNames. Cause I haven't praised GameplayTags enough today... If use a meta specifier, or set the value of the Categories for the property to a tag base, only that tag line will show up in the tag selection.
that's what I was saying. it's functionality that engine side would have been great to have, especially for tools in engine as well
what kind of variable is regen timer ?
it's something related with time but idk what
its a timer handle, you can make it easily by dragging off from the "return value" pin on the timer node, then choose make variable
ohhhk so i know this may go in another channel but the fireparticles i am trying to work with (which are awesome) are only cascade...
which are not rtx supported for reflections...
any suggestions for some good and/or free fire effects that are dx12?
#graphics
Though I assume material for particles were RHI agnostic 🤔
#visual-fx also
thank you may i cross post?
probably delete whats here if you do
was this the right channel to come to for cvar questions?
Depends on the cvar context, but generally it's #ue4-general
ahh lol ok thank you for answering mine here earlier!
ima get back to it
il report if i found a fix for my fire
I never do anything with RTX, so I have no idea about it.
Random question.... UE4 first person template, the player character has a "Mesh2P" component... anyone know why its called that? e.g whats the "2P" bit about?
hello everyone i am generally new to unreal, i need help with a problem about spawned enemy collision
its' not first person nor third person its...
sounds like a bp problem, you're in the right place
So the "inherited" mesh is the first person?
hahaha, that is a good question, is there anything hooked up to it?
its just the default template example... but that Mesh2P thing has been bugging me on this project for about 7 weeks now! 😄 I know I can rename it, but I wanted to know what it has 2P on it...
surely cant be "second person"... wouldn't make a lot of sense..
cool, the problem is that the all the actors from the pawn class that my enemy spawner makes all clip through each other, even though in the pawn bp the capsule collision is set to block everything
i dont use that template, if at all, so i dunno much about it
No worries... 🙂
you're spawning a bunch of pawns but they overlap? check out the spawn actor node settings, i think one is "try to spawn and adjust position" otherwise you need to program that logic in as Spawn Actor simply does just that
yes i have it as adjust location but always spawn, the problem is that when they start to follow me (via ai moveto) they start to clip through each other
like so
that doesn't seem right...
by default the standard characters don't clip into eachother when using them as AI
you must have changed something that broke it 🤔
it was always like that
what is the marketplace thing that lets you bend the execute lines at 90 degree angles and such instead of smooth curves called?
just bought it, thanks
you did what...
ok
you are aware of what is happening, in the capitalistic world we live in, this week?
The same thing that happened last week? 😄
Vaguely curious now.
seems just fine to me
using the base character blueprint
heres the bp for the pawn
Oh, Black Friday.
let me once riddle authaer 😛
I'd have never gotten that. 😄 I'm stingy, and sales just means that shit wasn't worth it in the first place most times.
hmm well the only thing that could be wrong would be the collision here...
since they do move
its a pawn class not character btw
right, then I would check what differences you have with the standard character
I would recommend turning off can character step up on
but that shouldn't make a difference for this case
the default character just uses pawn collision preset... 🤔
really weird that yours isn't working
im not using default character, im using pawn with just the mesh and anims of the default character
i think its better if i show you on vc
Does anyone know why Splines dont properly scale static meshes the same way?
is it just me or do the remove axis and action mapping node act really weird? I've had a bunch of bugs with them and had to really mess around with it to get custom keybinds not to be bugged
Im trying to figure out how to get a Static Mesh Ive scaled down in the level to be the same size in a spline, but its not working.
nvm i cant stream on the channels
lol didn't know
probably not enough vertices
my pawns are also working fine btw, with any movement component really
so it might be the way you move your pawns?
i dont know, i just use ai moveto and rotation
could i send you the files so you can test them?
well when you are using a pawn
you will have to implement your own movement / use one of unreal built-in movement components
is there a reason why you're not using a character?
animations wouldnt flush well with the movement, and the actors wouldnt move at all
so i use pawn and movement is floatingpawnmovement
that would also work yes, but keep in mind it doesn't implement gravity
then it should be all fine
I did what you said
and added this
so that I an set a mana value to be used for each diferent spell, and if the amount of current mana + the min mana needed or that spell it gets the animation
the math kinda looks like its gaining rather than being spent, also all timers have a time of 0 and are not set to loop
also, clamp your spend function
so it can't go below 0
this should be after
unless you have some at runtime draining besides this
I have a question about set time by event
the time that I set would make it so that x amount of mana is spent for every y seocnds that I put in ?
so if I want one spell to continue spening while pressing I set it to loop, and if I want it to only when pessing a key I leave it ?
because I have that doubt about what it would do
to clarify, when you call the Timer it will wait for X Time and then execute the connected event
so it does the same as a delay ?
the loop check box will repeat the Timer function until it is stopped
yes, to understand it that way, it's like a delay but with better control. In general delays are bad to use as they cause other problems.
I see
since it outputs its timer handle, you can do things like check its curent time or see if it has expired already for different reasons
Honestly, this is a very complicated topic. Personally I feel handling gameplay attributes is a massive undertaking once you start going past health/stamina/mana.
I understand that it's setup feels bulkier, but its good to use them over a delay when and where possible
ok so I still need to work on that part a little .... I'm thinking how a spend function would be created
is there a way for getdistanceto to affect a different actor of the same bp?
last time I had done this
@round shale What do you mean by different actor in the same bp?
i want to check the distance between two spawned actors, both of which use the same pawn bp
Where ever you need that distance needs a reference to both of them.
not to add too much to the fray, but you should get one of these working before assuming they will all work and duplicate them
is there a way to get a reference to it if it isnt spawned yet?
both of them need to be known somehow
doesn't matter how
there are good ways of doing it and there are terrible ways of doing it
if it isn't spawned yet, no
it has to be in world
but you can consider the spawnpoint
i want to check the distance between the object and a spawned copy of itself is what im trying to say
the object doesn't exist in world?
trying this didnt work
what are you trying to do
describe in concrete terms, what kind of thing you are expecting
not technically what you are trying to do
the enemies that i am spawning, when moving towards me are ignoring collisions with each other, so im trying to make it that they dont get near each other to begin with
they shouldn't be ignoring collisions
see my previous messages to see pics and such
which is?
them not colliding with each other
i have the collision component to BlockAll
what is the name of the collision component?
Capsule
I haven't seen your logic, but that needs to work
regardless of anything else
and what you're trying to implement is like a primitive RVO avoidance system
I changed it to this
?
does having two events , each linked to a cast to character cause recurency ?
I have no idea what recurency is
... that thing where it is calling to the same thing at the same time
recursion?
hi, I am very new to UE, I come from a Unity background, I the vr template in UE5 setup, and I want custom hands, I have a model, and a action sequence that makes the hand turn into a fist, how do I trigger that action sequence on grab? I have a function that gets called on grab button, I just dont know how to call the animation switch.
recursion is a thing calling itself. and it is a desirable state. it's not something that happens by accident
unless you do infinite loops
I would ask there
ok
I have to delive this poject in less than 3 hours and I don't think i can make it work
F
huh ... mostly making it so that when he steps into the pool it triggers the recharge mana
I was going to make it so that it alls a function from character on pool
but am too confused now
like before it that part worked, the problem was making it stop when it leaves the pool
now that is what is missing
beause I ccan't diretally turn this into a separate function
Does anyone know why I cant use multiple media players in one level?
that sounds... like it works like it should? when leaving the pool it stops?
1 media player works just grand. But even if I copy and paste it, it doesnt work.
never used media players
I'm sure the part that is shown woks, but currently there is no way to make it only charge whle in pool
there is
where is your pool blueprint
@mystic mistWhat do you mean by multiple media players?
currently I have this on pool
on exit, use the StopRegenTimer event
and that should be it
@maiden wadi so I have a video media player. It plays when I click on it (blueprint). When I duplicate the blueprint, that one wont work. Only the original works.
ah, you should also you equivalent events
you have actor end overlap and box end overlap
use box for both
yes, it would if I had what I have on the character event inside the recharge mana function
can't find end box ovelap
right click on box > events > on component end overlap
I can call that but can't all the stat regain
currently the restore mana function being called does nothing beause it is empty
just call the StartTheRegenTimer event from the overlap
and StopTimer on end overlap
Oh. I think I see what you mean. I don't know if it works if you make another media asset in the content browser.
to call start regen timer in the pool don't I need to have it like this on the character ?
because I don't seem to be able to call it while only having it as a custom event
you can call it from the cast node
if that will work, now I just need to make it so that the spend mana works as well
like so ?
yeah see if that doesn't work
can't because I haven't set a proper spend mana system and what is done or the recharging checks mana levels
it works
but I don't think I can use the set timer by event because I doesn't let my animation finish
well, this was originally proposed to regain lost mana in a pool, not for casting magic which uses mana
for that, it would be less complicated, simply call the spell and subtract the spell cost from the mana
alight
a way to set a mana spent would be this
?
but with a current mana - spell cost ?
so to understand, this spell flamethrower is where the player holds down the cast input?
yes
and I need to set up a spell cost variable, and then check if current mana - spell cost is not < than 0, if it checks true, then it proceeds to spend the mana and leads to the animation ?
to be frank, a held down action is harder than a one shot
the logic is close, but for me, the unknown is the animation
it is what I was asked to do but tbh If i can get the rest of the mana system to work I don't ae about that pat
well, if i might suggest, why dont we get a one shot spell working so that your mana regen system can be tested
sure thing, I have one on the side of it
and btw, if you set the player's mana to a value that isn't max, you can test the regen system regardless
so for the one shot, again simply put, when the Input event fires, you call the spell function and do the math to spend the mana, no timer needed
currently it starts doing the rehage animation when it entes so I think I need to add the check mana here beause now it just starts regen time one it enters
damn my keyboard isn't woking well
too much coding 😛
from what i gather, it sounds like there is some trouble with the bp logic added to managing animation calls
not complete yet, but it is looking better
how do I set up end mana use so that it actually stops me from using it when no mana ?
look, heres the bp code, how do i find/implement what you were talking about?
why are you setting physics enabled as a node?
clear and invalidate timer by handle
try ticking stop on overlap
doesnt do anything
even tough there is no timer ?
my bad I thought it was the issue from before
can you as a player move through the enemy?
no, that part works
so this might be an RVO issue then. go into each actor, in the details panel, there should be a section about navigation
in that, set the enemy actor to be Dynamic Obstacle
go into your project settings > navigation > set your navmesh to be dynamic
what do you need stop when you have no mana?
nvm .. thank you all for the extraordinary help today
i cant seem to find that particular setting, even with searching it
Navigation Mesh > Runtime Generation > Dynamic
thank you
somehow that explains a lot
any reason it's not a character?
im more familiar with it, and when i tried the same code with the character class it showed a bunch of errors with the animation and wouldnt move at all, even with no animations
then I'd suggest you try again, as this is one of the few options available for RVO. if it doesn't work otherwise, that is
do you know how to make the character pawnsensing visible in the editor viewport?
idk its the one im learning rn in school
Hey does anyone know why I'm getting the error " cannot force a cast between non-numeric types" when I convert my vec4 node into a parameter?
is there a way how can i create variable that can be used in all blueprints?
looks like this is for #graphics
just to be clear: what do you mean? global access?
yes, something like global variable
put it in the game mode, or in game instance
actually game instance I think is more correct as game mode might flush between levels
and how do i access it from different blueprints?
GetGameInstance() > CastTo<YourSpecificGameInstance>() > GetVariable()
ok i will try it, thanks
tried it in a character class, doesnt move at all
what doesn't?
the actors
you copied all your logic over?
yes
did you assign an AI controller and made it possess the character?
I think you can do that per automata in the default settings
yes, just the standard aicontroller
debug it with breakpoints
AIMoveTo also offers an enum you can print on to figure out what's going on
got the movement to work, but animations still arent executing
under Animation you need to set the Animation Instance
hey guys quick question. i have a projectile firing and i want it to collide with my enemies. The enemies collision settings are set to block all and yet they go through.
I have it set up so the projectile cannot go through walls due to them not having the "enemy" tag (which works) but that also doesnt work on the enemy. can post images if needed
What are the projectiles collision
they are set to block all except it is set to overlap pawn (it was getting blocked by my character) could this be why the enemy isnt blocking it?
Well is the enemy a pawn
created it as a character so yeah.
is there a way to destroy the projectile when it overlaps with the enemy? would it be begin overlap
Begin overlap
Then pull the overlapped actor into cast to
If the cast fails do nothing
But if the cast works then cast it too the hit actor. With that actor being "Enemy"
ah i got it to work.
i have it set up so if it has the tag enemy then the projectile gets destroyed. i originally set it up so if it didnt have the enemy tag it was destroyed. i.e when it hit walls etc, but that also means my character so i think if i give it its own tag to ignore the projectile it will be perfect. thanks for your help
am i going something wrong here? should those branches be laid out like that? Because at the moment, the projectile doesnt get destroyed when it hits anything with out the "player" tag..
You didn't connect to target pin
I would not use ActorBeginOverlap
And it looks like you wanna destroy any but the player so one branch will do
it's another newbie trap 😔
yeah the issue i was having was if it had the tag enemy it would do something different than destroy actor like play a sound or whatever. how would i set that up but also keeping the "destroy actor if not player"
You would need 2 branches for 3 cases.
its odd, it get destroyed when it hits walls etc but not when it hits the enemy i have in the level.
which doesnt have the player tag 🙂
the only thing that doesn't get destroyed, according to your logic, is the player
or rather, whatever has the player tag
yeah i have it set up so if the projectile hits something which doesnt have the tag "player" then it gets destroyed. i have dropped any enemy into the level with a collision box etc and it just goes right through them
if they don't collide in the first place because of collision settings, that'll be why
.
.
it is currently set to event hit
none of that matters if the collision settings are wrong
within the collision settings it is set to block the projectile
if you read what I wrote consider using a collision component that is set up custom for this
yes but you're using OnActorBeginOverlap
hit and overlap are two different things
no now im not, its event hit. i changed it 🙂
cool, so ensure that your collision settings are both setup correctly
on the projectile and on the actor
they have to match their channels
collision is a two way treet
okay i will check
both collisions have to work for it to function
okay so i had it set to overlap pawn on the projectile mesh and now i have set that to block (as needed) and now it clips into my character. i was hoping the branches i did earlier fixed that
have you set it to Generate Hit Events
i had that turned off but now its on and nothing changed... i feel like im missing something simple ha
well if it goes through with that, your collision settings aren't properly setup
oh i found it
in the collision settings the projectile object type was set as worldstatic instead of projectile
slaps forhead
so now it gets destroyed when it hits anything which isnt the player including the enemy. phew
thankyou for your help
Hey so I saw a video of this blueprint someone has, you can slap down the blueprint which is a cube, and it has this diamond you can select when the blueprint is highlighted
and if you move it, it sizes the cube to that point
what is that?
a socket
Is that all? I wasnt aware you could manipulate sockets like that from outside a blueprint
Why thank you good sir!
No, its not
Its an exposed vector variable with show 3d widget enabled
socket has the same diamond
so eh
and an "exposed vector variable" sounds a lot like a socket
although I think sockets use transforms since they likely have to carry direction too
Its on screen
its literally a vector variable
You just click the little eye to expose it to the details panel when you click the blueprint in editor
and if you set its own settings to have that 3d widget, you can set it manually with that transform
which is pretty fucking ninja
Why TF does the stock projectile movement even use a collider. Causes so many problems to new ppl.
Agreeeeeed
calculate projectile collision I think its called
so apologies if it sounds unsurprising
what else do you want
Can we talk about on tick
as a default node
I see established users running tutorials using on tick
Bro you really gonna attach game logic to frame rate?
And make it a default node
And THEN
IN YOUR LIVESTREAMS
SAY IT SHOULD NEVER BE USED
Fucking epic, man
Yes I've found the stock projectile component to be ass compared to just doing line traces per frame instead of sweeping a collider per frame. You'd avoid the dumb stuff like projectiles hitting each other or stopping movement.
Is there a decent way to support multiple game modes in a map without needing duplicates of the map?
@barren flower tick is great and necessary
When you need stuff to happen PER FRAME.
Anything smooth is happening on tick.
UE4's logic is frame bound anyway
Any continuous thing evolving over time
even timers and delays only update per frame
but tick running rampant and being on from the get go I don't think is right
Once you know what you're doing it's just intuitive what belongs on tick or a tick like function and what doesn't.
yeah but once you know what you're doing you're not a newbie
Please give me a counterexample. Tell me something that would update smoothly over time that would not use tick.
Just have the game logic run at the rate you want, and draw it when a new frame comes up
Litterally run bullet logic at 10,000 frames a second
Dude, 140fps is glacially slow
technically timers don't run per tick as they accrue updates that get released on the next tick
There is no reason, ever, to use on tick
Sure let's re-engineer the entire engine. You need it to at least run at framerate unless you like aliasing and stuttering. So you're back to single variable tick with extra steps.
Do not tie a CPU to a graphics card bus, its actually retarded
Why are you getting stuttering?
What are you doing on the cpu that cannot compete with frame rate?
technically he's right on this one: you can make multiple computations between each tick on e.g. a timer and then release them on the next tick
What, you can draw when you want with on tick, but it cant run at speed without it?
gunna go ahead and throw this idea out there, for short tasks that would otherwise operate with tick, you can use a frame-dependent timer
Bro you can update the position of a bullet litterally hundreds of thousands of times in between frames
The very idea it wouldnt be ready with a new frame draw is a non starter from the beggining
and you are actually DELAYING logic taking place for a poor framerate? Please. Just no, not ever
If game state never gets rendered, does it ever exist? Short of physics there's no real need to update above framerate, and updating below framerate requires interpolation. What's the fucking point then?
well no timer is frame dependent, as we've established. the calculations happen between ticks, but they only update together once they sync with tick
I mean, the underlying simulation still needs to be accurate. It 100% exists
how can I open a level with seamless travel in blueprints
seamless travel requires cpp currently
If you can't make a 60hz bullet and 1000hz bullet move exactly the same then you need to learn more numeric methods.
but you can mimic it with streaming volumes perhaps
But its literally the one thing you dont control. You have no idea whats going on in my pc. Hit some thermal throttling, open some machine learning software. You have NO IDEA what my framerate will be. I could be running at 5fps for minutes, or a billion in the year 2072. You have no idea
The sim should run at the rate the sim runs, the frames should come as they come
thats how computers work
these are seperate hardware
well you usually put a max limit on frames
you are ductaping together with a single node
for the game
You dont know that
I disable that shit for some VR games I play made in the 90's
and some of the logic breaks in them
if you're making the game
ever see mechs fly into the sky, try running mechwarrior 3 an 144
you decide whether or not that is exposed to the player
you guys can argue in another general channel, this is little to do with blueprints.
they never thought that would happen
I certainly wouldn't expose it
could I make a c++ class with a void for seamless travelling and call it from blueprints?
yeah so on the gamemode there's something get seamlesstravel actor list or some such, I think you can expose that function from cpp
The new holographic displays on the starships when we are all 1000 years old after aging was cured. You have no idea. Its the one thing you dont control as a game dev. Use timers, ontick is fundamentally, at a computer science level hardware bus, flawed idea
You have games flopping from this. Fallout76, game logic tied to frame rate. Dead game
You can patch things, and even if you control max frames, you do not control minimum
true, but it's one less case
Hell, what happens if I unplug my monitor?
Your game just crashes?
Or i fly into the moon
and no limit for max frames is much more dangerous than low frame rates
your monitor doesn't control the internal frames of the game
Epic formally reccomends its never been used. And with that im done. If you cant see the problems you shouldt be in this industry, its that simple.
you're conflating two different things
stop responding to him
would I be able to use a blueprint gamemode class that I've been using? or do I need to make a new one in c++?
you might need to make one in cpp, but you can just inherit your BP one from the one you make in cpp
I have that for a few classes where I got a cpp version and a BP version
if not else, BP version carries default values
for stuff that can't easily be set in cpp
(hi curves)
I'm looking at a video right now and this guy is using execute console command "servertravel levelname" this won't work?
pardon me if it's a dumb question
who knows, it might? server travel is technically a console command. but you still want to know which actors are persisting across server travel, otherwise everything is getting flushed
well
im actually doing it before any player connects
it's to switch levels when the server starts
Open Level not good enough?
I'm not sure exactly. I'm using AWS gamelift with a plugin, it could be an issue related to that
seamless travel is usually only for when you want things to persist
but who knows, maybe there's some hidden multiplayer use for it as well. I haven't looked into it that much
i'm having an issue where the way I setup opening a new level, could end up initializing with the gamelift service twice and I thinking this is causing other issues potentially, so I'm trying to find a method to open levels when the server starts where it doesn't do the intializing twice
and so if it persists with seamless travel that should fix it
it could be that seamless travel is also used to persist players so they don't disconnect
according to the docs, thats the definition of seamless travel - ie seamless for the player
you'll have to find out what that gamelift service adds and persist it manually though I'd imagine
im not sure really trying to figure it out
@odd ember i made it work! 😁
Can I use SpawnActorDeffered in a blueprint?
Source material is blank maybe
i dont see a source material.... select asset?
That's what I meant if it wasn't clear
ive tried that but it didnt do anything
🤦 you did say this
i chose M_Male_Body
ah, you've not applied this material to the player; the DMI is made, but not assigned - i would also not do this everytime it is called, but once at begin play
Could probably even get the reference in the construction script really
is it just me or is adding and removing axis/action mapping really screwy? it seems so buggy like it's not removing the keybinds sometimes and not adding the newly set ones
iirc changes to an input (the input event) do not update
Can you explain a bit more?
so like the nodes in my playercontroller class for action events, those don't get updated when I do add/remove axis/action mappings?
no i dont believe so, if you have "MyAction" and rename that input to "MyBetterAction" it will not update the nodes where "MyAction" is used, but someone correct me if im wrong
they're using the same name
hmm?
i'm not renaming the actions
two inputs with the same name?
you're saying if I rename the bindings
I'm not renaming them i'm using the same name
i misunderstand, this is about the bindings themselves?
it seems to me when I go to remove bindings, then readd them with different keys, they seem to be buggy like not removing all of them, and not adding some of the new ones
so players could rebind a key
but then the old key is still bound
for example
uhh, you ahve functionality to change a keybinding within game and that's the screwy?
it's blueprint nodes
then you are correct and that, as far as i've tried, is annoying to test
i think best result is to build and test
allowing player rebinds was not fun when i tried it
i think cpp allows for a smoother workflow
i mean idc about workflow i just want to know why they don't seem to work consistently
i think its because its the editor keybinds vs game keybinds
Guys,I'm working on a roll system that like DarkSouls, but I'm getting sidetracked by the directions, how can I get my character to roll in the right direction inputed?
how can I go between values 0 and 1 (as a float) smoothly?
using it for the alpha to go back and forth between colors
@supple bane if it's just a discrete thing that begins and ends, right click on your graph and Add Timeline
I want it to go back and forth
so once it hits 1, start going back to 0
and vise-versa
Forever? Maybe a sinewave on tick, though you can also make this happen directly in the material graph too.
Would I be interrupting if I asked for help?
go ahead
Something like time —> sine —> + 1 ÷ 2
this isnt for a material, its for a particle effect
... will give you an up & down wave every second
sine?
Sooo, I'm making a collectathon game and I want to make it where when you collect a collectable it will no longer be in that level once you leave and come back, or quit the game and open it back up while it loads some save data that's updated when you collect a collectable. How would I go about doing this?
and how do I access time?
@supple bane get world seconds
I found a picture of what I kind of want to do, but Im not too sure how to access someone these things
Plug that into sin and ostensibly that'll produce a float that goes from -1 to +1
got it
Then you need to add 1 and divide by 2 to get it from 0 to 1
Can also be done in Niagara directly too. Dunno about cascade
what is the difference between degrees and radian?
Now I remember why I hate doing sine waves in BP lol
Degrees want a 0 to 360 value and radians are something weird.
Whereas the sine functions in Niagara and Material expect 0 to 1 which is handy for 1-second oscillations
I am using niagara
In Niagara, time would be non-normalized particle age or system age or w/e
I forget what the sine wave module looks like in Niagara. I think it had more options
If worse comes to worst, use degrees and multiply time by 360 lol
so how would I just use this way? how do they get time?
That's the material node graph. There's a time node which outputs the current time as total seconds (float). The problem with the example in the screenshot is the sine will produce a -1 to +1 value without scaling, and plugged into a lerp, it'll do negative interpolation which means weird stuff happens
alright
Replying to this just so people see this
@velvet dagger you're pretty much looking at making a custom save game object that saves the names of the collected items into an array per level, and upon load, some way for each item to know if its name is recorded in the save (upon which it'll suicide). I never built such a system so idk what's the best approach. I suppose the simplest approach is for each item to load the save individually. If there are performance implications to loading the save dozens of times at once (again, idk) you need to do it in some manager class that loads the save, gets all actors of class, and reverse-loops through the array, destroying upon match.
I appreciate your response so much :)
Didn't know what to search up
I'll look into this!
Yeah, look up Save Games. UE4 has a readymade system for writing data into files on disk.
Its basically a struct. People have made much fancier savegame systems in the marketplace but I couldn't say anything about them personally
For a collectathon it should be very simple
Edited; noticed i didnt read your entire post where you pointed this out. Sry about that
Not sure what issues loading hundreds of times would arise , if any
In video voted for by my Patrons and YouTube Members we go through the process of saving the state of a level and player data between level changes. This is intended to show you the thinking behind how to accomplish this, along with a working example.
Support me on Patreon and get access to videos early, join our developer community on Discord,...
any1 knows how to prevent camera from moving inside char. Right now when i punch my camera just goes inside char for some reason
How do you set it up?
i got it working
tysm
right now i have a camera on a empty object. Camera is always postioned between my char and enemy char. If i move too close to enemy camera kinda goes inside
Did you clamp the distance?
ya
How does it clip then 🤔
i have clamped arm length
but where does the actual arm pos go?
Increase the min value of the clamp
Can you make a short video of what happens?
That’s confusing hahaha
Yeah has nothing to do with the clamp as it doesn’t move closer
It makes a sudden jump
Try turning off the collision test on the spring arm
Yeah I think your characters are in the way of the spring arm
So you should either move it back a bit to avoid them colliding
Or you remove collision from the characters with camera
That way you can still keep the general camera collision on
chaning probe channel to visibilty seems to fix it. Thanks
Might be a better idea to remove characters from camera channel tho
So it doesn’t get too confusing what channel the camera is on later 🙂
k
Hey guys, for some reason my brain isn't working here. How do I connect the get each materials loop to the set material. I tried index and it didn't do anything.
That should work afaik
Altho a for each loop might be a bit overkill
Are you sure the rest of your code works?
Ah the issue was something I didn't think about. The material doesn't have time to load in properly. Looks like I need to preload it.
After hitting 0 hp I should "Dissolve" but it goes to this. Which either means it isn't loaded yet or at all.
Hmm okay I added an Async Load Asset for the mat and still getting checkerboard which means the dynamic instance I am creating is not working for some reason.
Try creating both your materials as dynamic instances in the construction script
I did that here but it apparently isn't working. Not sure why, it seems pretty simple.
Is that in the construction script?
BeginPlay will be called when launching the game, construction is called before
No it is after I take lethal damage. Should it be done in construction?
Yes since you don’t have anything else with that material
That should make sure it’s loaded in etc
Then you can just change it whenever you need it
Okay, so just slap it in like this?
Okay slapping it in like that didn't fix the issue :/
🤔
The only time I had that checker was an issue with my material
It must be failing to load in properly somehow...
Mat works fine in preview (Dissolves correctly as I increase the fade param)
I am
Then I’m unsure what the issue is atm, sorry 😔
Actually I take that back, when I create the dynamic instance I am using the Base Mat. It doesn't give me an option to use the MI if that is what you mean.
Oh shit, I just remember about Async Load Asset.
Guess it's time to improve my ability system.
So I changed the mat to another one and it is also checkered, which means for some reason this create dynamic mat inst node isn't working or something
Maybe this is the part not working?
Here's my working setup, same situation: need array for multiple mat slots on character
Thanks I will try that out.
Is there anyway to pass a variable in set timer by function
Wait I am confused. Where do I actually change to the material that I want to change to? This just seems to be making a dynamic mat out of the already used materials right?
Can you get a variable in the Event itself?
what do you mean??
My bad, I misread the function part.
hmmm... if you only need one of these running at a time max you could just have them read from a value in the same bp
or if you need more I suppose the timer handle could serve a as a key in a map or something
@visual vigil No, you have to save the data into variables for later retrieval AFAIK. Set Timer By doesn't support functions/events that have data inputs or outputs.
And I think setting a new timer on the same function/event overwrites the old timer so in the scenario where you need to have multiple parallel timers... Idk what you'd do short of making your own custom timer system
C++ 👀
Yeah multiple delays, timers, etc., becomes a bit messy... Easier to manage in C++
You can alternatively create an object which handles the timer related logic and you can also have it carry the data for it
Definitely hard to manage and becomes a cobweb real quick in BPs
so when you want to kick off a timer you spawn that object, stick the data into it, and call a method on it and so on
you can then easily have as many of these as you want
I am using timers to handle melee collision trace. starting timer when attack starts and ending it when attack ends
I would just do that with a simple boolean
and while bool is true just trace every tick
you could even drive changing the tick boolean from a track on the attack montage
Hi there!
I'm making a keyboard with a key blueprint. There are many different meshes inside the key blueprint, depending on the selected keyboard, and the position of the key on the keyboard.
all the different meshes for different keytypes are defined inside this key. I'm having trouble dynamically switching them though, the visibility, collision, material properties etc are annoying to turn on/off when switching the keytype. would you recommend keeping it like this, or making 10 or so "subclasses" of the main key blueprint? the only difference between them would be their meshes i think, but it would solve the issue of toggling visibility / collision if i can just destroy and replace them instead
your thoughts? 😄
Could be improved with procedurally creating the static mesh component.
oh! yeh that seems obvious now 😄
and you could store each layout type inside a parent
which would give duplicates and more memory usage, but easier to manage
yeh i've been flipping back n forth between hardcoding layouts and my super flexible / confusing programmatic version
for sure don't need to hardcode it
usually you first make things from scratch to get the idea
and then translate that into procedural generation
makes it way easier to iterate upon at a later stage
i jumped straight to procedural 😄 im building a sandbox where you can customise the layout so it seemed only sensible way
some of the static meshes have weird offsets / scale - if i was creating / destroying them, where would i save the transform data? just in a map structure in the key maybe?
if it doesn't change at runtime, just fix the mesh 😂
if changes at runtime, hierarchy based
so if key would be destroyed/created with different transforms every time it wouldn't be able to store the data on itself
so you would have to move up to it's parent
and store it somewhere in that
nice nice makes sense
i have another related question - id like to "morph" the board between this 1:1 grid to a "natural" keyboard layout ( skewed keyshapes in offset uneven rows )
how would you approach that procedurally? or would you hardcode all the transforms?
🤔 that is a good question
hmm actually looking at it.. its pretty uniform
I'm sure there's a certain way you can generate it procedurally
each row is just offset a bit
yeah except the bottom one
which i conveniently skipped 😄
thanks eezeh and hoodieguy , you saved me much time 😄
hey guys. i have problem with (add force) it is working good when i hit enemy ai it goes knockback but working good with 60 fps if i set it to 30 fps or less the force go very far like x20 knockback with less than 30 fps anyone know how to solve this pls?
Typical of using Add Force outside of Event Tick
AddForce seems a little odd for this. Is this a character AI? If so you should probably be using LaunchCharacter, otherwise something like AddImpulse.
At least that's how I interpret knockback. One hit, send them flying. AddForce is meant to be more consistent, like constant gravity.
I recommend Add Impulse. LaunchCharacter changes the movement mode so it may alter the animation (e.g. the standard mannequin shifts to a jumping animation)
thank you guys ! i tried LaunchCharacter it is working well 😁
is there a way to know which bone got hit, when using on component hit for a ragdoll mesh?
my ragdolls break into parts and i want to add impact sound effects when they hit the floor
Does anyone know how you'd handle switching from a menu/character select area to 3rd person gameplay when you are not changing persistent levels (so I can't swap gamemodes)
@burnt barnThe HitResults struct should have a HitBoneName in it.
that returns the bone of the other object (the floor), i'm looking for the hit bone on the ragdoll
Check if it's an inherited variable
Its not a child its a standalone pawn
I deleted the variable
The deleted the struct it was refrencing
And now its stuck with that
You're welcome
Maybe I'm missing something, but how do you go to the full BP view, for Blueprints you saved without logic? Believe it gets detected as a data only BP, but the UI just opens up to a blank editor with no obvious options to revert that.
any practical advice on destroying->creating static meshes? I'm trying but it seems a bit messy
im thinking something like this could work but practically deleting the previous mesh and then adding a new one im not sure what the exact balance of static mesh / static mesh actor i need is 😄
Why do you need to do that anyway? If you want to replace the mesh why not just... set the mesh on the component to change it?
Hmm so there is. Not 100% sure what caused it yesterday, but when my friend ran into it there was literally nothing there, but the toolbar up top. When I tried to re-create it, there was that text about data only BP, offering to switch to the full editor. Will ask him to figure out what he did so horribly wrong, cheers.
🤯
Haha. Get used to that feeling, you'll have it often for the next few months.
just the next few months? 😄
After that it becomes facepalms and "dur" moments.
You start understanding things, but you're not sure how to fully implement them. And when you figure it out, it feels so obvious that you just facepalm.
😄
its funny cuz im a programming teacher but my domain is fullstack js
and there teaching proper structure and flows of stuff is super obvious
but in a blueprint i lose my brain
this is my first real attempt at making a game with UE 😄 its going good though
I always thought BP's made it pretty obvious what with the giant lines going between things
:D
somehow not 😄
sometimes its nice and snappy
i guess i just have to get exposed to each case until im familiar with general patterns
It's just environment and familiarity. It's taken me.. Almost a year now of learning how to read C++ comfortably. Nine-Ten months ago I could write it, make it do things by translating calls from Blueprint to C++, but actually following it was still very difficult if I just had to start reading something someone else did. Blueprint at the time was just a breeze because I had a year or so into it. C++ looks pretty obvious these days. 😄
We all struggle with new things 😄
aandddd ignore me i just got it 😄
holy crap that was simple
🤩
now i can program a bunch of weird key caps to make the game even more unplayable
talking about struggling, how would one properly go about attacks with animation BP?
I've got my animation and boolean to start/stop attacking
but not sure how I would go about starting the attack animation and letting it switch back to the old states
I guess those would usually be done using a montage
so you'd put a slot for it into your anim graph
Down the rabbit hole.
it does seem to be what I need indeed, so thanks 😄
had to happen eventually.
can't create a full project from scratch not expecting to learn new stuff and have obstacles along the way
Sure you can.. You'll be wrong, but you can do it
Or you can make a calculator. 😄
Depends how complicated you make the calculator 🤔
Commercial ones have funny errors so maybe not that easy
can blueprints run .lua ?
Not out of the box
Not natively, but there is a paid plugin in the marketplace that allows you to do so.
okay thankyou
Or just wait for Skookum/ Verse :p
As someone who has use Lua in the past, I strongly recommend just learning to use C++ with Unreal. It's incredibly similar.
hhm, my only attraction for Lua is from playing with it for FiveM. but i have heard from a lot of people Lua is much simpler and runs faster 
im not that good at code anyway so it wouldn't hurt to learn C++
is there a way to "update" a for each loop to a new class
I'm a software engineer and I'm scared of C++ lol. I've worked with C and Java, just scared the chaos is going to lead to me seg faulting constantly, particularly with others. Go, Kotlin, and Python are more my jam ATM
I wouldn't want to either.
my eyes are ded
The only reason I've ever heard of someone being scared of C++ is because of stuff like memory leaks or garbage collection, and that's not really an issue if you follow the Unreal guidelines for it.
For an example of one, here's my Viking buddy's attack combo system! Pretty basic, but hopefully understandable 🙂
NPEs are my primary concern, though I've heard RAII can combat them in C++. I haven't looked at UE C++ yet, will have to in due time for sure, but for now I'm blissfully prototyping in BP.
Once I have a firm design and idea in mind, would start looking at C++ yes. Pointers and memory leaks are one of those things that people always say are a non-issue if you do the right thing, but doing it is usually a fucking pain.
Could drop this into a function, and set local variables from the loop and use them instead.
@timber knoll couldn't attach image to OG message sorry. Open to feedback on if I'm doing something horrible here of course 🙂
Admittedly, my general terminology is a little bad. I assume this is the act of using pointers without checking. I've never once had an issue with that. You just check them before using them. Classic examples are usually like object pointers. You can just do "if (ActorPointer) {DoStuffWithActorPointerHere}" And anything in the brackets is pretty much safe. For baser types, you tend to just pass them by reference or copy. But even for like datatable lookups, which return pointers, it's as easy as just
if (FMyStructType* StructPtr = DataTablePtr ? DataTablePtr->FindRow<FMyStructType>(RowName, "") : nullptr)
{
Use StructPtr to get data here.
}```
Sorry mate, but yeah you guessed right. NPE is Null Pointer Exception, though they may be named differently in C++. C# and Java have some nice features, where you can do things like sketchyPointer?.startSelfImplodeSequence(), which only calls the method if it's not null. The constant safety checks and all got really tiring to me, but I've also switched day jobs from Go to Python, so maybe I have some tolerance for verbosity again 🙂
Oh, just saw the edit. Interesting, seems like there's a form of null coalescing operation in there. Do you happen to know what C++ language standard UE supports?
Marketplace spring chickens 😄
Uh. I dunno. C++ people talk about C++20 or something sometimes. 🤷♂️ I never care, I just follow general engine style.
Except StaticMesh.h, screw that file.
Er.
does this return direction or a location vector?( the subtract output)
StaticMeshComponent.h
Lengthened direction.
by the looks of it, I'm going for something similar
Yeah. It does the same thing as above. (Target - Start).GetSafeNormal() I think.
a simple 3 hit combo for melee attacks, animation depending on the type of weapon
so heavier weapon will have slower stronger looking attacks
nothing too fancy
get actor location is the position vector, right?
Yepp
but how this converted into direction after subtraction?
the remaining vector value is the offset between them.. which can be interpreted as a direction ... if that makes sense
V1 : 0,0,0
V2 : 0,10,0
V1 - V2 = 0, -10, 0
Directon Normalized = 0,-1,0
not sure why i added a math example. feels like if the explanation doesnt work out, then tossing numbers at it wont make it more sensible ^:P
so after subtraction, it never location vector, it will be always direction
Offset is what it really is
atleast, thats how i think of it
maybe the direction term is more "accurate" , dunno
Offset, or relative location
B relative to A
You're basically just asking where the target is relative to the starting point.
direction
so the above image is incorrect?
you can translate it around and around if you wanted to
relative location would be direction * distance
what does this function exact does?
It returns the normalized direction from "From" to "To"
awkward sentence..
The image above gives you the direction from the other object towards self
Normally one goes from self to other, but this could be used in some situations
what is the best way to learn and understand this kind of vector math? is there any specific tutorials for that
I keep returning to this for quick reference: http://www.jmargolin.com/uvmath/uvmath.htm
And if you want to make your eyes bleed:
http://programmedlessons.org/VectorLessons/
Tutorial on vector algebra for 3D computer graphics. Highly interactive.
Support the channel through donations. Crypto accepted!
PayPal: https://paypal.me/reidschannel?locale.x=en_US
Patreon: https://www.patreon.com/reidschannel
Bitcoin: 1JFwWHr4X6uAeoZadukzqKjzFBj3Qjy7Sk
Ethereum: 0x2B2Bc108F1Cc0fF899959dEF3226637787d8C3dE
Dogecoin: DNQ33YnhpWoTBokBNVkZP5ub8KTLkpyjpv
Join our community discord!
Discord: https://dis...
just what i needed ! 😄 Hopefully..
I'd encourage you to dive in a bit deeper than you think you need. Your needs will likely expand over time, and you always forget the periphery of what you learn, so might as well give yourself some breathing room!
ok thanks. Yes it will helps.
Anyone got a quick formula for checking if a vector is between two vectors with a given tolerance in uu ?
think spline. A way to check if a vector is within to spline points
how would I go about using a blackboard variable as the context of my EQS...Im trying to find an example i can study on how I could use the "Enemy target" in my BT as the location to cast the EQS around. Im trying to find spots around it.
@gentle urchin if it's for splines, use get closest point on spline, then compare its position on spline to the points you want
I dont want to use "get player 0" as this is a multiplayer game and I want it to go after its current target not a random player
you would need to create a custom EQS context which accesses the value you want to use for it
Perfect! Thanks ! 🙂 Thats exactly the usecase
I tried that with no success, I exposed the variable in the custom context but on the BT it was never displayed as a drop down
Yeah they unfortunately don't work that way, so you'd need to put the value you want somewhere, and then read it in the logic in your context
so store the "enemy" on the ai controller as well as BT, then access it from the ai controller? that seems so hackish
Yeah as far as I can tell this is how it works, it is definitely a bit weird it's not parametrized better
Im surprised there isnt a way to pass variables to EQS directly from BT, and finding info on EQS is just facepalm city so far
I always did wonder the same. There might be a way to do it in C++, but I never dug into it too much there
I dont mind making a custom EQS class, but was hoping there was just some secret mojo i didnt know about so i asked :/
EQS is handy for a whole bunch of things but at least on BP side the usability feels like it was kind of halfway done and then they didn't think of it too much
yup 100% my experience, I already had an intricate BT working just fine, but thought I would make the ai seem a little more clever...its been a 3 day headache so far based purely on how poorly they implemented the BT->EQS data binding
Can you not make a BP child class of the character movement component?
seems that you can't. but probably for good reasons as it doesn't really make sense to extend it in BP
I wanted to add an external curve to the jump but the cpp file is 3000 lines and I just don't wanna
Was gonna try through a BP child but that's not happening either
12000* lines
adding a curve wouldn't be hard in a cpp extension though
you could even make it one of those built in curves
like this
ugh, fine..
I've tried this a thousand ways. What is the proper way to Attach, then later Detach, a Physics Actor to a Component of the Player? What are the proper nodes, and what is the correct order of operations (disable collision->disable physics->attach?)
I've got the Actor attaching to the Player's Component using this, but none of the ways I've tried to detach it have worked.
looks as right as it can be
I'd use snap to target and have sockets ready for it
but that's just me
I'm having massive trouble trying to hide components (like deactivate them or make them invisible).
For example I want to turn a particle system on and off, so like a burn effect on a character after they have been hit by a fireball to show they are burning.
I have tried SetActive where target is an actor component, but that doesn't seem to work and I have also set the transform scale to 0,0,0 and then up to 1,1,1 when required.
This transform method works quite well, however the particles start at where it was last active and then go to the new location, but I want it instantly at a new location, can anyone help?
@lime gazelle Have you tried SetVisibility?
ill try it now but that didnt work earlier, maybe i messed it up earlier
Yes, it should be set to false
yeah that worked, i must have messed it up b4 thanks alot!
Attaching is working just fine. It's the detach that's the problem. Of all my attempts this is the one that seems like it really should work, but the item just remains in place and attached, :|. It does change it's rotation a bit, so...something is happening, but it's definitely not detaching.
No problemo
you're detaching it directly from where it is in world. which means it's probably going to collide with the actor
you probably want it to adjust its spawn somehow
or think about how it handles physics and collisions until it hits the ground
That could be it. But the Actor still shows as Attached to the Player Actor in the World Outliner, so i'm thinking it's actually still attached. But it seems like setting "Simulate Physics" on it should have detached it alone, which makes this all extra confusing.
The Component I'm attaching it to is linked to a Physics Constraint? Maybe I need to do something special when detaching from a Physics Constrained Component... 🤷♂️
you want to replace UCharacterMovementComponent in character for your derived class?
I don't know. I don't think there's any special rules for physics constraints in this case, but again it's just a case of where you adjust its position
it is a bit strange that the DetachFromActor node doesn't have a case to accommodate this, like the SpawnActor node has for instance
but equally it's valid to consider using a SpawnActor node too and kill the attached actor
Are you sure detach is right like that? Dont you need to tell it what to detach?
This is the description of that node,
I dunno, uncheck weld simulated bodies?
ah so this is on the physics actor itself?
in that case it's fine
Im finding that out too
like I said, you'll likely have to manually move the detached actor outside of the collision of the parent it is detaching from
and then enable collision, physics etc.
Yeah, it's firing about 1 second after the Actor is Attached to the Component on the Player.
Yeah, i'm anticipating needing to deal with the players collision (had to do that when i "grab" it). What i don't get is that it is just not detaching. Here in the world outliner it shows it getting attached, but never appears to actually detach.
just to be sure: you're not trying to detach a scene component on its own, right?
i think its because you are attaching actor to component, so you need to tell it to detach from component
doubt that. if you are targeting the actor, it will understand to detach from the other actor regardless
doesn't matter where the component is nested inside the actor's hierarchy
you saw this? https://forums.unrealengine.com/t/attaching-and-detaching-actor-on-character/67739/5 @viscid blaze
how do you lerp quaternions? I can't find the lerp node for them
"check "shortest path" on the Lerp node to use quaternions rather than rotators." is this true?
You can only do it in cpp or expose the cpp function to bp
Shortest path removes any winding. Could be the same as a quat lerp but I wouldn't know
convert quats to rotators and lerping them would be the same as lerping quats
shortest path would handle any ambiguity
Can anyone tell me how I can set this up correctly? 😮
are you referring to your smiley?
@odd ember Oh man - all the time 🤣 Sorry I was getting some example pictures ready. thought I did already
So, I have my hitboxes set-up like this. The effect I wanted to create was damage based on weapon for rapier.
The problem is - if I hit in the middle of the two hitboxes - min and max damage occurs
handle hit and damage separately
@odd ember Like this?
I don't know where you have your stuff for min and max damage
but you're also not checking if you actually hit, and you're only applying one set of damage. what's probably happening is that it hits twice
I don't know if you have two separate hitboxes, it would seem like you do
Sweep trace -> hitlocation -> distance from hilt as alpha for a dmg lerp between min an max?
Or distance from mid or whatever
my point is just that having two hitboxes isn't good
Yep two different hitboxes 😮 My min and max statscomes from the third person equipment variables. I'm kinda new to dealing damage. What would you recommend for this?
@gentle urchin At what point in the code would that go?
and I'm sure something could be said for the size of the hitboxes as well
single hitbox, that is much larger than the weapon
damage is a random float between min and max values
that's the simplest implementation
for something more complex you can scale damage based on a heuristic
@odd ember Think I'll go with the heuristic route - thank you 😄
If it's just two layers, you could have different damage percentages for both hit boxes.
So if min damage is 50%, and Max is 100%, do 50% damage each for min and max damage. That way you keep two hit events, without dealing 150% damage when both are hit.
Lerp above sounds like the solution someone with a functional brain would suggest though, so your choice 😅
it's generally bad practice to do 2 hitboxes
I mean the original commenter already does, but that's good to know for sure. How come though, too error prone, or does the physics engine not like it?
I would even do traces. The sword could at any point hit the holding character or any unintended target even without swinging. I would only do traces at the specific point in the animation using notifies. Much lighter than an entire component for detecting hits
traces can get a tad complicated compared to a sweep
handling different framerates and whatnot..
is there a way to scan which blueprints have compile errors?
yeah and one of the things I said is to remove one hitbox and handle damage by heuristic, for this reason. physics are fairly unreliable over short distances with physX, but this may change. then there's all the interoperations between hitting once with one collision andthen ensuring you dont hit again with the other actor etc.
it's just a really error prone approach
it works for hurtboxes, but not for hit
The anim notify state should take care of that. Ticks at the animation framerate. I think it's independent game frame rate. Need confirmation on this though
plenty of games use collision components
dark souls famously uses cylinders for weapons
Hmm fair enough. And if you want to know the transform of the hit event, would a trigger box on a weapon be able to give you that?
@native willow I want to extend it with a Blueprint child class and add an external curve without hiving to dig through the c++ code, but that doesn't look possible
it gives you the same amount of information as anything else
As cryptic as Dark Souls 🤔
how did I ended up in this conversation?
I dont think it is, but as you say, needs confirmation. Where would you trace then? straight forward? 90 degree from sword? 😛 Sweep overlap feels alot safer handling all that already . Activated by notify state ofc
You were summoned like a genie
I grant you 2^3 wishes
So my remaining wish count is 8!?
0b1000
You are too wise to fall for my traps. Oh well 😕
True. It isn't difficult to pull off the trace though. Just pull off the transform of the weapon. It's only one approach in any case. A collision component is also valid.
trace is per frame, fast attacks can easily miss. using a collider has sweep which will check the entire path
Any shape trace can do the job. Box, capsule, even a sweep sphere
Only if using CCD
not true
Sweeps also miss frames.
that's true, a form trace might work
I think? The small object problem of projectiles come to mind
compared to using line trace, collider sweeps are fare more reliable, they are already a feature, they're cheap vs. some complex multi-line web trace
for projectile, line trace is more optimal, i agree, but melee weapons are heavily dependant on animation frames
True. I agree on that
To be clear, I'm talking about shape trace sweeps. And I'm sure hitboxes can also miss frames the same way as traces especially since the movement comes from the animation and not a setactorlocation function with the sweep bool true
no collision is perfect
yes, shape sweeps and line traces have their good and bad, for melee weapons shape colliders are still more reliable
physics tick don't update per frame
doesnt it like... reverse check somehow?
physics scene, as EFoolType says, it's calc as close to it, gets worse with mp, fast moving objects in general
or is it just substepped ?
Only with CCD enabled
its hard to have absolute precision even with processing of today, too many other things going on
Sounds like a sphere trace from last loc to current loc is safer then.. altho delayed
guess its safe enough
trig is honestly the best solution, but that requires getting anim curves of each one, talk about a fun weekend, and tweaking the params for each curve
And sweeps with setactorlocation.
collider sweep essentially does this check "per frame"
guess im just happy im not doing bullets
line trace is better for bullets 😛
colliders are still bound by physics check
so not per frame
and trig calc is also more viable
unless CCD is enabled
In any case, I'd still use traces. My animations are not do fast they'd miss collisions
yeah, i went back and put it in quotes
i have a melee attack anim that fires for 3 frames and works reliably with collider sweep fwiw
Unless you're manually setting the location of the weapon using set location those three frames, the collision only snapshots the location of the hitbox each frame and does checks. Not much different from a trace.
I'm not bashing your design, I'm just pointing out the similarities.
I'm open to correction if I'm wrong
sweep is on. when i was using line trace (using anim notify state, which should be per frame) it was missing between one frame and another of the attack anim
sweep checks any overlap between last and next frame
You were using setactor location?
no, its just a collider on an object
How did you set sweep on?
ehhh lemme pull it up
Rather, where?
sweep is what hapepns when a collider overlaps
yeah, im looking around, its just on by default, i tihnk...
only thing i changed is shape size and collision channel
and technically not using physics, its just an overlapping, but im pretty sure thats still using the same system
to put it this way, i saw how it was setup in the ActionRPG, they're doing the same thing
Hmm. Yeah, I was wondering if there was a setting somewhere that specifically sets 'sweep'
if I set the location of the weapon each of those 3 frames with sweep on, the sweep will capture the collisions between the locations right? and what about OnBeginOverlap/OnHit event? will they fire?
Depending on collision settings, One or the other will fire.
Or both
im probably thinking of things like teleport where there is that check box, but i remember reading that overlap performs it, and after looking around, inherently at that
yeah, but will they fire only if I set the position with sweep test? or regardless?
set location should have a sweep checkbox, so i would assume by the same logic
Regardless, they will fire.
Any obvious reason for frametime to go up while mouse is standing still?
you computer is breathing
okay, so I don't quite understand what the discussion is about, when will the collision skip anything?
Okay. I was sure that a collision box will miss checks on movement other than those with the sweep boolean true.
to catch you up, line trace check is not so good on melee attack actions, its better to stick with collider. line trace is better suited for "fast moving" objects like bullets which often go through things because physics isn't that precise be default
Personally. I feel like overlaps are perfectly fine for melee weapons in most cases. They only fail 'sometimes' during framespikes. I've seen people do hundreds of traces per frame. The only time this is not true is for extremely fast melee strikes. In which case a specialized collision check or s few traces is perfectly fine. If your game has FPS problems that are messing with overlap checks, you have bigger problems.
yeah, set movement is kinda wierd to do in regards to melee attacks, the attack anim is drive by the skeletal mesh, so this starts to get into edge cases
oooooh, thanks
if you have some action that is accumulating when the mouse is still
In other words, either overlap or trace is fine?
That's what I've been trying to say.
and there is Rama's weapon plugin thingy out there which is meant to be a robust solution to this conversation