#blueprint
402296 messages ยท Page 763 of 403
alright let me try that now
You dont need the select
dashKey is shift correct?
MoveRight * LaunchVelocity
Can be whatever you want, but yes I have it set as Shift.
Select was to select left or right direction based on the MoveRight Axis.
that would only work in case you don't use controller
probably why authaer has it there
as long as you multiply by direction, its all good
I just like to be explicit. I don't want it to be anything other than exactly 10000 magnitude.
thats fair
I can't thank you all enough
And just to make sure, I could just reuse the same code, and with a few tweaks make it forward + backward?
Yepp
@supple bane Are you looking for full 360 degree rotation dash? Well. On a PC more like 8 directions, but still.
Pretty minor change.
How can I fade out particles in relation to MPC parameter?
For instance, when it rains I want the dust particles to disappear
I have my dash set up with GetLastMovementInputVector to get the direction, wouldn't that work too? Or would that not work for full 360 degree dashing on controller for some reason?
I'm sure it works fine. I don't think it would be an issue, but I wonder if that would have issues with fast input. That uses the last processed input from the movement component.
Not likely to notice unless running at low framerates if it is an issue though.
Dunno. Might work. I wouldn't do it, because am more comfortable with direct control inputs. I know exactly how control inputs work.
It's likely that GetLastMovementInputVector is set near the end of the frame. And I'm pretty sure input isn't processed til next frame anyhow. So I doubt you'll see any difference. ๐คทโโ๏ธ But I dunno.
Yeah. This would work with a controller as well and the IsNearlyZero would work as a deadzone. User would need to move the stick more than 10% to dash.
Programmatically solves some of the annoying issues with controllers being badly calibrated.
I believe so. Looks the same.
Minding that my pitch is flat. Not sure how your game handles control inputs.
If for some reason you're dashing upwards, mine may not work in the same way because the pitch is inherently flat at all times. Top down style control.
Should be the same MokeRotFromX I believe.
How is your movement set up?
What about the dash itself?
Odd.. Add a print to the execution before SetActorRotation. Print out the value from MakeRotFromX
Try to move and Dash, should not be 0,0,0
That code above looks weird to me
Is that supposed to move your pawn in the direction of sight of the camera?
And perpendicular to it?
Yeah I wasn't factoring that in. Is your camera always directly behind the character?
I mean quite honestly, if the last movement input is working fine. I wouldn't mess with it.
Yes, but nvm. If it works keep it as is.
It's is just easier to take the camera forward vector and project it onto the [0,0,1] plane.
But that is not your issue atm
@swift pewternever realized the fancy math behind it. ๐ And the fact that it will very likely break when your camera is above the character looking down to it.
I started by watching a city builder tutorial. Watched it through and sort of followed along once. Then went back and rewatched it a second time, going back over everything that was done, converting everything to numbers and logic in my head. After that, it was mostly just a ton of curiosity and googling.
Eventually I hit the performance curiosity barrier. Realized Nativization was going to be hell and decided it was easier to learn C++. ๐
Followed a ton of tutorials until i reached a point where I wanted to try out my own systems based on the variations of knowledge acquired through youtube tutorials. At some point you sort of get the gist of most things, and play around with it from there ๐
Have I learned best practices? Probably not.
forums like this helps a lot for the latter part. Peaking into other setups and whatnot.
@trim matrixif you have no programming background whatsoever, learning Blueprints may still be a daunting task no matter what
^good point. Coming from a programming background certainly gave me a head start.
So do not get descouraged.
Hi, anyone know if there is a way to get the actual deltatime for the previous frame? Despite the use of t.MaxFPS. For example I use t.MaxFPS 60 and cap the framerate at 60, but actual fps can be 120 fps, is there a way to know this actual value?
You are right that there are no courses which start with the basic programming paradigms and show them in Blueprints
How much do you generally know? Binary, Float, Integer, Enum, etc?
Tom Looman on Udemy, he taught me everything i needed for the rest it's just google
but Tom Looman's course really takes you through all the essential modules and workflows
everything from BP, C++, AI, Networking, Animation Graph, Material Graph etc etc...
his most recent course introduces GAS as well
but that course is a bit pricey
His course gives a great overview of how everything glues together
@trim matrix even though you may be already past that phase
There are a ton of things that relate to blueprint usage that will probably never be taught in most tutorials. For instance, why a lot of beginners end up in here asking why they can't set their rotations exactly to a number and like 60 Yaw rotation in editor ends up set to 59.9999998. They think there's an error or bug in the editor, but it's entirely normal.
What I found with my students is that one of the most difficult aspects to understand for a beginner is how your code is linked to everything else the engine does.
The whole concept of event-driven programming is obscure to the majority.
Let alone OOP.
I remember actually being shocked when I found out that there were other ways to program than OOP. ๐
yeah, me too
I don't know which programming language kids are thought in primary/secondary school these days.
I still honestly don't know how composition is done in most situations without a generic ECS style
Back in time it was Basic and Pascal.
I did QBasic which was honestly retro as hell even for 2010
It may be that I am a bit retro. ๐
@trim matrixso which part is the most difficult for you?
ooh, I meant highschool
how can I make these traces always appear in front of the player? currently they appear on the same side regardless of the capsule's rotation.
those vectors are in world space
you want to get the forward vector of the player, multiply it by how far you want to trace and add that to the world position
to get a position in front of something
is it like "ok I want to do this, where do I start?"
I grew up in a farming state in the US. By the time I was in middle school, the school system there was barely learning how to do spreadsheets. I think most everything I picked up was from a rare tech book, and eventually needing to mod WoW because I wanted to raid, but the addons I had to use were so terribly programmed. and my PC couldn't handle it. ๐ Lua was my first dive into "programming".
Ok that's a good analogy.
Motivation is extremely important in learning.
@trim matrixdo you have a game idea you want to realize?
That's great
So you need to break it down in pieces
copying of something that people did before it one of the worst methods of education
and work on one piece at the time
Not sure that applies to everyone Alexey. Depends on what you do while copying
@gentle urchinyou copying...nothing else
I think copying is a fine way to learn "How to use the engine". As in how to navigate around, find your bearings in the software. But it is the worst way to actually understand what you're creating.
I tend to agree. Copy pasting is like giving someone a fish, but it doesn't teach you how to fish.
even then its hard to follow
that did it, thanks
sorry for derailing the topic
"we're connecting the vector in here because we want to move" ^
What does that tell you if you dont know how a vector relates to the world, or the context of moving
@gentle urchinyep...most of the issues come if the author knows exactly how it will behave, and not showing what will happen if something went wrong, like world to local transforms (most common example)
Also. Unless you're training for a specific specialty. I strongly recommend sticking to gameplay design code for a while. It's much easier to follow. After my current job, I will never again wonder why there is an entire subset of programming revolving around UI.
Reality is that knowing something, understanding something and knowing how to teach that something to others are different skills.
and then you will learn that prepping art for ui is another skill set (as ue4 doesn't do a lot of stuff for textures that it does with 3d art)
A lot of tuts are made by people who learned something without understanding it and now simply want to show off.
It also helps to know the recipient of that something. Some understand it better by seeing it visually, others mathematically etc etc. People learn things differently
Yes, different people have different learning styles.
So personal tutoring should get you further along than generic tutorials
I have been making "no sound" tutorials for a while, purely visual. Some people loved them some others hated them.
Are you supplying with text to it then ?
Makes alot of sense. Easier to pause, think, and move along aswell then. With audio you sort have to play over and over the same sentence(s) if you want to rewatch it
You'd be better off just looking at the character examples in the unreal default projects.
aswell as the speed of some tuts are insane
I did try the no-audio concept for a while, but now I am back to audio tuts.
You cannot make 100% of the people happy.
Do you separate your content in any way to how advanced the topic is, or how in-detail you go describing whats going on?
I want to make tuts for ue4, but i don't enjoy sound of my voice -_-
^makes 2 of us
None does enjoy their own voice
Because we hear our voice also through the bones, which others don't
Was planning on streaming for a while, but cant really get comfy on cam lol
The problem is partially because most microphones don't reproduce your voice very well so it sounds weird and wrong
If you can get your mic setup nicely or just EQ your voice to give it low end, it probably sounds much more natural
True that, but it will never be how you hear it from within your own skull
Probably not yeah
@trim matrixyou should indeed study the standard 3rd person template. There is a lot to learn from it.
Try, break it, fix it
Ask questions here
It's very unlikely that anyone is gonna steal your ideas to the point that your game is not successful as a result
Also history has proven that is not much what you do but how you do it that makes the difference.
You probably should not watch paid content on stream yeah, free content should be ok usually I think
is the delay node affected by time dilation?
This one has got me feeling quite silly, I have a button that brings up an interface that is part of another widget, but I'm unable to click on the button behind it, should I not be able to do that if it's not covered?
Not sure but I suspect "no". This should be quite easy to test though :)
@cyan surgeis that a part of the same widget?
oh...then you widget is stealing the focus
I mean, yea but it's just the canvas?
#umg - but iirc it's possible to pass hit events through
in BPs you have no View level events, it's only possible to get them in C++ afaik
Hello everyone,
please take a look at the screenshot
I'm tried to make a build for android of metahuman but it's face is not appearing.
Anyone know what might be the issue?
@cyan surgeIf you want to click through a widget, that part of the widget needs to have it's visibility set to Not Hit Testable.
@thorny glen https://docs.unrealengine.com/4.27/en-US/SharingAndReleasing/Mobile/Materials/
Scene Color expression
Tessellation input
Subsurface Scattering shading model ```
Is anything wrapped around the canvas?
Thanks @wispy star
Can we hop into a voice room? @maiden wadi
Also another useful tool. Open a widget blueprint, go to the designer tab, and open the Widget Reflector.
Do Pick Hit Testable widgets, hover over where you can't click through and then escape. It'll give you a snapshot of your hierarchy at that moment and what you have blocking the hit.
I legit never thought MetaHuman being feasible on Android.
Though the MetaHuman sample said it supposed to be scalable from feature film to mobile....
I thought "mobile" means lower end gaming hardware like Nintendo Switch or slightly mid end laptop.
SOverlay is a Slate widget similar to the Overlay UMG widget
Or rather, the Overlay UMG widget is built using SOverlay
looks like it is, which is fortunate for my use case
Oh that's interesting, I assumed it was realtime, but good to know :)
I'm using it to prevent ledge grabbing for a moment after letting go of one so you don't immediately grab it again
I was with a reference to the widget making it visible, but I think I was setting the canvas as hit testable,
so yea, must be it going to check now
@solemn zephyr Implementations like that are much often easier to maintain by saving a single float of current game time.
You don't have to deal with timers or waiting for the callback, you can just drive logic based on the float. On Ledge release, set float. LastTimeLedgeReleased or something. When your code tries to grab a ledge, all you have to do is check if GetGameTimeSeconds - LastTimeLedgeRelease > WaitTimeAfterLedgeRelease.
im trying to make obstacle course with moving objects but when player stands still, moving objects go through the character. Id like the objects to always push the character. How can i make it work? I have looked online and seems like people have this issue aswell with no solution.
that seems unnecessarily complicated for the same effect
As opposed to what? How are you updating the state to allow ledge grabbing after the delay?
on releasing a ledge set "can ledge grab" to false, delay, set "can ledge grab" to true
I think it's crazy that the default for setting the visibility on a widget effects the canvas...
is there NO function to set everything but the canvas?
ITS INSANE
If I want to toggle the visibility of a group of widgets, I can do it generically!
because it will effect the canvas?
AHH
This is just as much blueprint as umg tbh
I'm confused as to what the problem is?
Collapsed means it is hidden and not in layout
One of the other options allows you to hide it but keep it affecting layout
Gotta love the XY Problem syndrome.
Yes that is no issue, its when you make it visible it sets the canvas as a big impassable, block that you cant click through...
because canvas is the root.
Screenshot example of what it looks like?
canvas is the screen space for drawing UI
You can remove the Canvas Panel if you want
Yes but because it CAN block, and it IS the root of all widgets, I cant set a widget to visible without making it impossible to click past
If your right I will marry you xD
You can make it visible but not hit testable
I think I just feel in love
This should make it get ignored
So what you're trying to do here is to set visibility in an object reference array of widgets, that array contains every widget you have. Is that the case?
Not every but alot yea
The PROBLEM IS SOLVED
Thank you SIMPLE OR COMPLEX!
no need for caps
Wait what
What?
I still don't understand what your actual problem was, but anyway
Glad if you got it
What the heck mesh collision has to do with the widgets?
I won't back track to explain an issue that is now solved, thanks for the help
@solemn zephyr The implementation really isn't that different. And if you ever move to C++ code, the float version becomes immensely easier because delays aren't as easy as a single line.
You owe us an explanation dangit
lol
then I will go
I have an array of widgets, I set them all generically "Off" this makes them invisible no issues, I set them generically as "On" this makes them visible, I do this with the Set Visibility function, that function when setting them as visible also effects the canvas that invisible useless thing in the background of any widget you create but that also means it now has hit detection so it will block you from clicking onto a button that it's completely invisible hitbox is now blocking, solutions remove the canvas, invisible hitbox now gone, yea? okay bye xD
Problem not really solved because canvas is useful for other stuff so I still kinda need it... ๐ก but I'll just toggle visibility in another way...
A function for widgets that changes the visibility and does not make the canvas a hitbox, that would be nice... really nice...
"You can make it visible but not hit testable" this is not helpful
I'm LOOKING for some of the widget to be hit testable
I want EVERYTHING else to be visible
just not the canvas...
Yes, you need to make those specific widgets hit testable, and the ones you don't want to be hit testable to not be
Or just fix what sounds like a very messy UMG tree, you really wouldn't want random canvases to be on top of other content to begin with
Your really not telling me anything I don't know here bud
Go to your widget blueprint,
select your Canvas
Go to Behavior section
You'll see a 'visibility' or something like that setting
Yeah I'm just saying because you'll have an easier time in the future if you fix it
It changes the default
It should be 'Not-Hit Testable (self only)'
If you run this
It will take what ever the default for the canvas is
and set it to visible
and any other widget,
the issue is I just don't want the canvas to become hit testable
By taking a reference, when I make them xD
have you tried this option? :P
show, dont tell ๐
That will work, but just for the canvas part!
I would also like the rest of the widget to be clickable!
AHHH
Does your widget array contains Custom Widgets?
You must be trying to hurt me, so I'm leaving xD
Yes, if you set the root canvas as not hit testable (self only), the children of that canvas will be hit testable assuming you have set them to be hit testable
okay but any children of it can be hit testable?
You seem utterly in-helpable and mad about it.
No my issue is resolved, I've been helped, I know the problem, I've said that, I get suggestions that avoid the issue and I want to leave the convo but someone new keeps dragging me back
I'm not mad, I'm tired
I did appreciate the help, and effort to help really
Kind of hard to word this, so if it doesn't make sense I can add some screen shots.
In the widget blueprint, when I add a button, under appearance -> style - For each option (Normal, Hovered, Pressed, etc...) there is a bar (just above the image selector which is 'None') is a display of the button. Most of them are multicoloured, a lighter grey to a darker grey. How do you change it to still have that effect, but with different colours? Or for Hovered, how do I make it match the others?
I've matched all of the other settings as far as I can tell, but it doesn't change. In this particular instance, I don't want there to be any change to the button when interacted with.
lol My bad. Thought I switched tabs
Oh btw, "no okay but any children of it can be hit testable? " It applies what ever you set to all children, as the canvas is the root element
so that's just not true
but issue solved I added a widget base class with virtual functions
The canvas won't be the same visibility as all children.
It will if you use set visibility
Only if you set visibility on the canvas itself.
If you set visibility on the children, it will not.
No, also if you set a pointer refrence
that was the whole issue, it shocked me how many people commented without reading
Exactly why i wondered how the references were cached in the first place
are you modifying the entire widgets,
or every single widget component (containers, buttons and whatnot)
Yea, @gentle urchin it was a good question at the time and I answered you, I think haha
Not really
well
not specifically enough
Its why i prefer the show dont tell method
That might be a fair critique
especially from a debugging perspective
the variable type was "User Widget"
inb4 he's bound to weird NDA
For sure NDA dont target fraction of code?
Can it?
Never worked with NDA, but i'd be amazed if it did.
depends, if you leak a hard-coded password, they probably gonna hate you
It defiantly can ๐คฃ
even tho it's just a fraction
What's NDA?
non disclosure agreement
Ah, I see
Non disclosure agreement.
Basically don't spoil the stuff while it's in production
It really depends on the NDA wording. I'm under one. But it basically just states not to disclose anything that can harm the company.
Though NDA usually isn't that strict when it comes to sharing a small inconsequential part of the code.
Generally speaking, if you're sharing project code for help, it probably isn't cutting edge enough to be worth an NDA worry. And if it is, you probably have enough rights in the company not to worry about it. ๐
biggest problem with being told how its done vs shown how its done is that it relies on the understanding of the sender. It requires the sender to know exactly whats going on and why, which often is not the case when asking for help.
Getting replied
"I've done it correctly, just like you said"
isnt as trustworthy as showing it..
nothing personal ofc, just experience..
Something tells me that the canvas panel in your user widget is occupying the full screen
if you've got such a restrictive NDA you should probably be asking your coworkers to work through it with you instead of randos on the internet ยฏ_(ใ)_/ยฏ
You would be correct, however my issue is resolved
Ah, I forgot
This.
To be fair, him being bound to super restrictive NDA is almost purely my speculation, based on his secretive responses. Though yeah, should've asked a coworker if he's bound to one. Maybe there's a higher up incompetency going on.
I digress.
It's not like I couldn't send a picture of the variable type don't get me wrong haha
and how do you show an invisible canvas blocking a button haha
It's the code part we'd be interested in seeing, not the visuals of the widget ๐
Widget tree could also be interesting
not anymore since it fixed, but yaknow
It was a really simple setup, like really simple
That wasnt really the point xD
It was more about what it can tell us, compared to asking a bunch of random questions about something we dont know how is set up
Array of user widget pointers,
Loop widget pointers setting visibility,
It effecting the canvas,
Im trying to filter vectors using sphere trace for hitting roads. It's not working correctly, whats wrong
VS
Is that a question?
similar question
I'll assume that wasn't a real question xD
what tells you the most ๐
This blueprint code is so ugly :C
Surely it is!
so much overlap, cry
Point is, with text only you'll have to ask a billion questions to figure out what im doing, and how
with the image, we get a ton of info out of the box
Yes I think images, are more helpful most of the time yea
but no ones is arguing they arn't haha
Yeah I was just making a general observation, not about anyone specifically :)
Hey guys, Do you know how Can I add a background blur to an Item inspection ?
I tried with the widget but everything is blurred so I think from the ThirdPerson BP camera or something like that
So the item inspector is not a screen capture + render target?
noup
it's from BP
something like this
and I want to have the foreground in focus and the background with blur
๐
Hello everyone, I have a small problem with a door and a Keypad to open it. The keypad opens the door once the code is entered. I tested to open the door in multi only without the keypad, no problem to replicate. On the other hand, I use a 3D widget component in my actor with the door, and so as a 2D widget, it is not replicated. I have no idea how to replicate it for all players. Thanks
Lots of things you can do, I would suggest replicating a variable and using an On_Rep to set the visual code
You must replicate the variable inside the actor, not the widget!
So make a variable on the door, set its replication to repnotify
It should have something appear on the left, "OnRep_Visual_Code"
Go into it and use the variable to set the code visually!
Now if your making it multiplayer, you will need to think about who can enter the code into the door,
you can just send a client message to the server when they click a button
"Client 1 Pressed 1"
and you just update the servers "real" entered code
hope that helped ๐ ๐
The code entered is stored inside the widget. Di I have to change that? Or can I create the rep notify variable inside the widget bp?
Widgets cant replicate anything
so it must come to the door at some point :)
how you do that with either a replicated variable, or RPC is really up to you
but I would recommend repnotify on server and RPC for client input
Keep in mind a dedicated server can't even create a widget
even if it wanted too haha
Guys I've been following up with a tutorial. Creating a variable with a "Placeable Block" type. But I cant find this type on UE 4.27 ! any ideas ?
That's not a standard variable, back track and find the part you missed where it was created,
yea I see the widget is owning by a user, so I have to pass the numbers entered to the actor, then replicated those numbers
My UI
Yes, widgets cant replicate, actors can
Tutorial UI
@brittle plinth It looks like you'll need Depth Of Field
Maybe try asking in #graphics
Actually he just made a standard Variable
That's Depth of Field, and I can talk about it on #graphics
is there any way to update a struct to default values inside blueprints? apparently saving it is not enough, and the useful "default little arrow" is not there
What he means is, The tutorial somewhere created a class called 'Placable Block'
That is how it's showing in their list
You need to create it first to be able to use it
Ooohhh
Yeah I am only watching half through to get how a single method is done
Thanks
no not really. BP structs are fickle creatures
you could create a data table using the struct and input the default data there
but that's perhaps overkill if you don't plan to use data tables otherwise
i'm going to check it
does anyone know why my clouds wont change in game?
left clicking does nothing
That BP is not linked to controller, so it cant receive the event
hello so i made this conveyor which everything works on it perfectly now i made this cube and it falls on it and wont move any ideas? the cube is from blueprint
So are you saying the other things move when they are on the conveyor belt? How does the conveyor belt move things?
like this
using a collision box
@wet wrencheck overlapping collision is enabled on the cube
you may also use "sweep" as otherwise the model will ignore collisions
its enabled
oh how?
@wet wren
if I switch the left mouse event to event tick it still doesn't darken though
@sturdy canyonbut cloud opacity is just a float...it should be used somewhere
What do you mean by Darken?
like when I increase the slider in the editor
making the clouds go from blue sky to cloudy
@sturdy canyoni've explained, that you need to use this value somewhere, like set an actual brightness of the light etc
can't I set it in the box in the set node (100.0)?
@sturdy canyonthat variable by itself just stores the value, it needs to be used somewhere, and if it is, how it updates the actual values of those parameters that it used to control
i.e. you have f(x), and you set x, but you also need to tell, "hey, update f(x) now"
which command is that if not set?
you've set X...X by itself is just a float
there is no such command by default, if you have not defined one yourself (depends on your BP)
the cube still just falls on the conveyor
@wet wrenmake sure this returns something
I also recomment not to use tick, but use start/end overlap
the conveyor itself works if i jump on it i move or if i make a cube and enable overlap it also moves but the thing is that blue cube is in a blueprint
@wet wrenI am asking about your cube issue, make sure it generates the overlap
use break points, use logs, make sure you get the proper values on each step
how do you search for a variable inside of a struct? say im making an inventory system with structs and i need to look and see if an item has a damage value, so i can tell that its a weapon
custom function looping array checking struct data
i suppose? depends a bit on the struct i guess
also how do you make a struct have a space for any kind of variable? say i have an inventory struct and it can either take weapons or items
since struct is generally a fixed subset, why do you need to search?
i was gonna have an inventory struct that could take items inside it, or weapons or say food items that are each their own struct
Shouldn't that be an array?
No
you can work around it with maps, arrays and stuff like that, but no true wildcard
Just makes thing stupidly complex tho
You'll need a base class for your inventory items
map of strings f.ex saying attribute and value...
This is what I was thinking.
oh, that makes sense
I don't know why I couldn't focus tonight
i'll work on adding that today, i'm i a really good mood and game development helps me calm down. this is like therapy for me.
Same lol. Untill things break for no apparent reason and you spend x hours troubleshooting it
beyond that, therapy all the way : )
i feel that, but its honestly a good distractor for me, what with my autism and stress in my life.
In a map container, is things in guaranteed order? Or are they somehow inserted?
For me it would be either game dev, animating, (sometimes) modding while listening to smooth jazz or anime music.
you guys have any ideas how to make 3 shell game?
Do you mean match 3? Or something else?
Never worked with map vars, so no idea :/
(I just have yet to found a purpose to use one lol)
Im using it for my AI manager, adding path requests, with actor and location refs
the setup is working, but the order seem messed up
Do some testing, I'm interested. You can have ordered and unordered maps in c++ but I'm not sure which Unreal uses. Even if ordered it might not be the order you think. Test it tho. Just make a map, add some keys and remove some, and see what happens.
Oh, that's simple. Move the cup around, if player opens one cup, check for the bool value. That's the high gist.
Current tests suggest they're somehow inserted, but not predictably..
Adding them is pretty straight up
Yeah maps are implemented as a red black tree typically so the order will be a function of the hash I think? So unpredictable.
how would you move cups? im thinking doing bunch of animations then call random in state machiene
If I want to make a rock gradually change color to red by time under collision with a flamethrower spell, and then gradually change back to the original color, should I use event begin play or event any damage?
if you called random animations, the cups could hit eachother
A simple timeline node controlling the location ought to do it.
swap 2 and 2 cups, define offset based on direction of the cup
no it will be 1 rig and all the move variations in a state machiene
one always moves in front, other always behind
'On Damage' seems to be the logical choice here
Or whichever event your calling when affecting the rock
Is there any common "low fps" treshold one tests against?
I'd say sub 30 fps is unplayable but...
If it's a skelmesh, I think you could get away with either procedural anims, or executing a bunch of predetermined cup animations. The cup number isn't going to actually move from one position to another, so you'd have to keep track of the cup number sequence based on the anim you played.
At least that's from my observation of the same game in Watch Dogs 1.
Yeah, min 30 fps (at least according me)
For context, the minigame in action
https://www.youtube.com/watch?v=Qgd8T-FAknc
Complete walkthrough of Shell Game in Watch Dogs. See every round of every level from Level 1: Round 1 to Level 5: Round 3. The Shell Game is a street game where a ball is hidden inside one of three cups. After shuffling the cups, the player is asked where the ball lies under which cup. In Watch Dogs' implementation, there are 5 levels, and each...
Notice how in every shuffle the cups and hands starts and ends in the same position
There's only 3 possible swaps so I'd start with those 3 animations.
i think it would be easier to make with rig
Ya might be easier to just move cups and ik hands to them
The Watch Dogs example has to interact with the NPC, so it is a skelmesh.
You could make the "move animations" just with some curves.
It's just that the cups don't really move after shuffled, hence why the cups are in the same position at the start and the end of the shuffle.
Thats what i was thinking. But i feel like i cant let the AI break because of low fps ๐
Then iK the skelmesh to them and have the cups be moving the hands. Blend in and out from the rest pose to ok and you'll be mostly there
i won't be using hands ๐
The hands don't really matter tbh
Ok then you can just make 3 little curves for the 3 swaps and call it done.
I don't understand how AI would break at low fps though ๐ค
I'm just pointing out how Watch Dogs did the shuffling animation, so you could replicate it. Give a closer look on the video I linked above.
Struggles to reach target locations, often overshooting
The lower the fps, the worse the struggle
Also notice that the cups got weird motion blur at times, because the cup mesh are resetting, but the game code still keep track of where the ball should be.
Dont you think the anims just have some offset value attatched to it?
AnimA Move ball +1
midpoints values are meaningless
Yeah just define curves for the motions of the 2 cups in a swap. You'd only need 2 actually.
A 1-2 or 2-3 swap, and a 1-3 swap
The vector curves plot out the positions over time. Just use a timeline to move the cups from curve values.
Can you use LandscaperLayerBlends and WorldAlignBlend together? I want height based textures as well as a paintable surface. Examples?
Sure, just think about how you wanna blend the 2 outputs.
That is where I am lost...It appears I am alwasy missing something to put them together and which of the 2 textures that are blending should get used with the worldalign?
Just think from the point of view of the pixel. What should it look like? If you want elevation to override painting then drive the final alpha by Z. If you want painting to always override the auto material then drive the final alpha by all the layer strengths added up.
That final alpha bring the blend between the 2 types
Or you can make the auto material be a layer. So 1 layer is auto, 2nd is painted roads, 3rd is whatever, etc.
Ok, I "think" I have my head around that... This is what I have so I need to find the spot for it.
hey guys I have a doubt and I hope you can help me.
In my game I use a single widget for my pawn where is displayed speed, score and stuff like that.
Now, since I have two different game modes I placed a switchOnString on the event construct of the widget and according to the selected game mode, he will cast to one or the other game mode. Will this save me from loading both game modes or the engine is loading ONLY the game mode that he executes? Because I see that in the reference chain I have both game modes ๐ฆ I hope my answer is clear!
You mean loaded into the memory?
yes
Also that's a terrible setup mate
I know dude eheh any suggestion to make this better?
this seems like a #graphics query
Yeah use inheritance a bit more. Make a PlayerController class that spawns a widget based on a Class variable.
Make two child PCs from that and set the Class variable to two different widget.
Then use one PC in one GameMode and the other PC in the other GameMode
Or heck, you can even have the Variable in the GameMode, and make children of that
You can grab the GameMode Class from the GameState (if multiplayer), and grab the class from teh class default
There are multiple ways
But you shouldn't switch on String for GameModes
Your GameMode should actively or passively control which Widget is spawned
That said, I think if you have a cast to your GameMode class, it will be loaded
So this would also remove your reference issue
ye I was looking into something better that what I did...but to answer my question is not going to load both game modes until he executes right?
Relatively sure as soon as the Widget is loaded it will load the GameMode classes into memory
And then all the shit the gameModes reference
It's not gonna be an instance of the class of course
Since you can only have one GameMode
But the class object and all its references are probably gonna be loaded
Screnshot
I am using already one PC for each game mode, the fact is I have some animations for Score, extra score and stuff like that, and they are both different for each game mode. Should I set up these kind of things in the PC or the widget itself?
Cleanest would be having two widgets
There are solutions that are really involved
But doubt they are worth it
I thought would have been stupid doing two...but for loading it's the best apparently
Well you can make the modular, right
i checked which animation bp its using in the rifle character and its the correct one idk what might be the other issues
Elements that are the same in both can just be a second widget
And then only the things that are different can be different widgets
mm then I think I will try with two widgets...because it's easier since I have a lot of animated stuff going on inside
because i did not find the issue in 4.26
thanks a lot dude!!! really appreciate
Please print the display name of the TryGetPawnOwner return
And tell me what that is
Yeah the AnimBP is def not on the class they are casting to :D
anybody has any idea how to get hold of a physics material on a skeletal mesh on trace hit?
like trace complex on per poly collision on a skeletal mesh?
(without using the dumb physics asset, I want per poly)
Can't you grab it from the HitResult?
Not the first time ive heard people have issues after upgrading. Never got a clear answer for what resolved the issue but.. id imagine its something like that
no because per poly collision lags the game if I enable it
so I want a trace that will do per poly collision without it being enabled all the time
Wasn't the PhysMat only part of the Physic Shapes that are attached to the bones?
Not sure what you are doing then, sorry
well it's part of the materials attached to the skeletal mesh
I want to just get the material of the area I hit in the skeletal mesh
Yeah, those are defined via the PhysicsAsset usually, right?
yea.. I want it to be per poly :(
I have not actually heard about that being a thing in UE4
So probably can't help then
yea I think I'll have to find a workaround... thanks tho
@tranquil prawn are the traces all the mesh has to hit?
I only know about the PhysAsset and the Shapes that can have PhysMats
And they should return fine if hit
I want to get the material that I hit on the skeletal mesh, not on the physics asset
so like a complex/per poly trace
not sure what you mean
Have you tried make them ONLY block that trace channel? That shouldn't have any runtime cost when not tracing.
Assuming the collision system is optimized as it should be.
ahhhhhhh I guess that's a possible workaround but I'd really like to keep the physical collision for the simple collision
Is that a constant thing or just for ragdolling at death or whatever
well always, like when the player walks up to the skeletal mesh
I want it to collide with it from the physical asset
but ye I dont think that's possible
you meant game mode?
Yeah good luck. Sounds like you want both at the same time which is pretty out there.
yea.. ๐ Ill try to see if I can get what you suggested to work, if it runs well, and then work around that. thanks
Just print the displayname of the pawn owner and see^^
it is not showing
So TryGetPawnOwner doesn't even print its DisplayName? Screenshot?
Cause then it's null, which would only happen if the Owner of the AnimBP (or rather of the SkelMeshComp) is no even a Pawn.
Can you call "GetOwner"
And print from that
And don't do the cast
Just call the print string
What's the exact name
BP_Rifle_Character
What's the Parent of the Class
character
Hm, that does indeed not make sense
wait
i am not really sure what it is, i download the pack from the marketplace
its an fps pack
Open the BP_Rifle_Character
ok
character
Right
Try to use the GetOwner node on your cast
I'm not sure atm why it would fail
usually it happens because i did not set the correct anim bp on my player character
but this time everything is perfect and i still have an issue
Try to make a new cast node
same problem
im not sure if this will solve the problem, but doing a cast on the update animation event is not necessary, that's performing the cast every frame. This also does not fire at the same time as begin play for bp so it could be failing, though i would expect it to succeed a few frame later. You should use Event Blueprint Begin Play to perform the cast and store the reference in a variable there, I would print string this to double check it succeeds as well. Sorry if this doesn't help solve the problem though.
sorry, catching up on what has already been done
this might have been asked, the animbp and player bp were pre-made?
and the animbp uses the correct skeleton?
yep
It's strange that the name prints but the cast fails
Specifically if you use the same GetOwner node
i guess it might be a bug from 4.27
you merged versions?
n iop[]
no
i'd try to debug what class gets to the cast node
and my last silly question, the animation bp is hooked up to the character bp? this new one you made?
forget it i am going to start something fresh
I have a question about instancing.
Lets say I want to place 30 cubes in a level.
Each cube is a simple blank actor blueprint with a static mesh component.
Whats the best way to instance them
can I setup a static mesh instance in each blueprint, and reduce the draw calls
or do I need some kind of master blueprint that searches for these cube actors, and uses its own instance static mesh component to just kind of, draw cubes at those found locations?
Does that make sense?
https://forums.unrealengine.com/t/auto-instancing-vs-ism-comparison-4-24/138105 - looking like a master bp is better performance, if you want lods, uses hism
I'll have a little read, thank you sir
Yup, im doing it the right way, I was hoping I wasnt ๐ฆ
Thanks @brazen merlin
hey guys, how can I interact with an object but just when I am facing it
so that it's only with the camera visibility
What does interact mean
so I have an interactble object and If i am close to it I can press E and inspect it
but if am facing the other way around I can still press E and inspect
SO i just want it to happen when I am facing it
I'm guessing you are using some kind of box overlap or something then, which is probably the wrong way to do it
Use a sphere trace
I have a sphere
Thats not what I said ๐ You're missing a word
oh sphere trace, how Can i do that?
What is the Sphere Trace By Channel Node in Unreal Engine 4
Source Files: https://github.com/MWadstein/wtf-hdi-files
Bam, Matts got you
let me see
@brittle plinth @barren flower shouldn't it be a line trace?
For interaction? I mean it can be, but in that case you have to hit it dead on. Depends how much forgiveness you want
im happy if a player is looking pretty close to a switch, they dont have to be pixel perfect
so I just use a larger sphere
there is a math solution....
Sphere trace to get results, then filter by class or interface, then filter by dot product vs Forward, then select by distance. That's how I do it.
So the closest viable interaction target within a cone is what I interact with.
Theres also a UMG for getting objects under a square, but I cant remember what its called
For the facing just check dot product between ThingLocation-CharacterLocation and CharacterForward
Doesnt matter, I noticed by the question this person was new, and if they dont know what a sphere trace is, im right
So we are overthinking it
They are just using box collision overlaps for interactable, which is fundamentally a bad idea. A sphere trace is more than enough for what they are doing right now
But something like this is the ultimate solution, for sure
I just multisphere trace. Sort by dotproduct from trace direction. sort by distance, choose first applicable interactable.
Hmm I wonder if just sorting by a non-notmalized dot product would also bake in the distance good enough to behave well.
So it's like closeness x directness as the selection criteria
Wait shit the distance and angle would counteract.
I mean, multisphere trace, whatever it hits first is the closes object, its already sorted by distance by the nature of a sweeping sphere
Yeah but what if that is the ground and you want the doorknob
Depends on if you have a dedicated channel for interacting
Just throw interfaces at it till something returns a boolean
hey, ive got an NPC in behaviour trees and want to make variations of this npc with different behavior, when im duplicating it how much do I need to copy over? im under the assumption that i need a fresh behavior tree, ai controller, animbp and npc bp - the tasks don't need to be duplicated right?
I use a scene component for interaction, works great as it can store state and also has a position.
Why fresh AIController or other bps?
Just parametrize the BT and swap the personality while keeping the brain and body.
just need the bt, then tell which bt to use in the controller
thats possible? ooo
new to behavior trees so wasn't sure, thanks alot ill look up on that :)
Yeah, you basically just prune off routes you dont want it to take. So like, cop npcs might have whole routines about arresting you unlock with a single parameter of is cop or something, and crims get that disabled, but they are both using the same brain
So they use the same gunfight logic and stuff
and to get fancy, use sub trees
yeah, currently got npcs that will run up to you and attack with a sword, strafe around you and dodge and want to have variations of some that do or dont do those tasks
Oh sheet
We are going to deep now, captain
That is random
i mean
True randomness sucks if you are looking for a mix
Little trick i use
Make an array 3 length
Go through each and then reset, and mix them up again
That way its more like a deck of cards with 3 different cards
No repeats, but apparent randomness
nice thnx
Do yourself a favor and create a standard function for that
Because its always possible to get like 4 thousand 1's in a row, right?
If anything you do takes off, guarantee its going to happen to somebody
Expand the system, have and array of 9
123123 and 3 wildcards that really are random
shuffle that
That way you guarantee the distribution that feels good to human beings, and you also let good and bad luck, true randomness, play its games, but in controlled and limited fashion
get that 4 1's in a row streak now and then
could also check if the next random number is the same as the last, and roll again, even if its the same the next time, it modifies the outcome
yeah, 3 is a small amount for randomness
No, its just that humans expect to get an even amount of 1's 2's and 3's
because brains made of meat suck at math
@trim matrix Show your FP character blueprint here. Others might able to narrow down at your gun stuttering issue.
but thats not at all the case
math maybe, probability indeed
Over a thousand rolls that might pan out, but people will fucking bail long before that in a dice roll game or something
Whats this in reference to?
Issue with the arm/gun vibrating when moving.
this is just standard deviation lol
because you are spawning the gun at game start, add it as a component instead, parent it to the player mesh and link it to the socket instead of code, i would imagine that's caused the shaking. collision is another consideration
This looks fine, you are spawning a weapon base whatever that is, and then attaching a weapon to it
You also have a flip flop for aim down sights
that all seems okay
epic's random stream is just poorly implemented
let me look over this second
looks correct to me. random 1-3 averages 2 mostly, 1 and 3 less
its the standard rand() microsoft uses, pseudo-random generation
That only runs once though, right? You arent destroying this blueprint and recreating it
its not standard, epic even admit that their random is bad quality
how else are they going to get comments? making a flawless video without a single mistake? ๐
great business model
This is the standard first person template, is this it?
tutorial part 1: publically available. tutorial part 2: hidden behind paywall
Which tutorial?
I'm refraining from naming some YouTubers I know that the tutorials are fucking shit.
yeah we should go beat them up
Make your own random selector that's not actually random. Know one has to know
Game devs make false claims all the time. I think my favorite one is when they "this ai learns how to play and adapts"
@trim matrix are these the only two images? the standard fps template and this gun spawn code?
the gun shakes while moving, vibrates
id assume parenting the gun under the player mesh fixes this since it childs it rather than attaches, plus it's not necessary to code it when its the same as setting it up in the bp
Bumping the code up:
#blueprint message
Thanks, people spamming the chat with youtube comments is really annoying in a blueprint room.
Okay, so. How is this attached to you?
judging from the code I suspect it has nothing to do with the weapon attachment
This looks like a physics sim glitch
it was actually our discussion on random numbers ๐
.
is the weapon still while the character is still?
click that arrow down
I would've assumed the player character just going to launched into oblivion in the case of collision overlap.
Yep the cups are twitching ๐ Trying to figure out how to do the state machine correctly
on the right side where it says collision, can you click the arrow down?
if you really want a legit rng you would probably need to implement noise based rng yourself (https://www.youtube.com/watch?v=LWFzPP8ZbdU) for fast stateful rng their implementation is enough but they admit that its bad quality in the comment just above the random stream class declaration]
In this 2017 GDC Math for Game Programmers talk, SMU Guildhall's Squirrel Eiserloh discuss RNGs vs. noise functions, and shows how the latter can replace the former in your math library and provide many other benefits (unordered access, better reseeding, record/playback, network loss tolerance, lock-free parallelization, etc.) while being small...
It's a typical game collision thing, don't too mind about it.
the one I replied to
@trim matrix have you tested this please?
Set it to none
and test
please
owner just takes the class it is spawned inside afaik
Im saying you don't have to have true rng selection. Just make your own logic that isn't entirely random but others just won't know that
No collision
setting that isn't the same as setting the collision. it's just how it spawns
Ah my mistake, thats a different thing
Okay, Always Spawn, Ignore Collision
oh, so I thought you meant smth else, nvm
No thats different
Didn't have my editor open either
Hang on, can everyone slow down please
it spawns already so collision is technically not enough of an issue to not make it spawn
which is why I doubt this makes any difference
@trim matrix Where are you attaching the base blueprint to the first person actor?
@trim matrixin your weapon, check the collision settings on your weapon's skeletal mesh component
it says in the code, the mesh is the attach point
It's often pretty easy to get away with false claims. Sometimes people don't actually want what they think they want anyway. Just call it simulated RNG
It's the rush hour swooosh
same
but this statement still makes me smile
/**
* Implements a thread-safe SRand based RNG.
*
* Very bad quality in the lower bits. Don't use the modulus (%) operator.
*/
struct FRandomStream
...
if you can check the weapon actor's skeletal mesh component and see what the collision settings are, and screenshot them
ok but can you actually take a screenshot of your setup lol
just collision settings
on your weapon actor
for your weapon's mesh
Disable physics, set collision to ignore pawn, turn off weld simulated bodies?
Set this to relative, since its being spawned correctly
doesn't make a difference. it's not the node itself
snap to target in this case does the same
because you're already spawning it at a socket
Here in the details panel
When you select the meshes
for the gun
Set this
On both your socket, which may not have this section, and the AK
One thing worth mentioning is that the weapon is already a skeletal mesh. Usually it's not as stubborn as static mesh collision.
Usually
Sockets don't have collision.
the socket is just a component with a location, it doesn't have collision
It isn't enabled, or it can't attach.
I might be wrong, the skeleton icon could mean Static Mesh Component for all I "know".
#blueprint message
Yeah its a skeletal mesh
The collisions usually would be an issue if it's static mesh.
Just get rid of them and eliminate a variable, its the only thing I can think of in the immediate that would cause random bouncing like that, is a physics object constrained under a collision capusle
Otherwise it should simply be attached and be static
@trim matrix have you done those things?
It doesn't necessarily need to be a physics object. Even kinematic object can fight another blocking kinematic object for space when updating movements.
The other thing is that there is clearing a running bobbing animation playing. Thats the next debug if it isnt physics
I know, but it's my understanding that weld simulated bodies automatically handles collision issues even if not physics simulating. I could be wrong though, but I have had that tickbox account for collision changes
(and I never do physics sim)
If memory serves, that only applies to the direct parent component. I remember having issues where some attached things were fighting the capsule when attached to the mesh.
ah perhaps that could be it
You're mistaken. The weapon does not attach to the first person charicter, it attaches to a socket in a seperate blueprint that is then spawned in the first persons local space
just booting up unreal to take a look at the code
so it wont collide with the socket, but it will inhabit the capsule space of the first person charicter
And I suspect they either solved it, or got scared off from the flurry of pointless, directionless comments
Not a single word of that is true
Everyone's a fast typer these days.
Its not just that, they literally had nothing to offer, and clearly no experience debugging anything, they were just blurting out totally dumb things
I said the same thing about it lol
#blueprint message
No you wouldnt
well not per se launched, you would be fine when not moving
The first person character does not have physics enabled
it would constantly push against your current movement
it is able to impart force, but it is not a physics receiver
the weapon is forced into local space, it cannot move
doesnt look like it from the code. it seems to attach to a mesh component, which I would presume is the character's skelmesh (e.g. arms)
No, its not. Its the socket which is the root component of the weapon blueprint
the weapon blueprint is summoned and spawned into the local space of the first person character
So you have a sub blueprint with a sub blueprint
I'm not sure what you're trying to say
which can 100% collide with the fpc
Here's a guy who thinks very highly of himself
or where you have that from the code
It is attached to the mesh.
What is attached to which mesh
The weapon.
Where is that blueprint
it was linked in the chat
Work through it
If you'd shut up for three seconds and read instead of blurting out useless shit, you'd know.
I was originally going to ask them to post the FP character BP in full, but the speedrun is still going.
What does this do?
You just arent thinking
This spawns a socket
thats all it does

In the first person BP local space
Which then...
why would it spawn a socket?
if you look here there is no socket to spawn
I believe weapon base was weapon parent
My point is that the weapon bp IS NOT A CHILD OF THE FPC
So it does not inherit the collision capsule
it can collide with it
it is once it is attached
its just spawned there
hence, weld simulated bodies
Jeez, you folks already got the world record speedrun.
The weapon is the weapon base blueprint.
I'm wondering where this is going ๐
He's getting triggered using all caps 
Was hoping to redirect them here to let someone like Squize or Adriel thread the debugging process, but eh.
Weapon_Base was a scene root and a skeletal mesh with the AK model.
Why isnt it being added as a component
I'm going to carry the guilt, if you excuse me.
Why is it being spawned as its own blueprint, and then attached as a component
because, generally speaking, an actor is better to use for a weapon than a component
you have more flexibility
Attach actor TO component.
You can spawn it as an actor, as a component
you mean child actor component?
Ew.
By class
In my years of developing I never seen that one 
Yeee
forget its existence, you'll end up happier
Its what its for, to avoid stuff like this
Is there another way to spawn actor in construction script?
Like a procedural building etc
It's a hack that was designed for designers who don't want to bother spawning and keeping track of references.
lol wat
thru cpp
Out ๐
Sir this is #blueprint
I migrated a widget from a same version project to another but it doesn't show in the editor. However it is there in the explorer.... ~_~
you asked for another way
I mean another another way. Not gross typing
๐
Lol
You cannot spawn actors in BP construction script anymore. I think in 4.25.4 or 4.24 you could do it in a separate function and call that in the construction script, but at least in 4.27.1 they patched that out.
Right click a blank space is the folder, and select import asset
2nd from the top
You can still call the function with the spawn actor code in 4.27.1, but it won't spawn anything.
i see, doesn't show up
Child Actor Component is not as reliable as people might think.
It's not even that it's not reliable. It's just bad design.
I learned it the hard way.
What would be sweet is the Godot approach
it's unreliable, expensive and buggy. avoid at all costs
Imagine coding something as simple as dropping the weapon with a Child Actor Component?
literally spawning an actor and attaching it is the most correct way of doing this
You have to null the Component's actor, spawn a whole new actor, set up the values correctly, blah blah. All vs just detatching the gun you already have spawned, no state change besides owner and input.
Godot has an awesome system. It's just nested scenes all the way down. No split between component and actor.
yeah cannot seem to find it. are widgets excluded from migration?
I actually dont know
Right click the folder and select validate contents?
scanned 0
Is it a uasset?
When you ran the migration tool from the other project, did it say it was successful?
I know it copied the file you said
yup on it
@zealous moth are you migrating the widget BP in question or is it just a reference by another asset?
im down to that, sorry buddy, someone else might need to take a shot if that doesnt work. Ue4 should auto detect it just on the face of it and import it
the widget BP itself ๐
i downgraded it to a simple set of pictures, no data or code in it
identical engine versions?
It'll migrate into the same place in the folder structure. Check if it exists on disc. That'd be weird if it didn't.
Yeah it does, apparently its in his file explorer in the right folder
@zealous moth double check that both uproject files say the same engine version.
oh, wow, My version was a smidge behind, nah you're right @odd ember
In the new projects folders, right? In the new projects contents folders
Ahh you lead us astray, heathen!
You know what they say when you just assume
cant spell it without making an ass out of u and me
Anyway that gun is 100% self colliding physics I would put money on it
gun? oh the child actor thing?
ye
Omg yall need to get on this shit
I finally did it
these are all instanced
I made a video on this ages ago ^_^
with free project
but grats for figuring it out
look for pending kill on YT, we stopped doing vids a year ago