#blueprint
402296 messages Β· Page 529 of 403
well... maybe that means that neither of them are actually of type BP_ItemBaseInteractive
they are
i placed them myself
and i checked out the display name
i think my original blue print is corrupted somehow, I set up the filter to the last possible child class, it works. If i set it to the intermediate class it doesn't, if i set it to actors i get both results
just hook up the array element to a print string
straight up. it should print out some type info I think
this is ruining my AI movement, any ideas how can I solve this?
Would anyone be willing to help me with some simple vector math?
ok found the issue 
editor crashed, didn't save the settings of my sphereoverlapactors node, so the radius was 0 and it was messing everything up. I was too zoomed in to see
great job epic 
@dense mica you may have better luck asking that in #gameplay-ai, but at the very least you'd need to post your behavior tree, maybe some of the relevant tasks, too
I thought I saw that said 0.0...
I am just using pure "AI Move To" -- I will post this on #gameplay-ai thanks
Quick question, what node would I use to input two float values and output a vector?
I meant the opposite, merging two floats
merging?
into what? the same value for each part of the vector?
give an example of your input floats and output vector to clarify maybe
"Get mouse position" gives an x and y value as a float. I need those two values to make a single location.
as a vector
yeah, you can just use the MakeVector node
Ah, alright, I was thinking of a break node
or you may be able to right-click on the output pins from the GetMousePosition node and see if you can combine them into a vector right there
Vector2D maybe
@tight venture I am calculating a throw direction/force for a character after releasing from holding a climbable object. Im trying to find the most accurate way to add the launch force to the character on release. As it stands, Im getting the primary climbing controllers relative start, and relative end when released from the climbable object. Im doing relative because the controllers world stays the same. I want to calculate from the end to the start and launch the character in that direction.
vector2D ye
keep in mind the GetMousePosition will get you the 2DVector of the screen coordinates of the mouse, top left is 0,0, bottom right is the size of the viewport
which wont translate well to a world vector if thats what you're after
I dont know if there is a way to get the character's velocity right before release and keep it going on that path?
So, Montreseur, like a monkey swinging from a branch?
This a skeletal mesh you're working with? It have a physics asset?
Yep, kind of!
Its a character actor
so it has the movement component
ive just added two motion controllers to it
So far it seems that my vector calculations for the launch direction are just off.
can't you store the velocity and forward vector on each tick and when user release your button, you stop watching for those on tick so you get the last value, when they let go 
On grab, im setting the "First Controller start" which is its relative loc, then setting its end relative loc on release
and creating a multiplier based on the length
Am I being stupid? I made this for the text above my enemy's head but it seems to crash the game.
its just not seeming accurate
Isn't there a way to get the center of mass?
can't you store the velocity and forward vector on each tick and when user release your button, you stop watching for those on tick so you get the last value, when they let go :DankThink:
@native terrace I can try this
Here's what I'm trying to do. I want the player to move to the mouse's location, and this works well for the most part, but still has the issue of checking for the cursor's hitpoint of the navmesh instead of the general mouse position. Because the former makes it difficult to move the player in areas where there might be walk-able terrain in front of the player character.
I'd think you'd want to perform your calculations based on how the point of its center of mass is moving
@tight venture Character actors are driven my that capsule, im sure it has a center of mass
so get center of mass a grab, center of mass at release
But I feel like there is a much easier solution: add a physics asset. I'm not uber-knowledgeable when it comes to using them, but I think that's one of the things they're designed for: doing that kind of calculations for you, given you set them up properly
subtracting those, creates the directional vector?
If you wanted to do it with center of mass... um, if you recorded the location of it OnTick, you could draw a line from the second-to-last COM point before release to the last COM point before release, that would be the direction I would think
or just last COM point before release -> COM point at release
much easier probably
COM = center of mass btw
magnitude would be... ugh. bust out the angular momentum equations lol
based on the mass, the angle of the swing... I guess you could simplify it with a trig function based on the angle of the swing
@spring magnet Is there a better alternative? I tried "Convert mouse location to world location" but that only gave me issues unless I'm using it wrong
just get one axis of its momentum
but before you go down that rabbithole, montreseur, I would definitely check out if physics assets aren't designed to do this kind of calculation for you. I have a feeling they are
Okay, thats extremely helpful I really appreciat that guidance.
though that may involve a bit of set up to get it moving correctly and not reduce your monkey to a ragdoll
I guess it wouldn't be so inaccurate to just use F=ma on it. But what would a be? Since gravity is already done for you, all you'd need is the XY-plane force to apply
gravity is handling the Z-axis for you
I know what you could do, @frail marlin
I remember doing this once
it's a static mesh?
that it's using?
oh... okay capsule
fine
there is an option for "enable physics" in the details panel, right?
Yep
Turn it on right at the point of release, then freefall until you need to grab something, then turn it back off
It worked when I did it
There was a caveat to doing that though lemme see if I can find it. There was one other thing you had to do
so gravity works super good
but, just calculating the launch force of the throw
so on grab, im setting the vr cams world loc, on release setting its world loc, taking that start and end, doing a direction calc
I can't quite find it, but I remember it had something to do with the root component becoming detached
I think you had to reattach the mesh/capsule to the root component immediately after the node that disabled the physics again, to get it back to the way it was
something like that
if you just enabled physics right at the release, then the engine would take care of it all for you
does anyone know i can force a widget to be a specific size?
the widget is doing its own life based on whichever space it finds the most accomodating but i wan't it to either scale as one or don't, but rn it's a huge mess 
@near crag You can try doing a line trace to the floor (if you have a floor to trace to) from the mouse location
I've used GetHitResultUnderFingerByChannel node before with touch inputs to do just that. Gotta be something similar with the mouse input
@native terrace when you say "specific size", do you mean relative to the whole? Like 15% of the width, etc, or do you mean exact, like 104px?
@frail marlin donβt reason in terms of force but rather in terms of velocity
You want to combine the velocity your pawn has at the moment it throws itself with the one caused by gravity
@atomic salmon i am using character movement, so the gravity is handled by that and its variables
it is auto applied right after i release
So I just need to find the character's velocity at release and launch the character in that direction?
In that case yes, that should work
is there a specific function i should call? or is get velocity good enough?
Get Velocity on the CMC should return the proper value
can somebody help me out i made this spline system that keeps the mesh lenght so say 100x100x200 so the mesh dosent resize but for some reason i cant get it to work when i rotate the spline point the mesh just stayes strait and doesent rotate with the spline point
@tight venture and @atomic salmon thank you guys both very much
np sounds like vr_marco had the right answer though lol
Did that before, even though with a pawn
But itβs the same principle
With a pawn you have to implement gravity yourself. And ground detection.
If @atomic salmon is who i think he is, he made the tutorial i based my climbing on
π
Guilty as charged! π
My pleasure. Glad it is helpful to the community. π
@tight venture soryr i hop in and off. i mean like 100% of parent div 
but with parent div with a max size
to write like a button in a square that wouldn't go over 60by60px but can be scaled down i guess
Silly question but easiest way to calculate ms passed between two ticks? Think I got my delta time math off
print current time on tick, you'll get the output in the log, so you can easily substract them by hand 
Oh I'm dummy lmao
milli seconds you mean?
Also I see there's timespan structure now
Delta Time is by definition the time elapsed between two consecutive ticks
damnit i hate UI stuff 
@native terrace I think you can use a SizeBox to wrap it in for the max size
But, up until that max size, you want it to try and take up all the room it can?
uhh let me draw a lidl paint of what i wanna achieve
pretend those buttons are perfectly centerd or whatnot
i want to be able to add them dynamically, this part i already have
the thing is, they are fucked up, because they are a child widget
and that child widget's widget position get all messy
okay, so... I don't understand, of course they're a child widget of something... what's wrong then?
nah i mean they aren't primitives from UMG system
they are also a widget with like 3 primitives in them
okay so they're custom
ye
so what are you trying to do that you can't
basically text, text, and a square looking thing i managed to make 
let me relaunch unreal sec

basically i wanna have this widget, in a square shaped form, even when added on the other widget
right now it fucks up and they try to occupy has much space has they can when added to the other widget
i did try putting them in a grid panel but the same thing occured, i guess the grid occupied the whole space the parent widget gave resulting in stuff everywhere

so i wrap this in a scale box, and then i add it to a horizontal thingy on the main widget right?
all aligned at the bottom, kinda spaced out?
yup
with the one being "selected" with more graphic features so the user can see but ye
try this:
make the root/main-window widget a VerticalBox
Put 3 HorizontalBoxes in that as children. Make them each fill both directions, but adjust the value for the fill so that the middle box is like this:
---------------------
| |
| |
| |
| |
---------------------
| MIDDLE BOX |
---------------------
| |
---------------------
where you wanna align all your buttons
then you can just put your button/widget things in there, and since it's a HorizontalBox, you should be able to make them equally spaced
around the center point, by using padding and having the button things be fill vertical, and um... the middle horizontal one
the -|- setting
centered I guess it would be
actually you don't even need the padding
just have the buttons fill vert, horiz center
and then if they're too tall, you can adjust the height of the MIDDLE BOX and squeeze them to fit. Or, if you don't want their size to ever change, then just set the buttons' settings to be center for both vert/horiz. See what that gets you... I may be missing a wrapper or something, but just set it up like that and see how that looks
That make sense?
uuuh ye i'll look more thoroughly after game 
VerticalBox
HorizontalBox fill=4
HorizontalBox fill=1
MyButton horiz-align=center, vert-align=center
MyButton horiz-align=center, vert-align=center
MyButton horiz-align=center, vert-align=center
...
HorizontalBox fill=1
like that pretty much
np
I just did a ton of UMG stuff so it's relatively fresh still. But I may be missing something to wrap the MyButton with, not sure

ok lets try i guess
for now lets see when adding one widget
kinda works 
@tight venture thanks mate
padding seems kinda fooked
what's the best way to make a WHIP like weapon, something like from Castlevania?
@native terrace try wrapping all the buttons in a uniformgridpanel
one row, centered horizontally
may be easier to do that than to mess with padding settings
i mean, inside the horizontalbox they're already in, so: horizbox > uniformgridpanel > button button button
or possibly you can try using spacers to fine tune it too
very donk
I got a customer project from the web with portals that I'd like to use in my game.
HOWEVER, the project uses a "pawn" as the player by default. I'd like to use my custom character instead.
When I change the player to my character, the portals do not work.
Where do I even begin to fix this issue? Thanks!
check if the portal is somehow tied to the pawn
how does the portal work exactly?
it just looks like whoever made this did a bad job making it modular
@abstract maple I'll second the above suggestion. The "portal" probably works with a Scene Capture Component 2D that tracks the pawn location for perspective-correct rendering, so you need to figure out how that system works and make it modular.
check if the portal is somehow tied to the pawn
It probably is.
how does the portal work exactly?
Absolutely no idea. I can't follow what's going on in the blueprints.
it just looks like whoever made this did a bad job making it modular
It was free so I can't complain π¦
It could be as simple as replacing the references to the included pawn with GetPlayerPawn, but it's hard to say exactly from the outside.
Where would I look?
If I had to guess, there is some kind of C++ stuff going on because there's only 3 blueprints and they're pretty empty.
How do I even check if it uses C++ or not? Like there are no files
@abstract maple that's you recording that screen capture?
Yes
super good quality voice recording
It'd be in the portal actor
super good quality voice recording
Sarcasm? π
seriously brah. fah rayl
you must have the same mic as howard stern
or some shit
Here's the portal "pawn"
I don't really see anything "portal" related directly?
can't read any of that ^
@abstract maple I mean the portal itself. Does the portal exist in the scene?
Yes, it's the camera thing, one sec
Is there a BP for the portal?
I don't see anything calling/referencing the "PortalPawn" anywhere
I am so stumped
maybe the portal was an actor component, a child of the pawn, that he toggled set visibility on, like a third-person camera hehe
followed him around
no, but seriously, your character derives from Pawn?
My character is a regular character class thing
The default project character is a "pawn"
Not sure if it's a child or something else, but it's not a character which sucks since I can't use it. I need full functionality of a Character not pawn
what about a subsystem? could it have been in a subsystem?
In the component list is there a Scene Capture Component 2D?
it's possible the pawn in question has an extra component in it
your bp_portal has a camera holder
What do you mean?
i'll screenshot hold on
it's possible the pawn in question has an extra component in it
That's what I'm thinking, but I have no idea what it is or where to look
PortalBP
Right click and find references on that capture component. I want to see the script driving it...
just curious if that's just an empty mesh or it's got functionality
Right click and find references on that capture component. I want to see the script driving it...
this feels like an easter egg hunt for some reason
π«
I've been at it for days π’
i'm 99% sure it's the thing from my first picture
Ok, are there references to BP_PortalPawn in BP_Portal or vice versa? We need to untangle these two blueprints...
That's what I've been trying to find out
I can't find any direct refs from the PortalBP to the Pawn or vice versa
does camera holder have any code attached to it?
And I know that there are, somewhere
If I place ANY other pawn. new pawn, into the scene, the portal isn't visible
does camera holder have any code attached to it?
How do I check?
please does anyone know how i can get the real date (real life) inside the game?
in fact I just need to get the day and month
can you show the pawn's code that came with the sample
if you didn't already
oh i think i know
the add widget to viewport
@low forge Apparently you can use a BP Node called "Now" to get the current date/time
pretty sure the widget is casting to that specific pawn
or to a specific part of that pawn
The portal is a widget? πΉ
yeah
Okay let me do this:
I'm about ready to suggest you look up a tutorial for making a portal with blueprints cuz that has to exist, lol.
99% sure it is , look at the zoomed out pic , the part in red
That's the project I am trying to use
I'm about ready to suggest you look up a tutorial for making a portal with blueprints cuz that has to exist, lol.
@tight schooner It does, and they all don't work nearly as well as this one
This is the ONLY project that has ZERO glitches or artifacts.
I tried about 11 different methods
I spent so much time
This one is the best
@tight venture Thanks man π
can you zoom in on this plz
yeah.. can you look at that widget's code please
hi somebody can't explain me why my component is not registered Actors on overlap
yeah.. can you look at that widget's code please
Sorry to ask like an idiot, but how do I look at the "code"?
It looks empty
@simple dragon you can always put the overlap to overlap all
In ABetterPortalsGameModeBase, you've got this:
class APortalPawn* pawn;
referenced all over the place
can you look at it;s design
In visual studio?
referenced all over the place
@tight venture
he sets up the portal using the forward vector from that and other stuff
i know but i have water collision priest set to water on box collider and on actor set to only overlap water
in the github account you just posted
he sets up the portal using the forward vector from that and other stuff
@tight venture Is it going to be a nightmare for me to switch it over to using my character?
take a look at https://github.com/Lewisscrivens/BetterPortals/blob/master/Source/BetterPortals/BetterPortalsGameModeBase.cpp
UpdatePortals()
if your pawn isn't his special type of pawn, then that pawn pointer will be null, and all that stuff breaks
Just change the type of that pointer to be your character type
and any references to it
i mean... naive approach anyway
see if that does anything
Just change the type of that pointer to be your character type
@tight venture Could you provide me with a link or a doc on how I can do that?
I don't even know how to open this C++ code from the project
I never used C++ in UE4 before
Yeah I downloaded his project and migrated a couple of my assets into it
Oh. Well, um... you're gonna have to edit the source
or maybe you could just subclass his BetterPortalsGameModeBase and override the functions that use his special pawn type
or alternatively copy what he did in c++ to blueprint
but easiest to edit the source
:|
I have no idea where to begin on any of those suggestions
I only know like 7% blueprints and 0.02% C++
um, well when you created this project, that you pulled his code down into, you created it as a C++ project, or BP only?
or what
I just... opened his project
So whatever that was set up as, I don't even know
oh okay
so ... in the editor, under File > click "Generate Project Files"
or something like that
you'll have to open it up in an IDE, edit some of his source, recompile it, and then open the editor back up again
Okay, waiting on it to open.
So when it opens, I close it again, compile the VS code, and open it as usual?
What exactly should I be adding/changing so I don't completely break what I have so far?
when VS opens, search for the files BetterPortalsGameModeBase.h and BetterPortalsGameModeBase.cpp
Okay
Success
okay, so it looks like he only activates these portals when the PortalPawn (his pawn type) is at a certain distance away from it and viewing it from a certain angle (looks like straight-on)
the portal code and the pawn code are highly... whatever the opposite of modular is
they're intertwined
So, switching his pawn out for my own character with my n00b experience will be next to impossible?
Your best best may be to convert his PortalPawn class to work as your character class
um... let's see
@abstract maple you should look up a primer on classes and inheritance as it pertains to UE4
hey guys I have a box trigger like this and trying to get "On Component Activated" firing. however it doesn't seem to be happening.
this never fires when my character walks on it....could it be my collision settings on the actor? i'll take a look
I lost him. @abstract maple you still there?
doesn't seem like it....hmmm i wonder why it is not activating
@cosmic lagoon if you want it to fire when your character walks through it?... then you want OnComponentOverlap
and you'll need to set your collision settings for both your character and the box trigger to specific settings
both will need to have the "Generates Overlap Events" checked
and whatever object channel the box trigger is using (probably either WorldDynamic, possibly WorldStatic) will need to have it set to Overlap for whatever object channel the character is using (probably Pawn), and vice versa
how do i change the gravity of a character, like make the jump shorter
(im new to ue4)
@tight venture ah I see so I am not using the right events
I don't think so... Are you trying to get something to happen when your character walks through the box trigger, or when your character just touches it, or what
can anyone help?
@tight venture when your through the box trigger
@tight venture when I search for on component overlap it won't show up here.
so what I did was just right click on the box trigger, and add event and this was the only one availble....
I see collision is set to Trigger
can no one help with such a simple thing?
hang on dragonbally, sry busy with one thing first
@abstract maple you should look up a primer on classes and inheritance as it pertains to UE4
@tight schooner Thanks, do you have any specific recommendations?
I know content quality varies a lot source by source
@abstract maple can you help me?
How can I help?
how do i change the gravity of a character, like make the jump shorter
@mild mirage Oh, that's 2 things.
Do you want to change the jump or the gravity?
Click the very top first row
And go to the right, type "jump" in the search bar
Let me check
@abstract maple sorry, I don't have great learning resources recommendations offhand. Matthew Wadstein videos on YouTube are a go-to for every blueprinter and he might have some examples. Epic provides its own learning resources at https://learn.unrealengine.com/
Inheritance (parent classes & child classes) is a fundamental concept so it shouldn't be too hard to get a rundown on it
@tight schooner how do i make folders in blueprint manager? idk what they are called but to like group it
If you select two or more nodes, you can right click and create comment
ahh tysm
im new and learning
oh btw
how do i play an animation
e.g when they crouch
@tight venture I just went with a Box collision and On Component Overlap.....strange the trigger was not working
@mild mirage you want to gradually increase and decrease the speed when your player press sprint and released?
i got it
no of the camera fov
all i need to figure out now is how to do a crouch mechanic
and then how could i make it first person
but with a third person model
cause i wanna make it multiplayer
@tight venture yes. I wonder why I even bothered with box triggers....not sure I know the difference between that in box collision
is it when the character is inside completely vs touched? in that case I would just scale down the box so character has to walk deeper
okay so i noticed I cannot add a timeline inside a function....hmmm
nor can I add it in macros...
"latent" nodes line timelines and delays can't go in a function cuz functions are meant to provide immediate output
Timelines in particular are a component so I guess it makes sense you can't macro them
Your timelines appear in the component list and you can call functions on them
you can call an event that starts a timeline from a function though
Is there a node that would let me interpolate from 0-1 based on movement speed value ie. if my movement speed = 600 then interp value = 1, if it's 300 then value = 0.5 etc? I don't want to use a bunch of booleans for this
clamp(speed/maxspeed, 0, 1)
you can skip the clamp if you are certain of the ranges your values can take
@cosmic lagoon sry, been busy with something. Um... box triggers are just a convenient way to, well, trigger a collision. whether by overlap or hit. Really, it's just a box shape with some preset collision settings to allow most things to pass through it like it's invisible but still trigger the overlap.
An overlap occurs between two actors as soon as the slightest little bit of their bounding areas overlap. So, in other words, just touching.
Or, more accurately, that's when OverlapBegin occurs
yeah for some reason the box triggers were not firing....so i opted for a box collision and just made it smal
Neither OverlapBegin nor OverlapEnd will trigger while they're overlapping each other, and then OverlapEnd will trigger as soon as they stop touching
@twilit heath will try now thanks
@twilit heath it does work but the problem is that the faster I run the closer it is to max value where I would like it to be the opposite, the faster I run the closer to 0, how would you reverse it?
1 - speed/maxpeed
trying to use a Media Texture to play a video on my main menu screen
but it just ends up coming out as white?
took the media texture and made it into a material so the Image in the Widget could accept it
but it just comes out white
@twilit heath everything works, thank you
If I make a Blueprint Function Library, does everything related to it get loaded when I reference one of its functions? e.g. My function library has a function working on object A and a function working on object B. If I call the object A function, does the object B function, and thus the entirety of object B, get loaded into memory?
@woven kelp I don't think so, but not 100% sure. It is something I need to check on. π
If you have Unreal open, I don't, you can check. Make a FBP, and Reference 2 things in 2 different functions.
Call destroy on one of them, maybe A, then call B.
If you get a A pending delete, it means calling B, or loading the function library, requires all references to be valid.
My guess is that it doesn't care until A is actually called.
If you checkout the soft reference vid by Unreal, the dude goes over a few console commands for checking if things are loaded.
@woven kelp you don't have to call anything
everything referenced by BP function library gets loaded at game start
Oh yea?
It seems like it shouldn't
Oh..actually, maybe I'm thinking of soft references
BP function libraries typically don't contain those
and yeah, soft references would not be loaded
So if all is loaded, then I guess it can be left null until you use the function
If you don't want it to load.
Also, Zlo.. where is that dragon from?
Is it possible to load object libraries from just blueprints? I'm having trouble finding the node for it
this little guy
I'm finding lots of documentation for c++ but not really anything for blueprints
@woven kelp @twilit heath True story. You don't have to call anything. It's automatically loaded.
@mild mirage hate to break it to you but it looks like you're fairly new, and multiplayer is extremely complex and not really very well documented tbh. it's best to start with multiplayer in mind from the beginning rather than part way through, because it will just complicate things and cause a lot of trouble
unless you're doing local multiplayer in which case, carry on
how do I get the current gravity direction?
imagine a room that rotates....I need to know which direction is down
hmmm nvm i guess I already have a linetrace pointing down for each player so
I do wish answers.unrealengine.com was more active tho....asking on stackoverflow seems to get instantly downvoted
this discord chat remains the fastest way to get help...but also talking through problems is helpful.
@cosmic lagoon gravity direction is always [0,0,-1] unless you use a plugin or other ways to modify it.
can someone help me, i want to change the index of a widget switcher from another blueprint
how can i do this
@atomic salmon basically the room rotates...and I need to figure out which is left and right again....
im thinking of figuring this out via relative location from the "ground" which may change anytime
yes it is rotating only on the z axis
(which i presume is up)
so when the room rotates 90 degrees, the "right" becomes "left" and so on
and this is where I'm getting tripped up on
you can look at the forward and right vectors of the floor mesh
as the floor mesh rotates, those vectors rotate along with it
ah I see
so if you do a GetRightVector from the floor mesh, that will always point to the right of the floor mesh regardless of its rotation
thats true
one last thing is after the room rotates 90 degrees, how do I determine which is the floor?
@cosmic lagoon I assumed your room is something like a floor with walls and it rotates around the floor pivot point, so the floor remains the floor. Or not?
Is it more like a box which rotates in any direction?
it rotates in one direction
so the box could rotate 90 degrees left or right
and continue in either direction
hmmm I guess I can just get right vector for each wall
but then what bugs me is I don't know which wall is the new "floor"
how can i make a loading screen appear when a button is pressed?
i have the loading screen
as a ui widget
@cosmic lagoon you can use the dot product of each wall's UpVector with the world up vector [0,0,1]
Whatever product is closer to 1, that is your floor
make sure all the floor and wall meshes have an upvector pointing inside the cube
I will give that a shot
Is there a way to make something overlap anything else, even 3d objects in the world? I want these 2d squares to show over the grass without moving them up or removing the grass.
@quasi frost looks like a job for decals
thats not a dragon....thats a cow! lol
I have level, which I'm loading via level streaming. When I'm executing Load Game From Slot in Play in Editor (PIE) mode, I'm getting a virtual copy of this level with naming UEDPIE_0_OriginalLevelName. This copy saves all changes with level and when I close and run PIE again, this copy with all changes loading instead of the original level, which gives me a lot of troubles. How can I prevent creating this virtual copy?
Also if I try to open the original level in the editor when a virtual copy exists in Maps folder, I'm getting editor crash with error: "World Memory Leaks: 1 leaks objects and packages. See The output above." The only way to fix that is either restart the editor or open virtual copy, then the original level. In both cases, level copy will be removed.
@cosmic lagoon
HAHAHA
it's evolving!
@atomic salmon how do I get the "world up value"? I searched for it thinking it existed
oohh wait i see what you mean
just comparing it to [0,0,1]
is there an equivalent to the select element from the mesh editor for a procedural mesh at runtime?
or are those "elements" from the static mesh lost anyway when i do this?
@quasi frost custom depth most likely
looks cool like this though
like painted on the grass or somethinig
Hey can someone please help! my project was fine all day and i went and made a new level and for some reason my character wont move only rotate, the camera is stuck inside him seen in this picture and when i jump it shoots me across the map. Changing the game mode override didnt work. any ideas would be great because this is frustrating
@vernal ibex looks like a collision issue to me
anything colliding with your character?
Much easier way to fix the grass issue, just put everything on a stage lol
Any one know a clean way to clamp a vector position within a radius?
@tribal umbra you mean vector length? https://docs.unrealengine.com/en-US/BlueprintAPI/Math/Vector/ClampVectorSize/index.html
Clamp Vector Size
@atomic salmon Yes to an extent. My issue is that I'm trying to limit an actors position within a radius. When I clamp the vector size it clamps within a cubic space rather than a spherical space, if that makes sense?
@tribal umbra the function I pointed you to clamps on a sphere.
Really? oh great thankyou!
Np
@vernal ibex did you double check character controller is set tup correctly ? 
umm what should I put in object?
guyzzz
1 fast easy question, here it goes:
how can I package with my game additional .txt file?
So i can later on read from it.
It can be saved in ProjectDirectory, as it's already working for me. I'm thinking mostly about Android case, where i'm ending up with just .apk and dont want to go to device files to add my .txt database by hand.
@restive dagger well the object you wnat to cast? π
@restive dagger - definitely a reference to that ColorPickup BP. You can probably also reference to a child of that ColorPickup i think. Easiest way to do it is Get Object Of Class node.
(can anyone confirm if im right with referencing a child of that ColorPickup?)
never done it, but should work since a child b of a is an a right?
Yea, thats what i thought but never actually used it.
@restive dagger you use a cast when you expect a certain type of object from some input and want to tell unreal engine to expect that type of object
I tried to get a reference to everything but it doesn't work
Get Object Of Class if that object is on the map and you want to do something with that.
I want to cast to set the actor location
I tried to get owner
and it didn't give me any error
@bitter mason player character
thats the point of a cast you can put almost anything in and the cast may succed or fail but you wont get an error
maybe you should read up casts, to really understand whats going on
Examples of different Casting Nodes and usage cases.
its one of the few things that get actually explained in the docs
my problem is not with casts rn
Lemme explain what I'm trying to do
Here's the system I made:
you have an actor blueprint called "Magnet" when you overlap with magnet it casts to third person character and sets magnet on "variable" to true
and you have a coin pickup blueprint
On event tick
It casts to third person char and checks if the magnet variable is on
If the variable is on (true) it sets actor location to the character
My problem is nothing of that logic actually happens when im in game
coin actor code
sooo you need to put into that cast for example GetPlayerController
magnet code
Or GetPlayerPawn
Magnet should work i think
Get actual position of that coin and get player position and lerp between the two. You can do it by each tick, but it's not optimal. You can also use Timeline to do just that, which is a prefered method i think.
remember to double click on that timeline and set how fast and how long etc you want it to happen. Timelines are awesome, such as Timers.
umm I don't know how to make logic inside of a timeline
I thought the only use of it was to change colors and positions
manually
:3
Nope, everything that happens over time.
so am I just gonna put a timeline in there
and attach the execute pins and that's all?
You do Update output each frame. So each frame you take actual position and player position and lerp between that two.
Lerp value you will set when clickin twice on that timeline
after that lerp you do SetActorWorldLocation or something like that, and it's connected to Update.
I never worked on floats using timeline
can you explain what am I supposed to do inside the timeline
I know I sound stupid but that's the first time for me π
i did everything i could bro, you have everything on screens
just doubleclick on timeline and then click that float icon i hovered as above
and then rightclick on timeline and add 2 points
easy peasy
ok, i g2g work on my stuff.
Does anyone have experience in making modular building mechanics that the player can do at runtime? I am finding myself stuck in figuring out how to approach this. I have a cube shape that has been divided into many individual meshes, I have a feeling I can make instances of each of the panels and that if any of the panels are not within view by the player they can be hidden and save performance. I think if I make this cube shaped room have sockets on all sides I can enable the player to quickly snap another cube to the initial one and keep snapping to make large structures, composed of all the individual panels. So if each of these panels were components of the let's say 'cube blueprint', would those be able to be culled or hidden if they are not being looked at? Is there a (in your opinion) better known way than making each of these panels components of the cube blueprint to save on performance?
Additionally, my intent is for each of these panels to be highlightable and can be changed to other meshes if the player chooses to upgrade them individually
@glossy remnant I can't comment on modular building systems but UE4 already has its own visibility & occlusion culling systems: https://docs.unrealengine.com/en-US/Engine/Rendering/VisibilityCulling/index.html
there is also a dynamic instancing system https://docs.unrealengine.com/en-US/Programming/Rendering/MeshDrawingPipeline/#dynamicinstancing
Thanks @dusky obsidian ny I did a Ctrl+F on that page earlier to see if 'component' was even mentioned, no results. This makes me think that components would not be culled. All components (aka: 'panels' in my case) would be loaded in and nothing would be culled if I went the component route
hmm, not sure why I cannot shout your name here, sorry whoever 'Sean' is
@vernal flax Thank you so much, it has some bugs but I guess I can fix that https://gyazo.com/9315f04045a6273827f8b37747b32f57
I'm taking a look at that second link, I am hoping I can find a built in or BP solution
I don't have a straight answer for whether components get culled, but there are debug views (see bottom of documentation) where you can test it
Regarding the second link the takeaway is UE4 merges draw calls as of 4.22 automatically
You can use instancing as a tool but it's no longer necessary for draw call optimization per se
I suppose it depends what you meant by instancing π
I was thinking of Hierarchical Instanced Static Meshes...
Reusing the same static mesh (panel) over and over to hopefully save on memory useage HISM I have been looking at. Can a component of a BP be a HISM?
yeah there is a HISM Component
oh snap
ppl used to use it for optimization in elaborate ways prior to 4.22
now if you have a bunch of static meshes in the scene using the same shader material, then UE4 will auto-instance them
ah, so if I have some sort of master material or something I could make use of that
I think if a bunch of static meshes have different material instances on them, then they won't get batched
You might find more knowledgeable people over in #graphics on these optimization topics
I think I get it, and I think you have given me enough information to find a conclusion. I came here because I want the cube to be BP, and each panel to possibly be BP as well, or at least have multiple things that can be done to/with them. If these panels can be HISM components, and can be culled if not within view then I think this could work
each panel (HISM component) could be an array of different options (window, door, etc)
I have a vague recollection that a drawback of using HISMCs is they don't get culled. Or all the instances of a component together get treated like one big object. You might have to do some experimenting with the culling debug view...
if player highlights that panel, while having 'window' selected, changed the mesh and material to show a window in that spot. Maybe I will need collision boxes
oh
well, hopefully I can find an answer out there, surely I am not the first person trying to have them culled
I think I might have enough keywords to find a forum post, I'll go take a gander
thanks for the information @tight schooner
Hi! i'm looking for example for instancing static mesh with blueprint. I need to populate an environnement with rocks. I need that to be by blueprint cause the landscape is generated in game. Any idea?
How do you loop over an array of all instances of an actor?
@stiff totem googling that exact sentence shows some promising google results, https://www.google.com/search?sxsrf=ALeKk03azDK7Bnw0PrstCSJhLkS83Xg5gw%3A1599916386422&source=hp&ei=YslcX7r5Fu_P0PEP55CuUA&q=How+do+you+loop+over+an+array+of+all+instances+of+an+acto&oq=How+do+you+loop+over+an+array+of+all+instances+of+an+acto&gs_lcp=CgZwc3ktYWIQAzIHCCEQChCgAVCsBVisBWCiB2gAcAB4AIABigGIAYoBkgEDMC4xmAEAoAECoAEBqgEHZ3dzLXdpeg&sclient=psy-ab&ved=0ahUKEwi6soX_2OPrAhXvJzQIHWeICwoQ4dUDCAg&uact=5
top result for me shows a forum from 2018 https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/1411928-how-to-iterate-through-a-array-to-get-the-actor-that-is-closes
been trying to pick up a object that has replicated objects in the world.thing is i have simulate physics sleeping until i trigger a attempt to pickup this
you might be able to repurpose it
Thanks
@sonic crescent I think Brushify might be able to do the instancing of the rocks for you
and I think in one of his videos (Joe Garth I think he is on Youtubes) he talks about how to change what the instances are, and what meshes they use
@glossy remnant I don't have any landscape to use brushify onto. My level is generated randomely with staticmesh when the game is launch.
Heyo! I have this problem: https://imgur.com/a/v5n272s
In short i want my item tooltip to disappear when i toggle the inventory. Any ideas?
I'm wondering if there's any way to "switch" on tags other than a hundred if statements?
I am not experienced with widgets, but my first assumption would be that you have the inventory and the tooltip as separate widgets? If they were the same widget they would both close when you exit the widget (inventory screen)? @trim matrix
Yes they are separate. I have a function to toggle my Inventory Window inside my Inventory Component and a function to toggle the Tooltip inside my Inventory Slot widget on clicking the icon.
Can't figure it out
@sonic crescent sorry, I don't have enough experience to solve that. Hopefully someone else can assist? "Hi! i'm looking for example for instancing static mesh with blueprint. I need to populate an environnement with rocks. I need that to be by blueprint cause the landscape is generated in game. Any idea?"
@trim matrix I think somewhere you will need to specify (in a blueprint) that both of these functions occur at the same time. This might not be the best solution, but maybe when the one function is called (inventory) there is a branch that also executes the tooltip at the same time?
Hello! Can someone clarify for me please - Recently I read a comment that construction scripts are only for in level editing. I've been since then moving my construction scripts to event begin play as I go along. NOW with my bullets the event begin play doesn't seem to actually do anything, specifically setting the initial speed. Did I misunderstand? Can I leave things in Construction Script for the main game?? I think I have misunderstood!
I'm trying to spawn a particle effect on the muzzle of my weapon.. The socket is placed in the right location on the mesh but still the particle effect spawns at the wrong location.
The PE spawns at the grip of the weapon instead of where the socket is placed. What am I doing wrong?
@glossy remnant This is my toggle inventory function: https://blueprintue.com/blueprint/mb62r-nv/
I tried adding a remove from parent with a tolltip widget reference to "is valid" but that made errors
Wanting to blend from Camera D on a spring arm (character X blueprint with a camera in it) to Camera B OR Camera A on different spring arms (Some other object C blueprint with 2 cameras in it at different positions) while being able to rotate around the spring arm's that they are children of. Character X is a fully playable character, Object C is non playable object but it's location is not static.
I'm trying to work with Maps but it seems the blueprints implementation is "barebones"
for example this is the solution i came up with to solve the following issue
I have a map (name: integer) and I want to add the values from mapX to mapY
looking through the available functions, it seems iterating through map is not possible, so i came up with the solution above, which will probably not work since map values are immutable
how would i go about solving this issue ?
Hello guys! Is this the correct way to check if a product has already been purchased? Because as a tester, if I exit the game and try again, I can always buy the same product
@trim matrix I might have bitten off more than I can chew; after reviewing your BP there I have become a bit confused and I think this will go beyond my experience.
ah its fine no worries i will figure it out eventually. It just has to be annoying till i do lol.
any ideas why this trigger isnt working?
i just pass right thru it
did i miss something crucial?
Use box trigger and see if it works
yep that worked π ! thank you
Btw you should use other actor to cast to something, otherwise all the actors will trigger the action
or if it's what you want
@crystal mural From what I understand, construction scripts are executed in the editor (or if not, during packaging) and the state is baked into the level, which assists loads times. The ramifications of moving things from construction script to BeginPlay is everything pre-placed in the level will execute their scripts on BeginPlay, which could have a significant performance impact if you have hundreds of actors in the level with sophisticated scripts.
For actors that are dynamically spawned during play, I don't think there's a practical difference between construction & beginplay... Maybe your bullet velocity issue is one of those edge cases. I suspect construction happens before "activation" but idk. Maybe some component needs those parameters pre-set in construction.
Does a for each loop with break complete after the break?
Yes
@ashen sparrow Is your muzzle flash effect omnidirectional? I noticed you're not setting any rotation on it. Beyond that, dunno, sorry.
You can try a "draw debug sphere" node to see if the socket location is really reporting correctly
I am looping through all my enemy actors and trying to determine when they are all dead, what should be the right way of doing this?
I was breaking after i found one that was not dead
I've never tackled this problem myself but I think it'd make more sense if the enemies reported-in upon death to some manager BP
rather than having a manager check constantly the states of enemies
The manager keeps some array of enemies, and enemies can register/deregister themselves from that array. Or something like that.
You're seemingly using GameState, so in your example every enemy can GetGameState and let it know what's up by calling functions on it or w/e
i.e. the enemies can tell the gamestate to put itself on the LivingEnemies list, or move itself to the DeadEnemies list.
(now that I think of it, I have tackled this problem myself but not with enemies lol)
I solved it by just checking the length of the array of enemies instead of using a loop
This section is called off of a timer.
if the enemies destroy themselves upon death then yeah it should work
they destroy after .5 seconds
Another "dumb" way to handle it is by having the actors tag themselves and the GameState using Get All Actors With Tag
@tight schooner Cool thanks. Ja I put it back onto the construction script, packaged for shipping and it still worked fine! So I suppose it's fine! Another weird thing that happened was I had the bullet "health" calculation happen before the score update, so when the bullet died the score wouldn't work on the first level with the bullets' health being 1. LOL! I'm learning π
I've never tackled this problem myself but I think it'd make more sense if the enemies reported-in upon death to some manager BP
@tight schooner I do this with mine. Works like a charm. The manager counts everyone before hand, and everyone then reports when they die.
When I shoot I spawn a particle at the muzzle location. This particle represents a bullet trace.. The PE stays put in its spawned location. How would I go about moving the PE?
@ashen sparrow It really depends. A simple way to make a particle move is to give it a velocity parameter and use BP to set a vector parameter on the effect. (The exact setup differs between Niagara and Cascade but on the blueprint side it's the same.)
I haven't done ballistics so I can't give you specific guidance on the "best way" to do ballistics vfx
for pointers on the particle effect programming end of things, you could try #niagara or #visual-fx
Is there a way to get a reference to a player character from a controller?
i currently have a problem with references just being reset to "None" when i restart UE, i checked everything i changed and cant find anything that would cause this, it also only happens after a certain commit on my git, anybody got an idea what the problem could be? (please ping me with possible answers)
How do i make a delay with a random float in range delay two things? As soon as the random float in range delay has completed i want it to do two things at the same thing how do i do this?
sequence might solve your issue
Is there a way to get a reference to a player character from a controller?
@frozen copper Get Player Pawn
Can someone explain to me why my print string shows up one in two times even if I asked it to show only if my ForEachWithBreakLoop is complete please ?
and this function (GameFinished) is called everytime the player presses a checkbox of my grid mini game
Here's my grid of checkboxes
following tut on creating ai char., and OP searches for , getcont, for him get controlled pawn shows up, here nothing, what did it change to ?
get player pawn ?
Hey I want to change rotation value if rotation value is 180Β°
Any idea
To do this
@trim matrix If <get rotation> == 180: set rotation = something
so, condition node. == and Branch
Hello fellow unreal users!
I am kind of new to UE4 (think of maybe 1 month exp)
I am working on a 3rd person game where I want to control elements.
Now to the question:
I dont know how to look for it myself because its kind of specific, but how can I get access to the location in the world where my crosshair is aiming at? For instance when controlling earth i want to aim at the ground and then to make it spawn a rock from there (that can be used later, but thats not what i need help with right now).
I appreciate every form of help, even sending me a link to the answer, since i really couldnt find anything.
@hazy vortex look up LineTrace, and or Spawn Item at Location, Spawn bullet Decal on Wall
nice thank you @flat raft , it sounds like exactly what im looking for!
@hazy vortex you may also find this helpful:
oh yes this is great, thanks
Can someone explain to me why my print string shows up one in two times even if I asked it to show only if my ForEachWithBreakLoop is complete please ?
@main lake Use the Debugger. Put a Break on the Fuction, and see how it flows.
I'm really stuck on my issue any takers ? ;((
@charred berry GetControlledPawn hasn't been changed. It's a function for any Controller class. Usually specifically AIController or PlayerController.
following tut on creating ai char., and OP searches for , getcont, for him get controlled pawn shows up, here nothing, what did it change to ?
@charred berry I don't understand your question
You're trying to get controlled pawn?
inside my game , creating ai player following youtube tut, part of making it is creating a get controller pawn node, but there is no such node
Its only one yr oild
old
get controlled pawn maybe it is
ya
@charred berry Are you trying to get the controlled pawn of a Controller, or the player's pawn?
after havig made class pawn
its just a robot companion for player, in tut case, its a chase pawn
As far as I'm aware, you can only get the controlled pawn of a controller, not a character?
@charred berry Okay. Does the node you're after have a blue or green pin on the left side?
looking
First I called Get AIController, And then Get Controlled Pawn
all I know is this is part of ai move to
with timer at top of bp
with get player , and get controlled pawn nodes
all part of event begin play
can you link me the tutorial? I don't know what you're trying to do
which part of the video?
im geting ther
Get the full UE4 course:
https://bit.ly/36lJS3S
Unreal C++ Beginner Tutorial:
https://youtu.be/1dl91ORwmy8
In this video you are going to learn how to build a very simple game using Unreal Engine and Blueprint.
The goal of this lesson is to get you aquainted with the absolu...
so you just want the AI to follow you?
It's GetControlledPawn from an AIController.
that's okay
almost ;))
just try to replace it with "get reference to self"
Are you following this tutorial exactly?
ok
yes
ive never done ai anything b4 so
I hazve a huge sculpted world comop world
so adding to it over time
π
Then your class should be a class that inherits from an AIController, and you should be in that class. Right clicking and typing GetControlledPawn should make that show up.
controlledpawn isn't showing up since I started out with 'pawn' class is what youre' saying ?
or did this change over a yrs time ?
OP started out with pawn <<<
:class as in
In your tutorial, where you linked that, that class he has up. It inherits from AIController.
Top right is the parent class.
OHHH so sorry I copletely missed that lol
rathe inconspicuous place ;))))
BUT YA good ic now
whew
im pulling out of pawn as he did
and I get no get controlled pawn anywhere
let me look once more π¦
ya no all I see is get player pawn
Is your AIMoveTo inside of a class that inherits from AIController like his is?
It won't show up unless you're dragging off of a pin that is of a class that is or inherits from Pawn, and that node with the pin is inside of a controller class of some kind.
just use self...
embarrasing but ty!!
lol
OK
its ok I fully get it
makes complete sense
ty again
and here I thought inheritance was some complex c++ procedure LOL
maybe later... ;0
we are you talking about just typing 'self' from pawn >>> ai move ?
I mean I know ai controller was proper place to start
yes thats what I meant OK GOOD, ty at least for now I don't have to start over
excellent
yup np
How do I create something that functions as a delay but can be interrupted, without using a loop?
https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/1458786-how-to-interrupt-ai-behavior-move-to-and-wait ,< does that do you any good ?
My blueprint is attached. Basically, the AI is checking to see if it can see the player. But for some reason, during its wait or movement period, it never
the best I can think of is using a timer that periodically runs an event that jumps into the event I want to delay
@open crypt You can either make something manually on tick(would generally not advise). Or, simply make a timer, and use it's handle to clear and invalidate it if you want to interrupt it.
Going to have to read up on using handles that way
Let me lay out my use case
I'm experimenting with some very basic A.I., essentially simple variables that update different logic...before I even hook up any physical actors, I want to examine the logic and see how it performs....
so if I am sending an a.i. firefighter to perform a task, right now I'm just hardcoded the time to do the tasks, and moving on
so I'm going to have various phases between each task
so Fire Attack might have multiple phases, like 1 - moving to the store 2- opening/forcing door 3 - searching for fire 4- fighting fire , and so on
@maiden wadi so I am starting the first phase but also running an event that checks if the unit is done or not
Basic skeleton of the logical process
Basically I'm taking the time it takes to perform the task, adding that to the current time, and then constantly checking to see if the actual current time matches that same time plus the 30 seconds
although that last one is wrong, I have to move some stuff around to make the timer logic work, I set a variable there instead of updating it which obviously wouldn't work
Teleporting to Tavern works but for some reason teleporting back doesnt? is my code right?
Hey all, is there a efficient way to add all "new" actors to an array at a semi fast interval? So im grabbing all the actors in my map and adding them to an array. Then maybe every 100ms or so id like to add all "new" actors that arent already in that array to it, Is this reasonably doable?
I am trying to only return 2 decimal places of these floats. There were three solutions online I found and neither of them worked
you're looking for truncate aren't you?
@mental robin In your output to screens, in actual memory, or both? For the former, in regular programming you have to use additional function calls to format your string.
It looks like there's ToText nodes in the Kismet Text Library (i.e. Blueprints). They've got them for most number types. Including floats. Play around with them to figure out how you want them to display.
^ yeah if it's for display purposes, you'd need to use number formatting functions like those
Ok I have a quick problem: AnimNotify Event Nodes for Animation States (Entry, Exit, Blend complete) aren't firing. I can add them into an EventGraph, but they aren't firing.
Are you adding them into your anim bp or some other bp?
I was having similar problems and they fired fine in the anim bp, just not in other bp's :)
Not the animbp, I'm adding them into the Third Person Character BP.
I need them to turn off the capsule collider for mantling animations.
My solution was to use them in the anim bp, and have the anim bp call an event in my character bp
Why on earth does the impulse normal return a positive number on the normal level but on streamed levels it returns a negative?
(Or the opposite value on streamed levels)
I'm not sure if there's some other workaround for it but at least that way I got it working :P
i have objects inside of another object inside of a blue print, the outside object is using inverted normals and a fresnel shader to do an effect. I've set the objects on the inside up with On Clicked component events, and i've shown the cursor, and i have inputs determined via project settings. However, my clicks don't seem to be reaching my objects. My suspicion is that the container object is not letting the click reach the objects within it? if so, how do i resolve that? and if not, any clue what's happening?
@earnest tangle criminy, if that were the case then the nodes should not even appear in the TPC event graph in the first place.
@heady terrace yeah, I suspect there might be some way to get them working in other BP's as well since they do definitely show in them as well... I just couldn't figure it out :P
@vernal ibex it would be helpful if you can explain what's wrong with it
@earnest tangle I think he explained it a few screens above.
Ah musta missed it :)
wtf with that cast to nothing ;p
My problem is that I cannot see all the details in your screen grab, @vernal ibex. The resolution is a bit grainy.
Anyone Have A Good Setup For A Round/Circling Rotation Of A Camera Shake?
they look the same ;p
obviously something with ending point
place target point on map
get it selected
rightclick on levelbp
and you have reference to it
and remove that cast to character coz its useless
@untold anchor I have not done that quite just yet, but I believe your logic is correct. Check the Sphere's Collision Tab in its Details section. My guess is that it should not say "Simulation Generates Hits," but I am unsure if that applies to clicks...
could it be the booleans messing up?
rightclick on that Branch
and select Set Endpoint
then play
then game will be stopped when you get into that node you set the endpoint on
Anyone Have A Good Setup For A Round/Circling Rotation Of A Camera Shake?
@mortal wharf like, you can always parent to an object and give it more variations in certain way. Like attach camera to a sphere, make it roll, make parent of that ball and give it another dimension of movement
But depends ;p
@vernal ibex yea, test it with breakpoints so you see values of booleans
alr
Getting this weird error
Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetBlackboard_ReturnValue". Blueprint: EnemyCharacter Function: Execute Ubergraph Enemy Character Graph: EventGraph Node: Branch
Only happens on actors created from "SpawnActor" node. Any ideas on why?
@feral granite send nodes
you are providing a bad reference to that branch
you can also use IsValid node to check if the reference is correct before you try to access it.
@heady terrace
Creating the actors
i don't have that checked unfortunately
@untold anchor bbl
bbl?
Try WaitForValidate for example. But that function seems wrong. Also you had that NONE in Branch somewhere, so start there.
Check if those are valid before you test on that branch
like IsValid and print when false etc.
@vernal ibex yea, game is stopped, check your bp, should be opened already.
Test that with Play in Viewport
OKAY, 3 more questions and im going back to work.
xP
@untold anchor sorry, needed a quick break. I haven't done much mouse stuff yet. But try configuring the big sphere to use a different collision channel than the inner containers. Then when testing for collision, set it to a different channel.
@vernal flax I did a 'IsValid' check and did get some prints from being not invalid. But why wouldn't my BB valid? Just hasn't be initialized yet?
well, i removed the sphere temporarily and it's still not clicking to the smaller objects, so i think my original hunch wasn't correct
maybe, try with WaitForValidate (something like that)
There are a lot of issues where just adding delay does magic.
@untold anchor good! You know what's not wrong!
That helps. Trust me.
@untold anchor How are you running hit tracing with your mouse button clicks?
i really simplified what i'm doing cuz explaining it is a bit more difficult, but boiling it down, it seems to the "simple" issue i'm dealing with
i'm not running a trace, i'm using the mesh component event on click
What sends On Clicked event to that MoonFish?
that's the thing lol, it doesn't have one?
it's a functionality of the engine now from what i've read
these base events can just be detected and trigger
@untold anchor Another way to do it would be to use a "Get Hit Result Under Cursor" node in response to an lmb click event.
as long as you have them active
@vernal flax are you implying there isn't an event system raising the OnClicked event for that actor's mesh?
Just asking, i dont know anything about that project, wanted to help so just asking for essential thing. Idk if it's VR game or mobile game or 3d or 2d. Now I can assume more ;p
it's a 3d game, one sec, i'll record a video
demonstrating what it isn't doing and what i can't get it to do
don't mind the missing materials lol, making them as i wrap up each part of it's functionality
embrace the jank
lol, uploading
basically, have two fish, when i click the blue one it needs to change the little sky thing into the night version, and when clicking the orange one, it turns to the day version
have the functionality working, and set to a keybind currently
now trying to get it to work on mouse click
The mouse click will never trigger unless you have pressed the K key, though.
welp i got the teleporter to work once and then it broke again :/
oh wait nevermind
how so? o.o;
sorry, I screwed up. It should work.
yea, just two events currrently doing the same thing, cept one is going through a boolean, i bypasssed it for testing purposes of course
You are unpossesing your pawn? Or how is transition done?
sot he transition is done having two cameras on the objects
object
and of course, i have a camera on the player
i just used a set view target blend
put the cameras on some spring arms
@feral granite are you still having issues?
and then feed the mouse movement x and y into some rotational math
to swivel the spring arms around
this blueprint isn't a pawn, just a skeletal mesh actor, it's not posessable from what i understand
i see. Okay, so you can definitely set custom collision channels just for that. You can also set collision off to that inside out sphere when transitioning to another camera
so i did a test
@vernal flax he should use collision detection, though. I don't know if OnClick uses collision detection.
then don't use it. π
but it's a feature >_>
yea, k does the day night switch
i want to make it so that when i click the fishies it switches instead
Try instead using "Get Hit Result Under Cursor by Channel" node, triggered by a left mouse button click. Find its object. And then run whatever you want to on it.
It seems more complicated, but just put the nodes into a function.
yea, try that one
then break the Hit struct into pieces, find the Hit Actor, and print its name.
You might need to put your fishies into a unique channel.
well, they will be far from the only things that behave this way
as my goal with the "UI" is to have most of it exist within the world and gameplay
check just for tag then
and only resort to overlays as little as possible
so get hit result under cursor by tag?
if that's a node, then sure. ^^;
hit result under cursor will give you plenty options
go test it out, just rightclick and break red or blue output of that search under cursor node
i think most of keypresses and events like hit result under cursor should be done in Player Pawn or Player Controller and then passed onward. But that's probably just multiplayer thing, in single you should get away with that.
it has no execute in or out X_X
i've never used cursor / mouse stuff before
hence my excitement when i saw a giant green button promising to make it pretty straight forward XD
use a mouse click event
It's easy. Just like using keys. when a click occurs, an exec pin will appear. Drag that into the Print String node's exec pin.
oh, gotcha, it works different than the other traces then
yeah, huh?
yea, ray trace has exec's
my fishies don't go into it i figured i could use the physics assets on them but, don't see a way to get my physics assets for the fishies there to make the array
Hey, I have a problem. I'm trying to set my character's Capsule Component's Collision Type to **None ** in my AnimBP's Event Graph using TryGetPawn->Cast To Third Person Character -> CapsuleComponent -> Set Collision Enabled (No Collision). It doesn't work.
I can do that just fine in the TPChar's event graph, though.
isn't the pawn's capsule inherited?
Mippi, in that array you set which collision channels you want to test for
(i think, if i recall correctly)
@untold anchor nope, they're not compatible. Have to cast.
Set reference to that capsule somehow
Like, on beginplay or get component with tag or something like that.
it asks for an array
how you made one?
you should drag from dark green to the left and then Sugestions should help you out
It should be fine by default
those are my contectual options
and if i don't put anything there, it throws an error
right, wait a se
by channel maybe?
and yea, i was right, just drag from that array and Make Array
oh, i see you had it already before. So check that other Get Hit Result Under Cursor
by channel or for objects?
whatever makes you happy (so w/ works)
i'm guessing by objects, since you have the array spot there
@vernal flax That does not work either. :/