#blueprint
402296 messages Β· Page 505 of 403
when the player moves, have that trigger the SphereTracebyObject to detect for hits. this way it's not called too many times from tick.
the other things you'll have to check. IsValid is good to prevent null returns
i usually only add them whhen i get warnings or null errors though. i should add them more regularly.
gotta sleep guys. night!
π€
im very new, i dont know how to make an event about the player moving
good night and thanks
dont be afraid to experiment, the worst that can happen is it can crash
im kind of in a hurry because the work is due tomorrow night, but if you think its worth it and i can implement it quickly ill give it a try
what i cant afford is to invest a lot of time and not know if itll work 
a good approach is to get something working, and iterate, or refine
@elfin schooner you can do this then. instead of even trying the SphereTracebyObject, run your simulation. type stat fps after pressing the tilde key. if you notice the framerate is not too heavy hit from your tick calls, you can keep it.
if it's a simple employee demo you don't need to go crazy with optimization
doing it this way will determine if your demo will run smoothly at presentation time you can use any one of the stat commands to get more info about the load times and gpu util etc.
tilde keyΒΏ
top of tab
can also try stat game
you see the tick time in that picture? this is from my unreal screen with one of my games
if after you try it your way using tick, and if the tick is VERY high, then you might consider changing it. if not, don't need to
78 fps is high enough honestly
ok NOW i gotta sleep lol
π€
this might increase a lot because i need to add more bpc with the same function of highlight and all that
also, how do i get rid of this screen? lol
ok got rid of it
nvm
okay somethings not right
first of all, the OnClicked event ---> show menu only works reliably if i dont click anything else before the bpc when i enter game mode
second, if i do pull up the menu, and exit of it with space bar, i cant execute the menu again by clicking on the bpc
its wont respond
are you using an interaction widget component?
im using a widget blueprint
for the Click events you need to lookat SetInputModeGameAndUI 'https://docs.unrealengine.com/en-US/BlueprintAPI/Input/SetInputModeGameAndUI/index.html', there are some options there to control input to UI, including focus. for the 'not responding' you will have to add some print functions in your code or blueprint triggers or functions and see what happens maybe there is something that is not firing that you thought should and you have a place to start looking at
also a valuable tool specially for following blueprint flow is use the blueprint debugging capability of the engine, you can step through blueprints and see what is happening at a debug pace. https://docs.unrealengine.com/en-US/Engine/Blueprints/UserGuide/Debugging/index.html
thanks, but i dont think i have the time for that :(
i have to complete other things first
sorry to ask for such a stupid question but any body have any idea what is this ?
that will retrieve an item from an array based on an index.
Good time of day. Need tutorial how to make system which will count path on hexagon for AI
Is there a node to clear the on screen print strings? if yes whats the name?
@trim matrix https://www.redblobgames.com/grids/hexagons/
im missing something here
this bpc is working, its turns the light on
but when i click again it doesnt turn off
what am i doing wrong?
@elfin hazel Thanks for info
(in the bpc its set as not visible so its starts out in the game mode as turned off)
Add PrintStrings to see if it calls at all
hmm i think its related to another problem i have in the level related to the cursor and the game mode
causwe sometimes when i click on a bpc with a OnClicked event on it, it doest work
or it lags
or it only works if i havent clicked on anything else before
but for some reason
if instead of just clicking, i double click
it works 100% of the time
without fail
which is awesome, although its probably an awful mess of coding
On a side node, unless you plan for more functionality, what you have there is the same as just OnClicked -> ToggleVisibility. the flipflop is a bit redundant.
i guess youre right
Bit of a block in my thinking and wondering if anyone has any suggestions.
I'm trying to detect if the player is 'inside' and by how much. This will then drive a mixture of systems (impact of weather on player, determining whether to play sounds outside the building at a reduced rate (and from which direction), etc.
Now perhaps some of these things already exist in one form or another. But I'd like a bit more control over the results, so my first thought was to trace out from the player in cardinal directions along the roll/pitch/yaw to get a good spread of directions and then breaking that information down into hit count thresholds, etc.
Is this just way over complicating it?
I could use volumes with overlap events, but as the structures are player-built there would be so many possible volumes based on the chosen structrual elements (windows/doors/half-height walls, etc.)
The concept stems from the fact that a player could choose to build a house but never place glass in the windows, meaning rain/wind/etc. would reduce their wellbeing over time.
I suppose I could maybe calculate that in the building itself and then apply it's result to the players within it's bounds?
(The benefit of the tracing approach would be someone standing near an open window would be more effected than someone standing behind an interior wall that shields them from the open window)
hmm, is there a way to give an actor component an equivalent to "expose on spawn"?
@indigo bough In general detecting "insideness" is difficult, and I suspect you will be dissatisfied with the results if you only trace the cardinal directions. Constructing a volume from the structure's bounds make some sense, but would only give you an idea of "is the player within the bounds of the structure"
It may make more sense to apply traces from the directions of the things that matter. So for rain, trace down from the sky to the player character's head, for wind trace from the direction the wind is coming from, etc. For something like thermal insulation where you need to detect if an area is "sealed", you should be able to do so analytically (as in write some code to work it out), presuming the building is mostly made of things shaped like planes
@bleak vector Nope. But you could make a factory macro that constructs the component and sets the desired properties
Ahh I hadn't thought about tracing from the source elements, that makes good sense and reduces the traces dramatically. It might not work for all instances, but it's worth a try. How good is UE4's sound occlusion (perhaps a question for another room) but that seems like it would need a more accurate determination of "am I indoors", whereas the wind/rain could actively seek the player to see if it can reach and apply it's effects.
Thanks for the help though, sometimes you just need another angle on it π (Quite literally in this case!)
@bleak vector Can you say a bit more about what you're doing? Your question is a slightly strange one and I wonder if there might be another way to accomplish your goal
trying to make a status ailment class, thought an actor component might be a good way to handle it
trying to set variables like duration when it's being created
Hmm ok so it's a thing you want to apply to the player character? How will you spawn it? In BP?
If so then I have answered your question incorrectly, and you can in fact set properties on a component when you spawn it
Can I use a blendspace in a bp actor without having to make a anim bp? I want to just simply go from 0 state to 1 with a float inside the bp actor
how? other than calling a function initializing values after creating it?
@bleak vector Well it's for something repairable, so I will shoot at the actor bp, and as it takes "damage" (repairs) I can just take that float value for the actors repair state and update the anim state too
@gusty shuttle sorry that was for @cinder dirge π
Top picture is a component, bottom is an actor
Gotcha....(#ForeverAlone)
@cinder dirge all right I got it thanks π
Cool π
I don't think so @gusty shuttle , not from BP at least. That said I've never actually looked into it. You don't like the idea of anim BPs?
it sounds like an entire anim bp isn't necessary
Yeah same, I don't think I need the anim bp, I just need to get the ref for the slider state from 0 to 1 and it updates the anim state too haha
I just don't know how to get a solid ref to that. Casting is not gonna work. I might just need a anim bp
you can use blendspaces without an anim bp
Nice!
but I don't know how to set the values π
How? haha
Oh haha
Yeah, it's just that I will have multiple "instances" of this and I don't think my anim bp could hack it haha
Hence why I just want to do it per-case scenario
Thanks for responding though guys
Hmm you have multiple instances of a blend space for a single mesh?
Umm, I for now I just have one armature/skell to test with. I will have multiple versions of a repairable actor. Ill send screen shot
0 state is busted, 1 state is fixed
@indigo bough Iβd make an empty volume that increases or decreases based on how many floor tiles you have built, and it can overlap with players, windows, walls, roofs, etc. and each actor lets the weather system know what to do
also sorry for the late response π
and ofc for the actual weather that can be done with traces like Jette said
Yeah my weather system is actually a collection of blueprints that navigate the world adding influences to players within their bounds, so it makes a lot of sense to trace from the weather actors.
What is a good way to cast to a anim bp from a actor class?
What I am doing is failing, I just need to get a good ref
For the record, this works π
Quick Question: I have an actor which acts as a drawer and has a child actor component which is an item you can pick up. Now Im putting together the actual drawer using a child actor component containing the drawer. I know - its child actor ception. But I can#t seem to be able to edit the child actors properties like this anymore. Is there a way around this or do I just need to do it differently altogether? Because if I also cant edit what item appears in the drawer from within the editor, then this feature is pretty useless to me
@gusty shuttle If I'm not mistaken, GetAnimInstance should work for that as well.
on the Skeletal Mesh Component, yes
you should NEVER set stuff from outside the AnimBP
animbp should PULL the stuff it needs.
any ideas how I can rotate UI element based on controller rotation?
you would have to do it on tick tho?
maybe that is where the other line comes from π€·
@fading marsh If you wanted to change what's in the drawer in the editor, why not create a class type variable in the drawer that is instance editable and use the construction script to set that child actor class based on that variable?
Yes I was thinking of that already but then my Leveldesigner has to fiddle around in the code and start the entire thing, walk to the drawer and look into it to check if the item was placed nicely
am trying to make a weird camera system where it starts off in 3rd person mode, but if you zoom out far enough it'll switch into a sort of RTS Top Down View camera, anyone have any advice about making the transition between them?
@jade gull so at a certain FOV, switch to top-down view?
yes, so far i just have it so when i've made the Spring arm > Target Arm Length is > than 00, it switches
but then it falls and isnt controllable strangely o.0
500^^
when this condition is met, what exactly are you doing with the camera/spring arm? (how are you doing the switch)
so far i only set camera world location so thats probably the issue
i dont normally work with spring arms, but you might be right
perhaps the spring arm is detaching from the camera?
so in reality you would want to switch the rotation of the spring arm?
uhm, so in third person its an unlocked Yaw, with the pitch clamped between -89 (-90 would spin for some reason) and -15 (dont need to look up), when its "Detached" i've set it to -89 always
youve got me interested now
im gonna try do it myself and come back to you, maybe someone else can get the solution while I do that
oki thanks
This is my zoom + Detach
and my first attempt at doing both movements in one
but also must say, dont think i've actually set it to detach yet so its weird that it starts falling a little
@dim kiln Try finding the angle between the stick input and your up vector like this https://math.stackexchange.com/questions/878785/how-to-find-an-angle-in-range0-360-between-2-vectors
@cerulean summit thanks, yea I got it π
was confusing adding more to z even though its 2d...
You don't really have to do that but it works
@cerulean summit is there an easier way to do it?
Tbh that's the easiest. I was just saying you dont have to make it 3D for it to work. Just need to do some trigonometry
sure π
right
on my end ive gotten it so that on a button press, i go from normal 3rd person to top-down view
is that what you wanted?
pretty much, can just set to the zoom out also set to top down and is perfect
yeh
so the details ill leave to you
if you want help with a smooth transition i can help you there as well
but hte codei s legit just this
that snaps it to its original pitch
if you, in the editor, set the spring arm's original ptitch to -89, it just snaps to top-down
ah so if by default is directly up....nice
yeh exactly
now in practice i dont think you wnat this
you would want a smooth transtion
yea i would timeline lerp or something
@fallen wedge oh i forgot to mention, that the Top Down camera isnt meant to follow the character, but will sweep back to it when moving to third person
yea lol
im thinking we disconnect it from the player and then set its location to a variable you define
now, how to do dis
i did try that at first but the controller itself wouldnt let me move it independantly
and then i made an actor but that wouldnt let me "Possess" it
tried attaching to actor instead and then got a "None" while accessing reference so tried to see what else i could do
right
i had saved the reference as i spawned it on the controller at beginplay
so unsure how i got "None"
oki, thanks and gl π
lets take a look
i just had the thought to try either that or have a second camera, then second camera was losing since it wouldnt sweep π
i think so
@jade gull
ive found a way to transition from current camera position to (variable) position
this might not even be what you wanted
always willing to take a look
fantastic
after detach from spring arm
camera component is interpolated to a position (in this case: (0,0,0) )
mines similar but bigger xD
whys that
feels like it levels out at the start of the lerp
must be the actor rotation i used
yea accidentally got from char ref instead of camera
being a little stupid, i did this in the controller so i could use control rotation instead of actor rotations xD
what am i missing here? im mimicing a tap that upon being clicked, shows the water coming out plays the water sound
when i click for the first time, i get both the water and the sound
but when i click for the second time, only the water stops flowing. the audio keeps going
right, i think the variable "grifo" isnt a reference to the audio clip being played
wait your right
its just a reference to the idea of it
yeh
wait no, it is the audio variable
but is it a reference to the audio instance
i think the problem is that its not "set" to the audio
like, i havent used a SET node
yes exactly
u need to promote that to a variable
however you want to, you don't need a spawn sounjd 2d
finally solved what was happening xD when it was detaching it was still set to "Keep Relative" so the cameras relative location of 000 (cause it was attached to the spring arm and was using its location) making it level out in the middle before it moved to the destination xD
i wonder if i can sync the audio with a delay node? since the water starts flowing inmediately but the audio file starts with like 1s of silence
ah yes, i know what you mean @jade gull, so it's not doing it anymore?
its transitioning nicely now
but if i add a delay node at the beginning it will delay the whole thing, not just the water
i wonder if i can sync the audio with a delay node? since the water starts flowing inmediately but the audio file starts with like 1s of silence
@elfin schooner that can get annoying, I say edit the actual audio clip
yeah that could be easier
or play from 1.0
I would edit the audio file, making sure that it can properly loop
yea i did it
now i want to have these material spheres spawn when i click on an object, and then click on them to make the material of the sof change
how can i do this?
i dont think i can do it with a regular widget
since thats a 3d sphere
actually in the video i think its just a 2d button
but itd be cool it you could make it with spheres
now i seem to be having issues with the movement in the top down camera =/ it wont move left or right the forward back moves relative to camera even when using control rotation o.0
nvm, i got it, i had stupidly split the forward and right vector and only carried z instead of the rotator >.<
Quick one: I am trying to make the cut fade out over time. How would I do this via material nodes? I just want to make the cut fade with a scalar parameter.
So people can chat in my game
@gusty shuttle might not be the answer you're looking for, but you can edit scalar parameters of materials inside of blueprints if theyre assigned to meshes, so you could do it there with a timeline
and/lor interpolation
@dire copper the multiplyer tutorial by epic games covers that
I don't want to make a Menu though
I don't need it in my game
I literally just need a Chat Menu
Not a start game menu
yeh i can understand that
have you looked for chat box-relevant tutorials?
We make a nice clean widget setup plus all the logic required including a player state class in the first of two or more videos on making a clean professional bug-free chat box that is network ready. In the next video we'll link it up to a HUD and main hud widget to create a n...
ive just spit this one out
if it doesnt suit your needs im sure you can find one
@fallen wedge Thanks for answering, I do plan on switching the mat via blueprint, but for setting it up I still need to see results, my material knowledge is week. I just want to have skin in the background, cut ontop, then I can fade out the cut via scalar parameter. I know I need to use lerps but I just don't know the order of it
i see
well i dont know how one would do it in the material editor
but there was this great tutorial that included blood fade
That might be cool
UE4 tutorial on spawning a blood spurt particle, which them adds decals to the environment!
So violent :'(
Request by - "Nickname Surname" (that's literally his handle!)
FILE - https://drive.google.com/drive/folders/0B4babORM1Vv4a21NUy1VYlNIajQ?usp=sharing
i understand yours is a cut
so many parts may not be relevant
but there is a fade somehwere iirc
Some of the principals may apply though, ill watch it
yeh
looks like it thinks your dragging another window into it
seems like your moving a tab around
fix
Sorry to ask but I'm currently stuck with implementing the load latest save event to a menu pack that I just bought. Would anyone mind helping me out taking a look at it ?
I still can't make a Chat Box
have you looked yourself?
i dont want to send you the same tutorials you've already seen
at 17:28 https://www.youtube.com/watch?v=PrcfA4WZW_o
if traversable means "dark" why he makes the mesh dark when its NOT going to be dark
how can i get a reference to a SM from inside a widget menu?
i want to change the material of something but i cant create a reference to the mesh and nor can i pull the "set material" node
nvm i found it
Hey guys, does anyone know how can I add files to property matrix? I know I can select some files from the same folder, right click and Bulk edit via Property matrix, but I have those files in different folders, they are sprites for different characters' flipbooks, but I need to set the sockets for them all in a fitting way
Hi, a question. What takes more peformance. An Overlap or a Linetrace ?
My Linetrace always detect InAir when it should not, so IΒ΄m thinking to swap to an Overlap.
Does anyone know why multisphere trace returns collision UV as 0,0?
It detects multiple objects but the UV position is always 0,0.
@hexed saffron How are you doing the linetrace? And what kind of actor is it for?
@maiden wadi It is a car also wheeled vehicle class. And everytime I drive over a plate (the plates are test plates for different surfaces) it detects between the plates InAir.
hi, im trying to make a third person shooter but for some reason the bullet doesn't seem to travel to where the crosshair is
I donΒ΄t even see why it should detect InAir
Maybe it's hitting your player capsul
it's because your bullet is spawning off-center
if you take the camera forward vector and apply it to something that isn't in the same spot as the camera, it will not hit the center of the camera view
oh so i should try to get the offset difference in camera/bullet spawning location?
you would need to calculate what the world location is where the crosshair is pointing
and calculate direction from bullet spawn to that point, and use that instead of forward vector
okay i think i understand, going to try it out. Thankss
Please someone help, just trying to set the skin to the background and then fade the foreground. I don't know how to blend this and I've been stuck for over an hour trying different combinations and searching through tutorials. I just need the skin on the bottom, the cut texture on top.
My material game is weak when it comes to layering stuff
@thin rapids I just deleted it from Graphics because no one is hardcore active in there. @mellow stump I could, but I'd like to test in the mat before jumping into the blueprint side.
cant you just use a decal instead @gusty shuttle ?
I dunno, maybe I could! I need wisdom in this aspect
The goal is to put this mat instance ontop of a characters knee's or elbows to simulate cuts.
All I want to do is just fade the cut away, I can do it in bp, I just don't know how to hook the mat up
if you multiply the foreground by a number 0.0 to 1.0 that would fade it between fully black (0.0) and normal color (1.0)
I dunno man, just tried, maybe Im doing it wrong
you're hooking it up to opacity
Thing is, I need the skin to be in the background
opacity controls whether you can see through the material
I know that, that first time was my bad
This is what I get now, I want to keep the red, not just be black
Is this material supposed to represent the normal "skin" and optionally show the decal on top of the skin?
Yes, I will have areas on characters where I can add this mat channel/instance on. So these areas I want to have a skin color to match the rest of the limb as well as the cut on top
Right, so if that's the case you shouldn't be using opacity
because otherwise your skin will be see through
Well hence why I just want the cut to change opacity, and the skin is constant, not changing
is the cut supposed to make the skin see through at that point?
The skin should always be visible as the background. The cut should be on top and go from 0 to 1 or seethrough to visible
right
you can't use opacity as I said because it will make the material see through, you would have to combine the decal to your base color
Yeah, so the problem is, how do I add a decal to a mesh/character? Somehow on a mat channel, but still don't know how
As a decal, it does what I need, easy as pie, but I just need to know how to add it ontop of another area
this is probably gonna sound a bit vague but you need to use the opacity of your decal texture as a mask, and the cut fade parameter with it to blend between the skin and decal for the base color
I don't recall how to set this up off the top of my head but that would be the basic idea
Aye,
I think it's somehow possible to JUST fade the cut texture and leave the base behind, if not, that is pretty lame on Unreals half
This is a "simple" problem of just fading out one layer, but unreal makes it hard (to someone who doesn't know mats well like me haha)
I would start by trying to merge the skin and decal layers together first into the base color, once you have that you can start trying to use the parameter to fade the decal part on/off
#graphics can probably help you more with this tbh
might just have to wait for folks to wake up lol
That's what I have been doing and trying for almost 2 hours now. Yeah, I posted in graphics already then deleted it after about 40 min of crickets haha
We all know that feeling, you look around the net, you watch vids, it's not what you need, you get frustrated so you post online, it dosn't get answered so you risk going into a more active chat to at least get SOME answers haha. I'm only human
assuming your decal has an alpha channel, maybe try 1 - alpha, then use that to multiply on skin
then add the decal to the result of that
@gusty shuttle this seems to be working somewhat
Cool, Ill check it out
im creating the alpha for the cut texture using the cut texture
Humm, Is the mat a decal or other?
k ima try, gimme sec, and thanks for assisting!
yw
Try using the alpha as the lerp alpha directly
on Alpha texture, try rgb instead of red maybe
you may have to swap out the A and B inputs
the alpha should do it because the alpha is 0 on the black parts of decal, and 1 in the red parts of the decal
meaning it should allow it to switch between the A and B inputs cleanly with it
Indeed, I'll continue to monkey around, gimme min
@gusty shuttle also, if you click the drop down arrow in the top right of each node, it will show you what is happening at each node. is very helpful for me often
@mellow stump Indeed it is, still can't get the right set up though. I could just set up decals and attach them somehow. Might be the best way to get around this. Decals are super common, I think I can just attach them via sockets or some how
@mellow stump @earnest tangle Thanks for taking the time to answer
Stat SceneRendering
@gusty shuttle yup typing the same command twice clears it, ty
No prob Zanet
after i switch from third person to top down and back to third person, the camera moves back and acts like itself, but the zoom moves it along the Z as if its still detached
Any ideas?
@jade gull I vouch you use this instead
at which point? s:
If you want it to quick cut, 0, if you want it to blend then set the Blend Time
As in, just use that node instead of everything else you have haha
For camera switching that is
does it allow me to switch between a third person camera that follows the character, and a top down camera that moves independantly of the character? π
It simply just goes from one cam to another and lerps in between. You'd have to do some fuckery with possession of characters/camera actors perhaps. Not saying it's the best solution, but something to think about.
I see you already are, nvm haha
lol
does anyone how to make one ai alert others that there is a player thats been spotted i want to do do this in the blueprint not in a behavior tree I've tried it before but its just a pain in the ass I'm more familiar with blueprint
ive tried asking this in ai but no one is active in that channel
Thank yooou~
Do someone know why when I add a movement input on the Z axe at my character it doesn't move upwards? (I started learning like 2 months ago and I'm not very used to how the engine works)π
Yo i have a question why when i put a button inside a scroll box it becomes unclickable but it is enabled
actually when in vertical box its also unclickable xd
What is the fade speed node, this tutorial is so unhelpful ah
so im guessing as the name says its telling the material how fast should it fade xd
looks like it's a parameter node
there is a good video about that
so maybe you chose the bad one xd
I am thinking about defining and implementing all methods at C++ and then use them in blueprint. Is it optimised way?
@trim matrix i typically use C++ as an extension to blueprint. it's hard to get blueprints into C++, so if you plan to use blueprint at all it's a good idea to use a blueprint project and add C++ to it later.
I usually use C++ for math functions and things like loops that iterate faster in c++ than blueprint.
these links also help to understand the CPP code. looking through the api doc and checking the unreal source code for examples:
Unreal API - https://docs.unrealengine.com/ search for functions
GITHUB - Have https://github.com/EpicGames/UnrealEngine to search βIn This Repositoryβ for code examples / implementation
@trim matrix Thanks for answer, I am feeling more comfortable with C++ but also Blueprint is huge part of the UE4. Performance is too important for me. I am looking most optimised way
@trim matrix check https://docs.unrealengine.com/en-US/Programming/Introduction/index.html you basically add the c++ classes into the blueprint project. it will work as intended if your game is mostly C++ too and you only use a few blueprints
Introductory guide for C++ programmers new to Unreal Engine
anyone knows why I have no problem accessing my game instance in a widget blueprint but can't when used in a custom function ?
cant you just cast to it ?
hmm to be abit more specific, I have a save game component which reads the gameinstance as part of the blue print. I have a custom event in the save game component to load up the latest save. So when I call that event in a widget, it works just fine, latest save loads up.
but when I made a custom function with the exact same bp using the custom event of the save game component, it just doesn't work
accessed none trying to read property gameinstance to be precise
im getting this error in a widget menu that changes the material of an object upon clicking a button from the widget
ive used this same structure before for BPCs that were formed by only one object
however this new BPC is a static mesh formed by several objects:
so im pretty sure that where the problem lies
i think the error comes from me not specifying which elements material im changing with each button
but ive dont some tests and no luck yet
The error is saying the arrays are not compatible
the type of the array is different from the type the node is expecting
Try deleting the get node, and make a new one by dragging from the array
If you copied it or changed the class you're getting, this error could happen when the get node might not get updated
ill try that since i did copy and paste the whole thing from a previous widget
@earnest tangle you were right 
weird that you can copy and paste if the target is a one elemnt bpc, but not if the bpc is multielement
I don't think it's about that specificly
It's just that since you changed the get all... node's parameters, its return type also changed
it does kind of annoy me that you can't convert that stuff instead of having to spawn a new node
widget interaction doesnt work in packaged. anyone face that before? 4.25
i'm having a very weird problem that no one on the internet had it yet apparently my character can only walk forward/to the right normally crouched
https://streamable.com/yss6dd
i reached out to experts and no one knows a answer
you probably need to show what your movement logic looks like
people have told me something is colliding with the character
but i cant seem to figure out why
try using the pawns forward vector instead of deriving it from control rotation
also when i look down this happens
I wonder if it's colliding with that gun and/or the arms :D
tbh it seems like you should make a copy of this pawn and try deleting all the extra stuff that has nothing to do with the movement and then try
at least that way you could start to try and isolate what's causing it
so you removed it and the movement works?
confirmed its the arms mesh
yeah that's strange π€
i changed it and it worked the movement fine
but it was working before
and it has nocollision
sure you don't have any logic anywhere changing its collision settings?
I need a hand with meshes:
- Regular static meshes each have a draw call and have their own LODs
- Hierarchical instanced static meshes have a grouped draw call but no individual LODs
- Instanced static meshes are the same as (2)???
What is the difference between 2 and 3??
HISM have more features over ISM. like HISM, individual meshes can be culled, while ISM, it's all or nothing.
ahh! interesting!
I was comparing performance and saw no difference but those features do matter
is there any reason to use ISM over HISM then?
performance is when you have hundreds of the same mesh
yup ^^
ISM vs HISM, pretty much use HISM if you need to cull any of the meshes.
UE4 foliage is based on HISM
ISM would be used, if you have simple game that had everything in view.
yup
or just cull nothing and tell everyone it's the next Crysis and if they can't run it, their computer sucks
wellll, starting arond like 4.22 or something, ue4 automatically instances static meshes when cooking.
but i guess you could turn it off lol.
Does it also have some automatic imposter creation or am I just an idiot?
how can i make a blueprint that lets you change a mesh into another one?
like instead of changing the material of an actor
you replace the entire acotr
Hey gang, I am trying to make a sphere BP follow the rotation of my player camera, which I have working with the shown level BP. However, I want to make it so the sphere BP does not change Yaw, while still rotating properly. I think this means I need to change the rotation I am using from world to local, but I am unsure how to get to there from here. Any help would be appreciated.
so i have a plat form that moves and i want a coin to be attached it. however i want to attach it if its overlapping with the coin so i can put multiple coins if i pleased. is there any way to do that sort of like building on a train where the item built dosent fall behind but instead attaches it self to the train.
Got a question: I'm working with collisions. I would like to get the BONE that caused the collision. I can do this for the OTHER actor through the hit result. Is there any way to get the bone of the actor owning the blueprint?
Sorry, the "Custom Event" is an "On Component Hit" node
I'm following a tutorial on an inventory system and I just implemented an interface and I'm supposed to be able to right click and add an event based on that interface, but I can't. I'm assuming this changed in some version of UE, can someone help me?
How it looks in the YT video
How it looks to me
@lyric iron
Ya
ill look at it later, maybe i need to close class settings
Restart the engine
ok
got a question concerning a multiboxtrace by channel. because it returns after the first blocking hit, it seems i can never solve for this scenario, in which i want to hit the circle that is ever so slightly obscured by the wall:
is there a known best practice for doing a separate trace or something? i know that i can set them to overlap, but i actually do want multiple blocking hits--meaning i don't want to overlap the wall, i want to hit it. i just also want to hit the circle
yeah i'm actually doing that already. this is for a melee hitbox system so in this case both circle = a player and the rectangle = a wall, both of which are set to Block on the Hitbox channel
so in this case the player would be totally protected by that small amount of wall, which obv i don't want
yep
The red square is a box collision?
it's a multibox trace by channel
but if a box collision is more suited it can def be that
Try it with a box collision.
do OnOverlap print object name
It's much more performant than tracing.
hmm okay. i've not used the primitive components before so i'll have to get acquainted
Hmm i was watching this tutorial, and at the end in level bp he used them. but i cant understand how
What is the Get Input Key Time Down Node in Unreal Engine 4
Source Files: https://github.com/MWadstein/UnrealEngineProjects/tree/WTF-Examples
Note: You will need to be logged into your Epic approved GitHub account to access these examples files. https://github.com/EpicGames/S...
Set input UI and set input Game and UI
Thanks. thats the one.
I have my bird. And I'm making a BluePrint out of it. My question is, how do I add the pink_bird_Physical_Asset, so my bird can collide?
any of you guys might have an idea of why I can use an actor reference on the second pic but not the first? in both cases ive only defined Caster and Skill as input values
I meant for the "Target" node
There's two ways you can call the interface.. one of them is a "generic" interface call which accepts anything as target, the other is a call that requires something that's been cast to the interface type already
I'm not really sure why the two methods exist but that's how it is
how can I gain access to the generic one?
also im willing to hop onto live screenshare if you want?
I think if you just drag from whatever target actor, and then type in "interact with object" or whatever is the name of your interface call, that should do it
so if I drag from the hit actor it should let me plug in from it into target?
bingo~!~
got it
when you drag from hit actor you wanna pick the "message" option
thanks for the help @earnest tangle
π
I looked around for the RPC thing you mentioned, @maiden wadi, but could only find posts and tutorials from years ago that do this kind of setup where if the person using the door, in my case, does not have authority then it will call an event to run on the server, and then trigger the door from that event. But that simply does nothing for me. Doesn't even trigger a print on that event
I should really understand this by now but I really don't get it and you're probably annoyed by me coming back again with the same problem as 3 days ago.
@lunar holly https://docs.unrealengine.com/en-US/Engine/Physics/PhysicsAssetEditor/HowTo/CreatePhysicsAsset/index.html
This how-to covers the procedures for creating a new Physics Asset.
Hey @gloomy grove I dont really know what kind of game you are making but for the opening of doors or just interacting with an object that you only plan to have a single interaction for you could have the door logic inside of the door itself and use a blueprint interface message that comes with an actor reference to the player, that could let you handle everything from required flags and such on a per actor basis whilst only needing to keep the flags, keys or other such as variables in the player blueprint
@gloomy grove almost everything there is wrong or has a bug of some sort
@steep wind I'm quite new to UE4, I'm making just a simple project to understand the engine and how to make something work in a way that I understand
GetPlayerCharacter[0] is dangerous in Multiplayer, and responsible for about 70% cross wire bugs
I figured, I have a health bar system that only works for player one and I know for fact that's the culprit
you can't send a Server RPC from a non Owned Actor
you also get a log "No owning connection for... " in yellow each time you try
Any idea why I am getting a negative timestamp at the end of this? I followed the tutorial for the DiscordRPC timestamps.
if you start closing door while its opening or vice versa
it jumps in the animation if I spam the door
it will snap, then start the timeline
Okay. one issue at a time...
- Get Player Character [0] needs to be replaced or improved, but I am not sure what to replace it with or what to add to it
- The door can be fixed with a boolean value that updates when the animation starts and won't allow the timeline to do anything else until finishes.
- Door can't be interacted with by remote clients, only the server
and last but not least, opening or closing a door is a stateful change, which means multicast is poorly suited for it
door has no business knowing player characters even exist
its a door, it has Interact interface function that closes it if open or opens if it closed, that is it
As said, I am very new to this. The only tutorials I can find are from 3+ years ago
2 - when you press E or w/e you use for Interaction, that sends a Server RPC via PC, PlayerPawn, PlayerState or anything Owned by them
then server instance of your, say Pawn calls interact on the door
read that a couple of times
I read something about pawns, actors or players owning certain things and being limited to certain actions depending on if they're the owner or not but I don't understand how to resolve that issue if it even is one for me (which it most likely is)
yeah the networking thing is complicated and you'll just have a lot of problems later if you skip on understanding it well
I'll still try with this, but this will cause some problems for me later.
it works largely the same way in 4.25 as in the compendium examples
at least I never noticed any differences
blueprints didn't get a single networking upgrade since 4.14 iirc
you're pulling my leg right?
they only have the rough basics available
not a SINGLE touch up since?
Interesting, do you have any examples of any important functionality on the C++ side?
I thought the BP side things worked fairly well so wasn't even aware that there was more to it
we can procedurally spawn an entire level with 33k Actors and have it networked and ready for play in 12 or so seconds
with 15 players
okay I have no idea how C++ enables that but sounds good :D
with blueprints, you can't even dream of getting there
ah
hopefully they start working on blueprints multiplayer function in the coming updates
you have custom net serialization, structs are actually useful, you have FFastArraySerializers, which are kinda like arrays, only capable of client side callbacks per item on add/remove/change
you have control over relevancy other then inputting NetCullDistanceSquared
you have Replication Graphs, which is alternate way of handling it
you can spawn actors client side and convince the engine to treat them as if they were loaded from the package, then just turn the replication on later instead of spawning tehm server side and replicating them
you have compressed types, vectors, rotators... that take less bandwidth to replicate
and the list goes on
interesting, good to know in case I ever want to try doing something slightly more complicated with networking :D
I really wish they'd put some effort into the C++ docs because you just don't know any of this is a thing unless you just do...
its somewhat documented
more then half of NetSerialization.h header is documentation in form of comments
ah, tbh I haven't really looked for this specifically, but a lot of the other C++ systems seem pretty poorly documented
you can kinda figure it out I guess but it would be a lot faster if you didn't have to do it by reading the code
i never do networking in BP, its... awkward to say the least
heh
RepNotify, for example
fires server side
but not just that, if you set the variable locally, it will fire on that client as well
just awful
how can i make a blueprint that replaces static meshes?
like instead of changing the materials of an actor
i replace the entire actor
hi guys i have one buzzle not solved yet how i can use prerender image and use it like Paper2d or flipbook like this video Above
https://youtu.be/ulBObMZakNA?t=192
what best solution for this for 360 orbit from prerendered Images
Brand new 3D marketing solution for the property industry. Shift your traditional real estate marketing from print to digital.
More information: https://www.3dmartech.com/
WhatsApp: +8618165719593
Email: contact@ideamake.cn
#360 virtual interactive real estate sales tool# r...
Any idea why I am getting a negative timestamp at the end of this? I followed the tutorial for the DiscordRPC timestamps.
because you're deducting the current timestamp from the timestamp of 1/1/1970
Yea
the timestamp for 1970 is smaller than today's timestamp
Yea that doesn't change anything
so if you deduct a bigger number from a smaller number...
What is the goal here with this logic anyway?
Setting a start timestamp
oh wait
I think I know why
yup
got it
This part is now right
I'm a little bit confused as to why the logic to set a start timestamp needs to be like that but if it works then great :D
Is there anyway for me to activate an input action from a function ? For example I want a function that when activated, will behave like if the player pressed a specific action key
@trim matrix i dont think so as they are a little funky as far as event dispatching goes. but alas i have been wrong before, you could create a function that the event handler calls, and put your event code in there, then you can just call that function. kinda what we do at the moment for all our action inputs.
I'll try going with it then ! Many thanks !
normally you can call custom events, but input actions i dont know what they did but its not the same as custom event dispatchers from what i can tell.
Quick question, wondering if you have any idea about why the input action where I call a load latest save custom event works perfectly fine but I can't get the custom event to work using a custom function ?
what is the best/decent game threading MS with full multiplayer blueprint?(not looking to wall btw.)
I mean you're hitting 133 fps and that's because the GPU is taking 7.46ms... your gametime is less than half of that
i know ill optimise gpu later, for now im focusing gametime ms
@sour aspen local variable inside a function
So when its directly in the event graph its always on memory but if i create a function and create the variable in it, it is a local variable and will be removed from memory when the function returns right?
local function variables exist only in function's scope
(only while the function is being executed)
I see. thanks a bunch
Hey, easy question but I can't seem to grasp it
I have a gun with a shot animation, how can I create a function to trigger the shooting animation in my AnimationBlueprint ?
I tried setting a internal bool like "shoud shoot" to true, but how would I set it back to false once the shooting animation started ?
Do I have to "Add notify" on the start of the shooting to make it trigger a custom event ?
@trim matrix If you're using an animblueprint for a skeletal mesh, usually the actor that the skeletal mesh component is within will have variables that you can get in the animblueprint to play the correct state you want.
okay, so if I understand the way it works, what I should do here is a boolean "should start shot animation", which is the only condition to transition from "Idle" to "Shooting"
How do I toggle back this boolean to false once the "Shooting" animation starts ? Is there a built-in event triggered on state change ?
Is the animation blueprint tied to the skeletal mesh that is a gun, and that skeletal mesh is inside of the actor which has the weapon's firing logic?
yes π
Inside of your weapon actor, have a boolean or enum that says if or how the weapon is firing. In the animation blueprint, you'll use it's 'update tick' which is EventBlueprintUpdateAnimation. On this, you'll get owning actor, cast to your actor type that has the boolean and get it. Create a boolean in the animblueprint and set that booleon in the animblueprint based on the one from the gun actor.
Then your states will always have access to it and will change accordingly once you set them up.
Hey there! I'm trying to set up an fps health system but I ran into a problem.
I have a box collision that takes away the health as soon as you overlap. There's an overlap boolean so that I can set it to true or false when character enters or leaves the box.
But the problem is, I have auto health generation. I want the health to stop generating when overlap boolean is true but I cannot get the boolean from damaging actor to the player blueprint.
tldr: How can I get a boolean from an actor blueprint in a player blueprint?
Can someone please help me? https://answers.unrealengine.com/questions/974496/error-when-packaging-3.html
to close the game with Esc key, do i need to add anything else?
something about "spweciic player"?
how to print the duration an entity has been motion and have it reset every time it stops moving
@fossil shoal What kind of 'entity'? Is it a pawn, physics object, etc? How is it moving?
a character
"Now" is a good node, it gets your bios clock time. Velocity is another good node.
and Math
or maths π
.___.
I'd probably go with a velocity check on tick or on a looping timer. Make a small logic set that when the boolean changes start or stop your timer, do your reset stuff, etc.
Change the boolean based on if Velocity > very small float.
define looping timer?
Hey guys, anyone have some pros and cons of using a blueprint function library vs a component for reusable behavior? For example, I was thinking about making ApplyDamage a part of a function library, and that function will handle finding damageable components, calculating damage values, and sending interface messages, rather than making a component that does all that and attaching it to everything.
set timer by event or function name
@still trellis You know that Actors have a damage interface already?
Im not using the built in, for a couple reasons.
But I would do a similar thing with Healing, Threat, Interrupts, Knockbacks, etc.
@maiden wadi thx for info
Still sounds like a good use for the default one. Just need different damage types.
@mellow stump thx for info
Trying to set a variable name i get 'already in use', but when i search entire project I find no references. what can i do
Have you restarted your project?
@onyx swan What variable name in what object class?
whats the general way to get a LevelSequence in the sequencer exposed through bp/cpp?
@jagged cape have your inputs on the player, forward to the interacted actor
and call functions on it
is there a reason why my exported game builds have suddenly started looping me back to the start of the main menu when i try and load a level
it just started happening today. i tried making a test button with a plain open level node on it. even that loops me back to the start of the main menu
did you exclude that level from packaging?
Anyone know any guides or tutorials on camera settings for first person perspective? I can't get my camera to have natural vision. I tried playing with FOV but it doesn't help much. Things are either too close or too far
Getting the error "Accessed None trying to read property CallFunc_AddChildToCanvas_ReturnValue", Blueprint InventoryComponent, Function ToggleInventory, Graph ToggleInventory, Node SetAutoSize
That probably means the content is invalid @lyric iron
No idea man, never used that node
Ok, thanks
OneToWeldThemAll
Hello together.
In my case only the root is affected. Am i missing something here?
Oh. No sry π
I have no answer for your question
oh.. one moment
check your input
check> consume input
it must be disabled
maybe thats your problem
thats only for input
check your movement in your pawn
thats it
try to disable it
maybe one consumes the input and blocks the other one
you move with wasd =?
Hey guys. I'm starting to lose my hair at this point. I'm pretty new to BP's.
I have a CharacterClass and a CarClass.
There are 5 children of CharacterClass. Basically, I want to detect when a children of CharacterClass overlaps a box of CarClass and set CanEnterVeh bool to 1 on whichever Character is overlapping the car's box. I just can't do it.
then those are action events > did you check consume input there
?
it must be off too
@elfin inlet try to use a tag > the check with "has tag"
*then
hm...
so this is my out-of-the-box marketplace asset... it uses a destructible component (which works fine in my 4.25.3 install)
i try to migrate it to another project
and it fails to to copy over some files (i checked that there's no folder overlap)
and i get this
am i looking at a C++ vs. BP project problem here?
would appreciate any help, ty
as far as i can tell, there is no files missing, it's JUST this one node/mesh that's a problem
Probably just a broken reference. Try manually replacing it
references are very problematic on any kind of moving-migrating
i recommend re-referencing that mesh
hmm aight, lemme check
i've never seen broken anything on a stock marketplace asset migration
is this common?
i've broken an asset or two trying to rename the base folder, sure
but this isn't the case here
just create project -> migrate base folder -> bum
i don't have a DestructibleComponent
this hurts my brain...
Just enable Apex in your project plugin settings
aaaaaaaaah ok
well that's making a lot more sense now
will redo the import
or nvm
i dont need to right
just add the mesh
eeeeeei it worked
ty
guess i should've checked enabled plugins on the asset project :D
hey Is there a way to cast a line to the nearst target within your fov, cause im trying to do a homing projectile
with out having to manually selec the target
kinda like the titanfall smart pistol
Please, someone #editor-scripting
It's related to blutility
with out having to manually selec the target
@jovial bobcat this is almost what i want to accomplish too, i want to make everything inherited from playercharacter class to be able to enter a vehicle, without casting to every different character for every different vehicle
With blueprints, how do I do a '+=' value in it? For example, I want the blueprint to get the owner of the blueprint component (if that's what you call it), then rotate it by the rotation value every tick
So what I'd want to do is += the rotation value, but I'm not exactly sure how. Do I have to route it through a math expression?
Currently, I have a rotation speed variable setup in the panel to the left of the main view
Though, I'm new to blueprint in general so it's a bit of a strange concept for me
@primal moss there is a "add relative rotation" which should do it. Otherwise you would first need to get rotation, add into it, and set rotation
How do i get the velocity of another actor/blueprint?
I'm currently controlling a character, and i would like to get the velocity of a bullet that's spawned when i left click(fire)
isn't there a "get velocity"
that should get you the velocity vector for the actor
@earnest tangle Yeap, but i wanna get the velocity of the bullet from within my playercharacter blueprint
yeah so you need to first get a reference to the bullet
If i call get velocity, i'm only getting the velocity of the character
How would i get a reference to the bullet? I think that's what im missing π
if you're spawning the bullet, the spawn actor node should return the spawned actor
I have a fire event that spawns a bullet whenever i left click, i'm assuming i have to promote the return value to a variable?
Hmm, thanks. But how do I properly wire it up in this case?
https://puu.sh/Gde1r/b78b65cb4d.png
AddRelativeRotation says that the target is the SceneComponent, but shouldn't it be the actor component?
So i tried linking it to the actor component but it doesn't look quite right. And for that matter, I don't know how to feed the rotation speed value into the add relative rotation, since it hasn't been converted into a delta, meaning it can't be wired into the lavender-coloured anchor
@scenic mesa yeah that would save the most recently spawned bullet so you could access it then
I'm getting a value being printed when i do this. Am i doing it right?
I call my weapon class andd grab the bullet from it?
@primal moss you can use the root component, that should work. You can also right click the rotation pin and choose "split struct pin" which will give you individual float pins instead of a vector pin
Oh! Thanks, now it's the green pin I wanted for the rotspeed getter
@scenic mesa yeah that looks like it should work if you get a value out of it
@scenic mesa yeah that looks like it should work if you get a value out of it
@earnest tangle Aiight. Thanks!
@earnest tangle Sorry, one more thing. The script kinda works now except it's at a ludicrous rotation speed, and I'm getting spammed with errors - Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetOwner_ReturnValue". Blueprint: PickupRotatorBlueprint Function: Execute Ubergraph Pickup Rotator Blueprint Graph: EventGraph Node: AddRelativeRotation
here's the current state of the graph
(rotspeed is 30)
is the actor you're trying to rotate the same one as where this logic is?
it should be
Right, so you don't need to use get owner or any of that
Just grab whatever is the root of your actor from the component tree and drop it on the target pin
since that's what you'd want to rotate
Okay, that removes the errors but it's still very, very fast
you might want to multiply rot speed with the delta seconds value before using it
Ah, that's what I want to do
otherwise the speed can vary depending on framerate
I had thought putting it into delta rotation would automatically multiply it
How do I multiply them together? Math?
(as in, the math node thing)
just pull from the rot speed pin and type an asterisk into the search box which should give you the relevant node for multiplying a float
Okay, THAT should fix things, thanks!
How do i maintain the speed of my projectile bullets?
Currently when i fire my projectile, it "flies" fine, but when i run in the same direction as my projectile, it visibly slows down on my screen.
I've tried printing the relative velocity of my projectile and char to my screen, and it goes from 1000 to about 400 when i start running in the same direction.
I assume it's this drop in relative velocity that's causing the visible slowdown in my projectile's flying speed. How do i make it not slow down?
I'm thinking one possible way would be to do calculations in my projectile blueprint to ensure that the relative velocity stays the same?
But i'm hoping to eventually make it a networked multiplayer, so i'm guessing that this method wouldn't work?π€
umm I have a bullet and i set it collison to world dynamic and only ignore traces and collsion enabled but it dosnt seem to collide with anything, I add a breakpoint to event hit and nothing happens apaprt from it hitting it self
@jovial bobcat Does what ever it's colliding with have a collider?
??
umm i want it to collide with a enemy
and it has the default collision capsule
but i really want it to collide with the mesh so i can get bone information and to do headshot damage
the problem is
it wont even break the break point when it hits the ground
or anything other than it self
try posting your blueprint?
what is the equivalent of ensureMsg() in blueprints?
I want to spam annoying stuff all over my screen to remind me in case I forget to configure certain things
Can I wait for the next physics update to occur in the middle of a blueprint graph?
Or like tick
Would it help to just throw in a custom event?
Please ping on reply β€οΈ
hello folks, what is HUD used for, and what are widgets used for in UE4? Does HUD should be responsible for managing widgets eg. toggle visibility?
Is it good practise to create small widgets-parts of user interface and place them all into one, which is responsible for managing them?
and where events (eg. clicked) should be handled: either in sub-widget class or within the main widget class?
HUD is used to manage widgets yes, but its standard practice for widgets to manage their child widgets (like having a parent widget with vertical box for displaying... say "events", then a separate widget for displaying a single event - when you need to show a new event you have your EventList widget instantiate new one and add it to its vertical box)
Clicked and such very much depends on what you want to achieve, there is no one size fits all approach
all UMG widgets can override OnMouseDown, OnMouseUp... etc, and those functions return either Handled or Unhandled
if they return Handled, the input is consumed, if not the parent widget receives the input, then if its not handled eventually goes to Viewport which passes it into game input
@dusky axle
@twilit heath thank u for answering me.
let just say that some game has simple button. Once player clicks it, the new widget appears (for example: player's inventory). However, inventory can be opened with key as well. Is it good practise to embed this custom widged (represented with button) into main widget which represents viewport?
plenty of games have a menu bar on one side of the screen that open inventory, character screen, map... etc
How to attach Spectator Pawn to other player's camera after death?
Hi everyone I'm creating a endless runner game using only blueprint. I have enimes spawning as the tile continues to spawn but the issue is they are not moving due the the navmesh volume component.
I have tried various ways to make it work but nothing so far, us there any way to spawn navnesh attached to the main character and move along as he proceeds forward???
@twin oyster Check out Navigation Invokers. I haven't used them personally, but it sounds like what you're looking for.
@maiden wadi thanks, i will give it a try.
What is the best way to make a row of these button objects?
ok. Thank you
And use padding
@scenic mesa Yes it does have a mesh, I put a collsion capsule and it still wont detexct hits other than itself
@jovial bobcat If EventComponentHit isn't firing, it's because whatever component it's linked to or whatever the component is hitting isn't blocking the correct channel type. Note that overlap and components set to only query and not also physics will not work either.
How do you get the number of objects in an array?
@trim matrix Actual valid objects or indexes?
So, I made a simple toggle to show the game's menu. Sure, closing it on tab doesn't work from the character BP, since it's not the focus. But is there any way I can close this menu with Tab or Esc when it's open?
I can't get any input events in the widget event graph
Tried this in the widget, but no cigar'
Okay, made it!
Player code:
Widget code:
... well, so much for me being about to say, "I don't know, but let's fucking figure it out."
.. wait, why didn't it throw up when you put a player controller into an actor node on the enable input?
No clue
@maiden wadi I think I need number of indexes
Wait nevermind I found what I was looking for
Okay, so, the input doesn't work in the menu when the game is paused
That part aside (which might be a bug) I feel like that can't be the right way to do it.
Yeah, it shouldn't process game input while paused, unless I'm misremembering (which is possible)
SetGlobalTimeDilation it is then
Okay, so I still don't know why it doesn't care that you didn't originally give it an actor reference in the EnableInput... But it also will just create an input component if it isn't passed one... which is just doubling down on the WTF aspect.
@pure heron Also, if you tell it to consume input, you don't have to disable the input on the controller
Oh, neat
How do i get my bulet to maintain the same speed on screen when i run in the same direction that it is flying?
Currently when i fire my projectile, it "flies" fine, but when i run in the same direction as my projectile, it visibly slows down on my screen.
I've tried printing the relative velocity of my projectile and char to my screen, and it goes from 1000 when my char is stationary to about 400 when i start running in the same direction.
I've tried adding the player velocity to the bullet's initial speed & max speed but it's not working, and is the bullet still slows down when i'm running in the same direction as the bullet.
I'm wondering if the pause functionality is an issue from moving to UMG from the old slate stuff... since all I've seen seems to be workarounds... like time dilation or having to specifically grab the key input and break it apart and do logic on it rather than normal event handling.
Is it using the ProjectileMovement component?
@nocturne remnant Yes it is
Here's a gif of the slowdown happening, sorry for the low framerate and quality. I had to reduce the frames to fit discord's 8mb limit
The animation's a little wonky, and it's showing a running anim when im idle, but you can see the bullet slowdown when the char starts running
@scenic mesa you string printed the speed of the projectile?
Its own speed (not relative)
It makes sense that the relative speed lowers when you run towards it
As you increase speed, projectile speed stays the same), so the difference (relative speed) lowers
@scenic mesa you string printed the speed of the projectile?
@gloomy linden Yea i printed the relative speed
It makes sense then, if your player speed becomes 600, the projectile speed 1000, that relative speed is 400 @scenic mesa
The problem is that it doesn't inherit the spawning actor's velocity
It makes sense then, if your player speed becomes 600, the projectile speed 1000, that relative speed is 400 @scenic mesa
@gloomy linden I've tried printing just the projectile's speed and it's constant
Seeing it like shooting from a car that stands still, shoots and then start driving versus a car that drives, shoot and continues driving
@nocturne remnant @gloomy linden I understand that. I think the problem is that the speed of the projectile is constant(regardless if it inherits the spawning actor's velocity). However if i run towards it, the relative velocity drops, causing it to move slower on the screen?
The first projectile would go 1000, the second would go 1600
The first projectile would go 1000, the second would go 1600
@gloomy linden Yep, that's what's happening currently
So while the projectile is in flight, update the speed so that the relative speed remains at 1000
@gloomy linden It doesn't actually do that.
So while the projectile is in flight, update the speed so that the relative speed remains at 1000
@gloomy linden You mean, to do calculations on the fly so that it adjusts the speed of the projectiles such that the relative speed is always constant(e.g 1,000 regardless if i'm running in the same directin of the bullet?
Yes but i wouldnt do it each frame tho
unless you specifically add the velocity of the spawning actor when it instantiates, it neither knows nor cares what that velocity is
@gloomy linden I'm planning on making this a network/multiplayer game. Would this solution of doing the cals on the fly hold up in a multiplayer game too? Do i have to ensure that the relative speed for the bullet to each player in the game is the same for every player in the game?
Well in that case i wouldnt care about relative speed at all
unless you specifically add the velocity of the spawning actor when it instantiates, it neither knows nor cares what that velocity is
@nocturne remnantI'm adding in the velocity of the spawning actor like this, am i on the right track?
And only care about its own speed
Because relative speed differs for each player depending in their movement
And honestly, its wide open for expoitable cheating
Well, on which player relative speed does it change on?
And only care about its own speed
@gloomy linden This would give me the same issue that i'm currently facing? (e.g bullets become slower when i run in the same direction as the bullets?)
Yea, but it appears "slower" on the screenπ
If we both stand next each other and we have a remote control car
We let it drive at 5 km/h
And you walk towards it
Its for you only slower in perspective
Well, on which player relative speed does it change on?
@gloomy linden The position of the bullet would be relative to every player in the game? Or at least within the field of vision? Since if i run towards or away from the bullet, the relative speed changes
If you stand on the other end of the track and stars walking towards it, it becomes faster
How will you solve that in a multiplayer game?
For my perspective, the speed remains the same
That will be your 3rd issue
If the speed changes
The impact time will also change
I got a question about the engine.
For what i dodge, you could perceive as hit then
is there a way for UE4 to measure how far you push down on a button of the keyboard?
Unless the input device can define it, no
or how far you tilt your left analog stick of a gamepad?
I have a wooting one keyboard that is both analog and digital
As float ofcourse
That will be your 3rd issue
@gloomy linden Im a lil lost, what are the 1st 2 issues?π
the analog portion of Wooting one emulates that of the Xbox driver
@scenic mesa first issue is the perspective of the casting/shooting player and its relative speed, the second it the target (if he walks towards the projectile, the relative speed increases), the 3rd problem is that the relative speed for an other player, its also different).
The 4th issue is that the impact moment if the projectile is different for each player as the relative speed for each player is different
I'm thinking of having the server/host track the speed/position of the bullet, then when it receives each player's position/speed, give the appropriate relative speed and display it on each player's screen?π€
if you're going to have a server, the server will be the authority over everyones movement - players, bullets, everything
Well, the server should see this:
- caster player shooting it
- projectile speed is x y z so it goes that direction and goes to its goal
It either hits something or dies out
The players are just an observer in the universe watching that thing going to its goal
@proven mason what's your question?
E.g The server knows that the bullet travels at a speed of 1,000. Then given that player A shoots at player B and is running towards the bullet, and player B is running away from the bullet(both at constant speed of 500), player a will see the bullet fly away at 1000 and player B sees the bullet flying towards him at 1000 speed?
so from tiptoe to walk to jog to sprint
the engine supports both analog and digital inputs out of the box, what it does by default with your wooting keyboard will depend on how exactly it emulates an xbox controller
The relative speed will always change depends how the observer moves
you can't just add the length of the vector, because that doesn't take into account what direction you're moving. Moving sideways would increase its initial velocity just as much as moving the same direction. I can't think of the exact order of vector operations at the moment because a) It's a day where my brain doesn't work b) whiskey c) I fucking suck at vector math
Even though its visually annoying, its how movement works
The relative speed will always change depends how the observer moves
@gloomy linden That's why i'll get the server to calculate the appropriate relative speeed for each player?
You shouldnt touch the relative speed
hmm
okay so if I assign input axis X and Y to the left thumb stick of the PS4 controller it automatically incorporates analog feature?
It will simply fuck up game play and reality
the difference between BindAxis and BindAction is specifically that Axis is analog and can return a range
Any sense of expecting things to behave will become wrong
@gloomy linden I guess i should just leave it be and live with the bullets flying "slow" then?
It ain't a bug, it's a feature?π€ π
I was thinking a full tilt will give a scale of 1 but a partial tilt would be less than 1 and between 0
Yes or just increase the speed to 2000 or something
if you BindAxis to a digital input like a regular keystroke, it just reports 0 or 1, if you bind it to an analog input like a thumbstick it returns the appropriate amount for the input, again depending on how the wooting keyboard actually implements its analog inputs this should work out of the box for you
@trim matrix correct
@torpid linden I wanna give that a shot
Yes or just increse the speed to 2000 or something
@gloomy linden The idea being that once the speed is large enough, the difference that arises when i run in the same direction as the bullet becomes negligible?
forget about animation
In most shooters bullets are just a line trace and a beam particle