#blueprint

402296 messages ยท Page 841 of 403

odd ember
#

as in C# properties? no

#

even cpp doesn't have that

topaz badger
#

If you need to call a function on an actor, would it be better to use blueprint interface messages rather than casting?

odd ember
#

interfaces are expensive compared to casts and given that they lack logical implementations, it's rare that they need to be used

topaz badger
#

I thought casting loads the entire object including meshes, components etc., so interfaces are still worse?

odd ember
#

casting runs up (or down) the hierarchy in search of the class to see if it's compatible

thin panther
#

Ive heard many people say it, as an explanation for soft object references

odd ember
#

so at worst you're looking at a running time of O(n) where n is the size of the hierarchy

odd ember
#

the variable in question is a pointer

#

loading an object and casting it are two separate things

topaz badger
odd ember
#

by the time you're casting an object it's already loaded, unless it's a static class cast

thin panther
topaz badger
#

gotcha, thanks

odd ember
#

a BP cast costs about as much performance as a branch

#

a little more than that

#

but ballpark

topaz badger
#

very intresting

#

i did not know that

thin panther
#

I assumed the way casts work is it would find the pointer to the UObject you need, and if you are getting a pointer, that means its in memory

topaz badger
#

most things from epic treat casting as the boogie man

thin panther
#

i thought it was a load of crap

#

could always avoid casting and make everything in 1 bp

topaz badger
#

haha

thin panther
#

character, weapon systems, timers, all in one AActor

odd ember
#

but it's nonsense to say that it's more expensive than an interface call

#

the rule of thumb is if you can make it a hierarchy, use the hierarchy

#

if you can't, use an interface

topaz badger
#

gotcha, thanks a ton for the clarification

thin panther
#

I don't think i have ever needed an interface

#

I generally have interactables stem from one master class, then specialise that logic where needed

odd ember
#

there's different ways of doing it

#

having a hierarchy of interactables is an OK way of doing things

#

I tend to use components to give interactables interaction and contain the logic, which allows them to register themselves to the player's interaction manger

#

which makes the workflow as simple as adding an interactable component any time I need that level of functionality

gentle nebula
odd ember
#

and that will be the same whether it's an NPC or an item

thin panther
thin panther
#

ah lol

gentle nebula
#

Yea sorry i wanted to reply to something you've said about interfaces but ended up writhing another thing

gentle nebula
thin panther
#

use a struct then in c++

odd ember
#

you can already have a set of variables in BP

gentle nebula
thin panther
#

you can make bp structs but then the people over at #cpp might want a chat

odd ember
#

if you can explain what you're trying to do you may get better answers

gentle nebula
odd ember
gentle nebula
#

i've seen an example to something like i wanted to do

odd ember
#

you can approximate them

#

but they can't be generic

#

in the way you have them in C#

#

BP doesn't even support generics

#

and cpp doesn't support properties

#

so you'd have to make them based on a custom class

#

and then you're in macro or function library territory

thin panther
#

but you could always write a struct in c++ and use the provided get set methods

odd ember
#

structs in BP are generally meant to be read only

#

writing to a BP struct is not recommended

#

and a struct isn't the same as a C# property

#

which is basically a variable that allows for special custom get/set methods that can do more than conventional get/set methods

thin panther
#

ah, not done much c# outside of very basics, but doesn't change the fact that it doesn't exist in c++

odd ember
#

I mean epic made interfaces for UE, as those don't exist in cpp either

#

so I guess they could make properties at some point

#

but I wouldn't bank on it

#

it would also require BPs to have access to generics, which I'm not sure they are willing to do

gentle nebula
odd ember
#

I assume you're coming from unity because of the concepts you're mentioning

gentle nebula
#

Yes

#

although even with unity i was never an advanced c# programmer

odd ember
#

a generic is a type of parameter that takes any type of variable

gentle nebula
#

Ohh i see

#

So no generics ?

odd ember
#

no generics

#

in macros they are available, but macros suffer from other issues

#

you could try using a macro as a custom getter/setter

gentle nebula
#

There can be a macro in blueprint with generics?

odd ember
#

yeah they're called wildcards

#

but it's limited functionality

gentle nebula
#

very interesting

odd ember
#

it's the closest thing you get

gentle nebula
#

If i want to simply have one specific variable of a specific type, it would be much simpler?

odd ember
#

also of course arrays, maps and sets allow for any types

odd ember
gentle nebula
#

lets say i have a string, each time it gets updated i want to run a save function

odd ember
#

because maybe you're trying to take a unity technical concept and translate it directly

#

which may not be possible

#

that's why I'm asking for use cases

#

rather than technical questions

gentle nebula
#

I know there are other ways of doing it, but for example you've changed the character name, it would automatically update

#

Because the string "character name" had changed

odd ember
#

if you change a character's name you don't need to change it until the user commits

#

so when they press "enter", that's when you can do that functionality

gentle nebula
#

that's why character name is not the best example

#

In my case,

#

i make a productivity software using ue4

odd ember
#

well then give me the example you want to use it in

gentle nebula
#

i have notes

#

i want text to save at any edit

odd ember
#

I think widgets have some delegates exposed for that. but other than that you'd have to create your own widget type

#

in cpp

gentle nebula
#

ofcourse there would be a countdown that would figure if you left it alone for few second before saving

gentle nebula
odd ember
gentle nebula
#

you didn't meant inheriting a widget class? "creating your own widget type"

#

sorry i misunderstood

odd ember
#

you would then be able to bind that delegate to any function you would need

#

first step would be to see which delegates are already available for textblock/rich text block

gentle nebula
#

I think my questions were answered, thank you very much

odd ember
#

2:07, there's an OnTextChanged delegate

#

so you could try using that

gentle nebula
trim matrix
#

sorry, whats the event thing that starts when the blueprint enters the scene?

#

I thought it was event ready but no, its not

#

found it, beginplay i think, please lmk if its not and im dumb for using it otherwise thank you

granite scaffold
#

Hi all, im trying to make a very simple quest state system that progresses in a linear stage (stage 1 to 2 to 3 etc). I have the logic for progressing the stages and all that done, but I'm struggling to come up with a good way to have things happen when progressing to a new stage (such as activating/deactivating objects, spawning/despawning, etc).

What i have now is just a big switch that uses the stage index, and it works ok, but if i need to rearrange the order of the quest or add new stages in it's very unwieldy. Picture attached

Does anybody have any ideas how I could make this a little more user friendly? It does not need to be overly robust - im not building an RPG.

untold mist
#

then you could insert new array indexs or even set array element

granite scaffold
#

Yep, I think thats a winner. thanks heaps!

#

actually, maybe even better, i can switch on string instead and use the stage names

topaz badger
#

do collision objects parented to a mesh in a player character not have collision?

trim matrix
#

I think they have to be children of the character?

#

ive only ever seen it set up like this or something along those lines

#

but they should have collisions at least, perhaps your checking for collisions too low down the hierarchy? idk

upbeat inlet
#

Does it matter what year version I get?

trim matrix
#

the engine recommends 2019

#

also make sure you have the right .net code or whatever

topaz badger
trim matrix
#

Well here the collision is done by capsule component here. I'm hardly profficient but I'd imagine you'd need more collision objects like the capsule

topaz badger
#

yeah, ill look around, thanks for the help

trim matrix
#

no worries

gentle nebula
#

Is it possible to remotely bind events?
Lets say i have actor A, and it has some logic that at some point,
would use actor B reference to bind "actor B event" to "actor B dispatcher", and all that at actor A event graph.

I can open actor A event graph, add cast to actor B node => bind event to "actor B dispatcher".
But now how do i reference the event(actor B event) i want to bind? Not possible?

placid moat
#

I'm using instance static meshes in a blueprint actor to create a procedurally generated map. I've gotten what I need from that but I need a way to procedurally place lights around the map and cannot find a way to do so. I have a blueprint actor with the static mesh/light source but I don't know how to repeat it throughout the map without hand placing all of them. Any ideas?

brazen merlin
high sapphire
#

Oh jeez, I'm only just now seeing this, sorry
Yeah, I'm not sure why though. Did I set it up incorrectly?

trim matrix
#

https://www.youtube.com/watch?v=IAem3gztZ7g&ab_channel=Crimson @gentle nebula ~11:00 this part covers that if i understand your question right

In this tutorial, I'll go through the process of making a simple interaction system using Blueprint Interfaces. Feel free to ask any questions and provide feedback if you feel like certain spots aren't explained well since I want to improve in creating these kinds of tutorials!

Line Traces: https://docs.unrealengine.com/4.26/en-US/InteractiveEx...

โ–ถ Play video
#

Which leads into my question, so i have an object detect when it is interacted with, is there any way to get which blueprint interacted with it?

#

In this case i have a piece of food that the player can select by pressing e while pointing at it, I would like its response to be altering the players health in this occassion (and in this case the player blueprint is the thing that casts the ray that selects it)

#

or i guess the better way to phrase it is how do i find the actor that is colliding with my box collision?

surreal peak
#

Interaction systems are usually done via Interfaces, where the player doesn't have to care about what they trace

#

They simply call an Interface function on the traced actor

#

And if that actor implements the interface and that function, it can do stuff

#

E.g. your piece of food can implement something like OnInteract, which passes the Player who interacted along, and change the heath in the override

#

I haven't looked at that video though

trim matrix
#

this uses interfaces

#

I think the issue may actually be print not... well printing?

#

anywhere at all

#

wait now its working

#

wat lol

dawn gazelle
gentle urchin
#

Then im sure you might aswell just cast it from the get go

trim matrix
#

i think ive narrowed down the problem

#

this is when i cast the ray, i see it collide but the print statement never prints

gentle urchin
#

so the hit actor doesnt implement

trim matrix
#

the does have the interface

gentle urchin
#

interface is none aswell

#

you must select an interface to check for

dawn gazelle
#

^

trim matrix
#

wdym?

gentle urchin
trim matrix
#

the guy in the video didnt select that either

#

doing it now

#

ah that works! He musta cut it

gentle urchin
#

never trust youtube tuts ๐Ÿ˜„

trim matrix
#

Or maybe im too blind, but i did look at that part specifically so idk

gentle urchin
#

trust us ๐Ÿ˜ˆ

trim matrix
#

well thank you! Saved my from scrapping this one

#

well.. the validating check is breaking, but it should be on a layer where the only thing that can collide is the the interaction sooo

#

goodby validated get ig

#

oop bad idea

#

lmao

gentle urchin
#

got ue5?

trim matrix
#

yep

gentle urchin
#

Stack'O'Bot can be a nice project to look at

#

relatively well commented

#

there's a livestream going through it aswell

trim matrix
#

ooh maybe, but right now I'm just trying to learn as i code. Tutorials are usually pretty rough for me which is why im struggling here but the docs for unreal are..

#

well not much compared to past engines?

gentle urchin
#

the docs for unreal are.. unreal indeed

trim matrix
#

oh back to square zero, i've got the interaction working, i just need a reference to whoever is doing the interacting

#

and for some reason a variable with my player character just doesnt work

gentle urchin
#

How come you need that reference?

trim matrix
#

so character raycasts object using interact

#

then i try to call back to the character to add a variable

gentle urchin
#

looooopdiloop ?

#

What variable are you adding

trim matrix
#

then the character receives

gentle urchin
#

right so you do implementation both ways

trim matrix
#

Variable is a reference to a character

#

Idk how to hand over the reference through the interface

gentle urchin
#

im just not sure this is the way i suppose ?

#

If this is some consumable

#

Either you consume it directly,

#

or you add it to some inventory

#

if its ment to be added to an inventory

#

it'd be better to use some struct of GameplayTag and just pass that to the character

trim matrix
#

And what would the better way to consume it directly? Ideally I'd be able to select it with a raycast and be able to pull info from it

#

GameplayTag? havent heard of that, I'll take a look

gentle urchin
#

Its a Tag in a nice hierarchy

#

Item.Fish.Fillet ๐Ÿ˜„

#

has a few handy functions to it aswell, with compare tag, compare exact etc

#

there's also containers for them

#

which can contain several at the same time etc

trim matrix
#

I'll have to look into that, looks good

#

But would there be a way included with that to detect which tag im selecting with the raycast?

gentle urchin
#

The object would return its tag

trim matrix
#

okay good good

gentle urchin
#

there are many ways to do this, im generally not using interfaces so im not sure whats common here ,

dawn gazelle
# trim matrix Idk how to hand over the reference through the interface

If you want the interaction code on the actor that is being interacted with, but want to manipulate something with the actor that did the interaction, you can add an input pin on the interface. If you have a common class that all your characters share, then use that class as the input type for the interactor. You can then pass back whatever you like to the interactor, or get whatever data you need from it.

trim matrix
#

Oh I appreciate the suggestions

#

I'll have to look into that, already scrapped the code but doing it properly from the start may result in a better outcome lol

sharp rapids
gentle urchin
#

Less accuracy

trim matrix
#

I'm not entirely sure but I can imagine stretched textures?

gentle urchin
#

if thats fine, then no

trim matrix
#

oh that too

#

what is the primary impact of landscapes? Polygon density or textures?

pale iris
#

I need some help when I drag and drop a pawn from the content browser onto the level the movement works but when I spawn a pawn onto the level it does not move and I turned auto possess AI to placed in world or spawned but that doesnt seem to work

maiden wadi
pale iris
maiden wadi
#

Or wait, that's set actor location. I'm confused. You asked about a pawn moving, but this is spawning a building and setting actor location directly?

pale iris
#

Sorry I meant spawning actors and then getting them to move

trim matrix
#

Hey, is it hard to replace the character in the ue4 templates with, idk, for example a cube?

#

so I can move that around instead

last coral
#

attempting to select a texture based off the vertexcolor i have stored... cant seem to figure out a way in the material editor. Anyone have suggestions? I'm hoping for somewhat of a multiplexor, where i can put in 0-255 and get one of 256 textures...

inland gust
#

Hi guys, I need your help. I would like to measure how many time different control rig takes when my level is launched.
I start to take a look to the Timers, is it a good way? Are there other ways?

neat stream
#

Hey guys, Is there a correct way to insert at "index" when using a map? without generating 2 arrays...

#

yes yes I was using it the wrong way

#

If I want index it has to be the key

#

thanks

burnt citrus
#

hey Can I use "attach component to component" with "Blend"?

icy dragon
burnt citrus
icy dragon
#

You could keep the world position when attaching to component, get the relative position, and then do the VInterp To the socket position.

burnt citrus
#

ummm I can't understand

#

is there good example?

unreal quail
#

is there a way to pause a behaviour tree after starting it?

dusk rapids
#

Hey, how can i get the location of the sequencer camera in a blueprint file?
I'm currently using the level blueprint and directly referencing the camera actor but it doesnt actually update the location when my sequence is playing, it just says x:0,y:0,z:0

#

youll notice it says 'unknown' this keeps happening every few minutes

#

as well

#

where the reference to the actor just becomes 'unknown'

gentle urchin
#

What are you trying to do?

#

wouldnt it make sense to just make a level sequence?

dusk rapids
#

trying to have an object in the scene always face the camera

#

i am using a level sequence

#

thing ive circled in red is what im trying to get always face the cine camera

gentle urchin
#

Is it a component? widget?

#

getting camera manager should suffice should it not

indigo bough
#

Hey folks, I'm capturing world depth into a RT to use as a rain occlusion method. You can see here it is working, but because of the fact the capture is happening out of sync with the character movement, you can see it flicker/wobble as you move around. Is there any decent way around this?

One thought I did have, was to snap the scene capture between 'grid' coordinates instead of moving perfectly with the character. It would mean less RT draws as well of course. As the player moves around, the 'nearest' grid point is taken, set the position of the scene capture 2d, and update the material on it's location?

#

(For what it's worth this RT will be used for other things as well, not just rain occlusion)

#

Moving the tick group did help a little (makes it less intense), but it's still there sadly

#

Reason I'm asking here is the grid snapping approach will take some time, and I don't want to overcomplicate it if there is an easier way to stabalise the result

odd ember
#

I think at this point you may be fighting with the graphics renderer

#

which for good reason isn't exposed to BP

#

probably some variation on z fighting

drowsy flame
#

hi I have event dispatcher in a widget, and it is successfuly binding, all casting is fine but for some reason when i call the dispatcher from the widget the custom even it's bound to isn't firing pls help

#

F insulin isn't firing

odd ember
#

time to get the epipen ready ๐Ÿ˜”

odd ember
# drowsy flame

can you show the full code? what is setting up the dispatcher?

drowsy flame
#

ill have you sign an nda

#

this is from the widget

odd ember
drowsy flame
#

bind event is setting up by begin play in level blueprint.

#

this is getting called from a widget. I have its ref in widget controll bcs its easier for me

odd ember
#

right but like I said I can't see what's going on so it's really hard to give any sort of advice

#

if you're under NDA I'd take it up with the team you're working with instead of posting here

drowsy flame
#

I was joking about NDA, but sure I can show you all my bp

#

its a mess though

gentle urchin
#

Really sounds like the binding isnt working in the first place

odd ember
#

I'd suggest to clean it up, if not for everyone else then for your own sanity

gentle urchin
#

As in not bound

#

there's not much blocking a dispatcher from firing once its bound

drowsy flame
#

hm maybe i have two instances of a widget one on top of the other and I am binding to one but trying to fire from the other one

#

on accident

tender gorge
#

Having an issue. I made a function to spawn a Tile Map and then a function to spawn a background behind it. I then added a Delay and Destroy Actor to delete these after 20 seconds. My issue is the Tile Map gets destroyed but not the Background. Why could this be?

slow pewter
#

How to get Widgets they was Added dynamically on Viewport, get Fullsized ? , like in Editor i can doo it easily per Anchor, but at Runtime its not that easy, even if i edit Anchor Data thats not working like in editor

drowsy flame
tender gorge
indigo bough
tender gorge
drowsy flame
#

I think you probably spawn it on accident as a seperate thing

tender gorge
tender gorge
drowsy flame
#

and show me

tender gorge
drowsy flame
tender gorge
drowsy flame
#

so you are making a background actor which doesn't belong to the tile map actor

tender gorge
tender gorge
odd ember
#

I would recommend steering clear of child actor components

drowsy flame
#

i heard they were unstable

#

but seems fine

odd ember
#

they're bulky, buggy and perform terribly

#

spawning and attaching an actor is infinitely better

tender gorge
#

No sure how to do that.

odd ember
#

spawn actor and then attach it

tender gorge
#

How do I attach?

#

Do I do it in the same Blueprint?

#

I've never done it before so I have no clue.

odd ember
#

if you look for nodes with attach I think it's pretty self explanatory?

#

unless UE5 does things differently

drowsy flame
#

try this

#

for the parent actor just write self and attach that, for target use your new spawned background actor

#

i think thats should work, never used it

tender gorge
#

So do I just use my next function after this? Like Spawn Tile Map Function --> Attack Actor --> Spawn Background Fucntion?

drowsy flame
#

just put it after spawn actor in your spawn background event

tender gorge
#

Inside the function like Spawn Actor --> Attach?

drowsy flame
#

yeah spawn actor to attachactortoactor

tender gorge
drowsy flame
#

oh yeah try that

tender gorge
tiny frost
#

does any one know how to get the velocity moving away from a point

drowsy flame
tender gorge
#

It won't even let me select a class that I have

drowsy flame
#

ah ok I see

tender gorge
#

I tried searching up videos on YouTube but couldn't find anything, but I also just could not know what to look up exactly.

odd ember
tender gorge
#

Is there another way that I could do this where it still spawns as background and gets destroyed that I'm not thinking of?

#

Keep in mind that I'm not a Blueprint vetern, just a noob.

odd ember
#

you spawn an actor, then you attach it

tender gorge
#

in the Background function?

odd ember
#

what does the background function do? where is it located? how does it relate to spawning the actor?

tender gorge
#

Can't snap it to target because they'll overlap.

odd ember
#

isn't that what you wanted?

tender gorge
#

No I want it to spawn where it is suppose to and then be destroyed after the 20 second delay. It's a background I don't want it to spawn ontop of the Tile Map in front of it

drowsy flame
#

Ok I figured out the reason why my event wasnt firing so it's binding the event to the dispatcher which it didn't manage to create yet (lol)
basically it did step 2 before step 1.

#

delay fixed my issue

odd ember
#

code generally does what you tell it to do

untold mist
tender gorge
#

It's supposeot spawn behind the Tile map -50 units behind the Tile Map.

odd ember
#

so if you don't want it spawned where you have it, change the transform to spawn where you want it

drowsy flame
#

yeah you just call function called transform on the actor

tender gorge
#

It is spawning where I want it to. The problem is it won't be destroyed. Setting it to snap parent like you said makes it spawn ontop of the Tile Map which is not what I want.

odd ember
tender gorge
#

What do you mean?

odd ember
#

well if you want it to be destroyed, you have to set it to be destroyed

#

where is that being set? in which class?

tender gorge
#

I have it in the image I posted earlier but I'll upload another one

odd ember
#

yeah that doesn't show which event is triggering that

#

also that just destroys the tilemap

tender gorge
#

I have no iodea what to show you then

odd ember
#

so if that's what you want, sure

tender gorge
#

But I need the background to be destroyed too

#

Which is the issue I'm having

odd ember
#

okay. set the background to be destroyed as well then?

odd ember
tender gorge
#

How? Where do I put that? I already put another destroy actor in there ontop of that one and it doesn't work.

#

That's at Begin Play.

odd ember
#

cool

#

so 20 secs after beginplay you want it destroyed

#

when you spawn the background actor

#

take out the spawn pin and promote it to a variable

#

you can forego attaching it as it doesn't have relevance here

#

unless you want it to move with the tilemap

tender gorge
#

I have no idea what you mean by take out spawn pin and promote it to a variable.

odd ember
#

the pin on the spawn node

tender gorge
#

No each spawn Tile Map has its own background and thus needs to be destroyed when the Tile Map is.

odd ember
#

cool, so keeping that in mind can you try the above?

tender gorge
#

Yeah no problem, just don't know what you mean. What pin on the spawn nide?

odd ember
#

the actor that is spawned

tender gorge
#

The Class pin?

odd ember
#

the other side of the node

#

return value?

tender gorge
#

Return Value?

odd ember
#

pull it out, promote it to a variable

tender gorge
#

Ok.

inland gust
#

Hello, I would like to input the letter F for example and print string hello, impossible to do it in a project from scratch but it works on the ThirdPersonCharacter in a Top View Project.
Only, impossible to redo it from 0 in an empty project

tender gorge
#

then target that variable with a destroy actor?

odd ember
#

it was my understanding you want it destroy WITH the tilemap?

tender gorge
#

Ok. I'll check it out.

#

YES

echo salmon
#

Hello i have a questiont that bothers me . Lets say you get the Vector location of a static mesh and you get its Z value , and compare it with the same static mesh but this time you get the VectorUp location . Whats the difference between those 2 ??

odd ember
#

so once you have the variable, you can pull that variable string out and "bind to on destroyed" I believe

odd ember
echo salmon
#

so basically it will always pointing "up"

odd ember
#

what?

#

what do you mean by that?

echo salmon
untold mist
#

Similar to forward vector and right vector

echo salmon
#

ok ty all

tender gorge
echo salmon
#

@untold mist basically is always the Z positive ?

#

locally

untold mist
odd ember
#

that's the local up vector

echo salmon
#

! perfect ty

odd ember
tender gorge
odd ember
#

global pivots will always point towards global up (0,0,1)

odd ember
tender gorge
#

Ok, so just increase the time.

odd ember
#

or destroy it relative to player position?

tender gorge
#

That would work too, but how do I do that?

odd ember
#

you could have a collision component on the tilemap positioned in such way that when the player overlaps, the tilemap gets destroyed

#

I don't know the parameters for your game, but if it's an endless runner I'd consider that

#

or equally, if the player leaves a collision volume, the tilemap gets destroyed

tender gorge
#

So just make another Collision Box and set it to Overlap Event and destroy said actors?

#

Wait that would just do the same thing

odd ember
#

for coherence I'd probably do it on leaving the volume

#

so on collision end overlap > cast to player character > destroy tilemap

tender gorge
#

I see that there is an end overlap. Just put in the delay to make sure it doesn't destroy the current one the player is on and it should work

odd ember
#

well no

tender gorge
#

OH?

odd ember
#

delays are going to give you more issues like the one in the video

#

rather extend the collision box a little past the tilemap so you can be certain that the player is past it

tender gorge
#

OH. I never thought of that. My brain kept saying it couldn't go past but yeah of course it can.

#

I've never used the End Overlap before so I had no clue to even use it

odd ember
#

just remember to cast to the player character

#

otherwise it will trigger on any overlap

#

including other tilemaps

tender gorge
#

Yes.

#

I'll do that now. Thank you for the help. Trying to learn something new sucks sometimes. I'm a 3D artist, just wanting to learn Blueprints so I can make my own games and not just games for other people.

drowsy flame
#

Is this dumb?

odd ember
drowsy flame
#

have to wait till widget control does its stuff duno how else to do this

spark steppe
#

yes

#

add a dispatcher or event

odd ember
#

the idea of polling is not bad, but you don't need to poll in this case

glass stump
#

What's the opposite of 'Destroy Components'?

gentle nebula
#

How can i get "hitresult under cursor" of two actors, one behind the other?

odd ember
odd ember
gentle nebula
odd ember
#

or make your own hit result under cursor implementation

sharp rapids
glass stump
# odd ember add component?

hmmm, actually here's a better question that would solve most of my problems: is there a way to reset a BP so it goes back to how it was at the start?

odd ember
odd ember
gentle nebula
glass stump
sharp rapids
sharp rapids
tender gorge
odd ember
#

in relation to the tilemaps?

wide quiver
#

during playtime in my game if you accidentally click on an enemy the game seems to lose focus. What could cause this

tender gorge
#

Maybe I misunderstood you?

odd ember
tender gorge
odd ember
tender gorge
#

OK.

#

OH I added the Delay for testing. I'll take it out

gentle nebula
#

what does the "profile" stands for in the multi line trace by profile? Is that a collision preset?

tender gorge
gentle nebula
tender gorge
odd ember
#

can you put a print statement instead of the DoOnce?

tender gorge
#

I can check.

odd ember
tender gorge
#

Oh I took that out because you said earlier that I shouldn't use it.

odd ember
#

yeah just making sure it's not there

tender gorge
#

Nah it isn't. What is a Print Statement? Do you mean Print String?

tender gorge
#

You just want it to say something on the end overlap?

odd ember
#

after the cast yes

#

if you can get display name of the tilemap

#

and hook it into the print string

tender gorge
#

How do I get it to display the name of the tilemap? I have 10 different ones it chooses from.

odd ember
tender gorge
#

Oh I see just a sec

odd ember
#

there is a function called get display name

tender gorge
#

But how do i get it to display the right one? It's a blue icon not a purple one

cold sinew
#

Hello Guys How I have a problem with this Gauge the rotation going from -180 to 180 once it reach -180 its start rotating weird i want to do the rotation from 0-360 ?

topaz plover
#

Hi I'm facing an issue, where if I have a widget open, very fast key presses don't always fire "released" events

#

is this a common thing?

odd ember
#

I believe rotate around axis uses quaternions internally and will preserve correct rotation

odd ember
topaz plover
#

so i have to make an .. input buffer? is that hard? ๐Ÿ˜„

odd ember
#

it's not easy

tender gorge
odd ember
tender gorge
#

Yes

odd ember
#

the tilemap actor knows its own name

glass stump
#

'EventBeginPlay' activates when the game begins, right, not necessarily when the blueprint is created? Is there a 'EvenActorCreated' node or something that activates when an actor is created?

topaz plover
#

@glass stump its when the BP is created

odd ember
#

the game mode is responsible for trigger beginplay on all other actors

tender gorge
glass stump
#

ooooh. weird. ๐Ÿค” i do spawn actor, destroy actor to destroy an enemy and spawn a new one in it's place but the new one just stands there doing nothing.

odd ember
tender gorge
odd ember
#

leave it blank

tender gorge
#

But what do I put in there then because it only allows me to select sprites and images

odd ember
tender gorge
#

Oh wait I see it allows me to select more

#

But still not sure what to put in there because I have 10 tile mapos and 7 backgrounds

odd ember
#

are you not reading what I'm writing?

tender gorge
gentle nebula
#

Any simple way to have an actor constrained to a spline "rail"?

tender gorge
#

Nor when it end overlap

odd ember
odd ember
#

but simple? no

tender gorge
odd ember
#

just tell me what it prints

#

how many instances it prints, and what those instances are

tender gorge
#

It prints the name of the current Tile Map that was destroyed.

#

Only one instance

odd ember
#

even when 2 are destroyed like in your case?

tender gorge
#

Yes. Just the Tile Map. Should I put it after the Destroy Actor Nodes. Maybe that's why it only displays the Tile Map and not the Background with it.

odd ember
tender gorge
#

OK>

odd ember
#

you're destroying the tilemap from inside the tilemap

#

so there is no execution past that point

tender gorge
#

OK

#

I'll tell you the bright side of this process is I'm learning stuff.

odd ember
#

experience is the bitterest teacher

tender gorge
#

True to that.

#

So what should I do to fix this?

odd ember
#

which the code also suggests

tender gorge
#

Agreed

odd ember
#

so I don't know why the other tilemap gets destroyed at that point

#

it may be because where (as in, which class) the logic is situated in

tender gorge
#

I can put a delay again and see what happens.

odd ember
#

the delay doesn't change anything

#

it just delays what happens anyway

tender gorge
#

To me it makes sense why it destroys the current one the player is on because this blueprint constantly spawns a new tilemap at begin overlap and thus it would destroy the current one and new one upon end overlap of the other collision box.

#

I could be wrong

#

so it should always destroy the one you're on.

odd ember
tender gorge
#

I thought I did a long time ago.

#

There are 2 Collision boxes. One is always set to begin overlap spawn a new Tile Map and Background, and then there is the new Collsion Box you told me to put in to overlap the edge so when it ends overlap it destroys the actor

#

One has to always spawn a new tile map hence the infinite runner

odd ember
#

make the collision box extend the entire tilemap plus a buffer zone on each side and see if that works

gentle nebula
#

Is it possible to have colliders interacting with each other based relation based rules?
Like having two balls roll down an hill, at the bottom there is a wall, one ball collide with the wall the other doesn't.
From my understanding colliders are set to either collide or not

tender gorge
icy dragon
odd ember
#

but have it extend beyond the tilemap itself

tender gorge
odd ember
#

not just to edge of it

#

it only triggers once though

#

so the collision seems to work as intended

tender gorge
# odd ember oh it's two separate ones? yes

Didn't work.

Something I might have forgotten to tell you. The beginning Tile Map uses the same Tile Map Base Blueprint so it inherits the Collision Box that is for destroying. I think that may be the problem. Maybe if I create to different Tile Map Base Classes where one doesn't have that and that may solve the issue

gentle nebula
odd ember
#

each instance has its own logic

#

and components

#

and each instance should be responsible for its own destruction

tender gorge
# odd ember you're not working with classes here, you're working with spawned instances

Ok. Sorry I use wrong terminology. I have the one Blueprint called BP_TileMapBase and every single Tile Map is a Child of that BP to Inherit from it. There is the Start Tile Map and Middle Tile Map BP's as Childs. The Start Tile Map spawn uses a different BP to spawn it on Begin Play while the Collision Box responsible for spawning a new Middle Tile Map spawns a new one after it is overlapped.

My thoughts are is that because the Start Tile Map has that Collision Box maybe it is causing the issue? Or should it only destroy that one and that one only and not that one and the next one that already spawned in?

I'm not sure if this helps.

odd ember
tender gorge
#

The Tile Maps are just legit Child BPs of the the BP_TileMapBase as in Separate BPs, but this shouldn't be what's causing it because if that's the case then I'll never be able to get it working period. I want Inheritance to make my life easier if I want to change something among all of them.

odd ember
#

okay so

#

there is a distinction between calling something a child and having it be inherited

#

when it's inheritance the better way to refer to them is super class and subclass

tender gorge
#

I just right click on the base BP and click Create Child Blueprint

#

OK

#

Again sorry for not knowing the correct terminology

odd ember
#

so you have several subclasses

tender gorge
#

Yes

odd ember
#

that's fine

#

this has nothing to do with the subclasses

#

we're concerned with how the instances are spawned, and where the logic for those instances are happening

#

each instance should be responsible for its own behavior only

tender gorge
#

OK..

#

The Start Tile Maps are spawned using a BP Actor class that I setup to always spawn a Start Tile Map on Begin Play. I have it Spawn Actor From Class and it is Selected from 10 Tile Maps and then spawns a Background from a selection of 7 Backgrounds. Once the Player reaches the Collision Box on Overlap it spawns a new Tile Map from the Middle Tile Map selection and Background.

I have the Start Tile Map on a delay of 20 seconds to Destroy Actor which always works, but after adding the Collison Box to Destroy Actor it destroys itself and then immediately the new Middle Tile Map.

#

I hope this helps. If not I'm not sure.,

odd ember
tender gorge
#

I took it out and now no Tile Map spawn.

#

Just give me a minute

#

I can't figure out why no Tile Map for the start is spawning. All variables have a Tile Map and the spawner is in the level. I already had to start over once. I don't want to have to again.

obtuse herald
#

it's good to take a 30 min break from code sometimes

#

and you guys seem to be working on it for a longer time already

tender gorge
#

Need to figure it out. Been having an issue with it for days.

icy dragon
tender gorge
tender gorge
odd ember
tender gorge
#

It all started when trying to do a background separate from the Tile Map. Maybe to make my life easier I should just put a background directly on the Tile Maps. I wanted more randomness but screw it i guess.

odd ember
#

it's just whatever you're doing with that delay function

tender gorge
#

I have no idea how to fix it. No idea why taking that out would make it so the Start Tile Map wouldn't spawn.

odd ember
#

I'd try using breakpoints and go from there

tender gorge
#

I'll have to look up what those are.

odd ember
#

Mathew Wadstein has a good tutorial on them if you look for him

tender gorge
#

I've seen videos from him before. Good at explaining.

#

Like I said earlier this all started after doing backgrounds separate from Tile Maps. Before then everything worked fine even with delays.

#

I'll take a look at Breakpoints and see what happens.

odd ember
#

right but I want to impress the point that regardless of whether it was working before doesn't preclude it from having issues that were just not visible then

tender gorge
#

Oh I know.

Is there another name for break points because I can't find videos from Mathew on it.

#

So Breakpoints is for debugging?

odd ember
#

yes

#

breakpoints are for debugging issues at runtime

tender gorge
#

Thank you for the link. I couldn't find it because I was looking up breakpoints and not debugging.

odd ember
#

I did think he had one on breakpoint specifically but I can't find it now either, sadly

tender gorge
#

Might have taken it down.

So I think what I'm going to do is go back to the beginning. Take out the spawn backgrounds and make sure there is nothing wrong with the Tile Map spawning and despawning first and then move forward.

unkempt musk
tender gorge
# unkempt musk <@!752548092615721032> You're trying to do something like this, correct?

Yes. I got it to work but I wanted to make Background Tile Maps to go along with it and that has created this whole issue. Of course there could have been something else for all I know.

Before I did the background tile maps I successfuly had a Start Tile Map spawn and then successfully had other Tile Maps spawn after and destroy themselves, but after trying to backgrounds that do the same thing there has been nothing but issues.

tender gorge
odd ember
#

very strange

tender gorge
#

The previous Tile Map is destroyed on End overlap

odd ember
#

are the background just static meshes?

tender gorge
#

No they're Tile Maps as well.

odd ember
#

I see

tender gorge
#

This is extremely strange I think. But it's the spawning and what not for the Backgrounds that are the issue.

#

I could have a separate spawning and BPs for them entirely just have a Overlap and End Overlap Collision Boxes that the player goes through to trigger those. This makes them independant of the Tile Maps the player runs on

#

In theory that should work 100%

#

Honeslty would make it more organized too

#

Ok but there is one issue I'm unsure about. So for the spawning of the Start Tile Maps they are suppose to spawn a Tile Map from a selection of 10 which are different from the Middle Tile Maps, but the strange thing is sometimes it will spawn one from the Middle Tile Map even though the variables it's pulling from are only for Start Tile Map.

#

I messed up. The BP had the wrong tile map.

#

I'm just going to make the background tile maps independent.

#

Still good to know about Breakpoints. In the end this is helping me learn more and I'm grateful for that, as well with the help that everyone has given me here today.

gritty trout
#

How would I be able to detect when my AI Agent can't reach the target?
IE a player leaving the nav mesh volume

#

Or detect a player outside the nav current nav mesh volume

#

Currently I'm detecting the closest player to designate as a target but if the player walks off the navmash platform it still registers as being a close player

#

I've looked in the nav mesh nodes and I don't see any nodes regarding if a point is reachable on mesh

odd ember
#

I believe there's some pathing functions for the navmesh like "get nav path to target"

#

or something along those lines

gritty trout
tame pecan
#

Found this old system when diggin through the project, Unreal Blueprints inside a Unreal game. It's shelved now. Hopefully it makes a return ๐Ÿ˜„

#

It's in c++ though, but thought it would be fun to share here

obtuse herald
icy dragon
tame pecan
#

๐Ÿ˜„

shy plover
#

how can i make this work on multiplayer its day/night cycle from ytb

gentle nebula
#

any way to fix "get mouse position" that gives wrong value when testing in the editor viewport?

icy dragon
gentle nebula
#

which shouldn't be possible

icy dragon
gentle nebula
#

no way to get accurate numbers in the editor?

icy dragon
#

Figures.

Try testing in Standalone process instead.

#

Editor's Slate UI is put into account if you test right in editor or just use New Window.

gentle nebula
#

Ill try new window

icy dragon
#

Standalone process is free of editor overheads and quirks.

gentle nebula
#

But really would you rather wait that huge load time difference

icy dragon
gentle nebula
gentle nebula
wraith eagle
#

anyone willing to answer a few noob questions, please DM me. Its about camera movement in a topdown game

coral terrace
#

Hello guys, i just started with unreal engine 4 and i did some animations for my 2d game but i came across a problem: how can i do a falling animation?, cuz i cant find a vector that checks the z value and i also tried searching it on the internet

maiden wadi
gentle nebula
#

Would it cause problems if i don't unbind events before destroying an actor? It shows an error in the log, but is that harmful?

gentle urchin
#

I would think it wouldnt be gced due to still being referenced..

wraith eagle
#

@icy dragon
Point taken:
Im fooling around in a topdown game, I made it so when I input Mouse X into axismapping it makes my camera move around my character. Problem is that I only want it to work when I have right mousebutton pressed, but right now it works with any mousebutton pressed

gentle urchin
#

Plus if your destroying it you can always just "unbind all"

coral terrace
maiden wadi
#

Noted. DotProduct the velocity then. If you DotProduct a normalized velocity with VectorUp, it will be below zero when velocity is going towards gravity.

coral terrace
#

ok thx

maiden wadi
odd ember
maiden wadi
#

It should on an AxisMapping. Basically tick.

odd ember
maiden wadi
#

Not following?

wicked osprey
#

Hi guys. Where is it more correct to create a main widget. In character or in HUD?

odd ember
# maiden wadi Not following?

there's basically a mapping that's unaccounted for in the mappings where you have to press (and hold) down a mouse button to move the camera around. this is never explicitly mentioned as an action mapping, but it is required to do so anyway

maiden wadi
wraith eagle
#

@maiden wadi Got it to work like this, thanks ๐Ÿ™‚

maiden wadi
wicked osprey
maiden wadi
#

Why would you avoid casting? HUD is always loaded.

odd ember
glad coral
#

Hey guys i have a problem with holding the weapon.Here's a video of the problem

glass stump
#

How do I edit to set a target point in the game as the default target point for the target point in the blueprints?

swift kestrel
# glad coral

If your using a Aim Offset add some intermediate transition point.

swift kestrel
glass stump
maiden wadi
#

The CDO is the default object in which things are copied from to exist in world. This means you're trying to change this in the class. You can only edit this in an instance.

#

And Instance being a copy of the class that's been dropped into the world in the editor.

glass stump
maiden wadi
#

Not sure. I don't know what you're doing. What is this actor with the TargetPoint1 property?

glass stump
#

An enemy that uses the target points as a patrol path.

maiden wadi
#

And you've dropped the enemy into the world in the viewport?

glass stump
#

Yeah. But I need the enemy to get destroyed and spawn another of itself as a reset. It does that at the moment but it screws up the patrol path and just moves to the center of the map, then the game starts lagging massively for some reason.

#

I assumed it was because the patrol points aren't set on the new enemy that spawns.

maiden wadi
#

Possibly a ton of movement update attempts.

#

Hard to say what best case is there. Initial thought is you could pass what you need to the spawner like the target point and set that in the next spawned enemy. Could also fake the death with a skeletal mesh spawn and not actually kill it but hide it and just reset it back to it's original state which means that pointer never gets nulled.

glass stump
#

Hmmmm, is it possible to do a component spawn?

#

To restore a destroyed component?

maiden wadi
#

I think it's called AddComponent in blueprint.

#

Should have a list of all of them that are blueprintspawnable.

glass stump
#

Hmmm, thank you I'll try this method! :)

white field
#

anyone know a tool that can screenshot giant bp?

#

instead of manually panning and screenshotting and reassembling

woven hearth
#

Hi, is there a way to destroy actor inside an function?

maiden wadi
#

Yes. But not in a Const function.

woven hearth
#

hmm

gentle nebula
#

I have a timer macro, inside it creates an event.
But i can only use that macro one time on the event graph other wise i get an error for two events with the same name.

Anything i can do to fix this? Or am i doing it wrong?

maiden wadi
#

Const implies that you have no intention of altering any state in an object with the function. This means affecting it in any way. Usually const functions are getters that simply retrieve information about the object.

maiden wadi
gentle nebula
#

So yes for a delegate i think

serene sand
#

I am trying to spawn objects and rotate them. I notice they are clipping. How do I write something: if they clip to each other, to reposition the object to a position where they DON'T clip?
I've been trying sweep & teleport but to no avail, my items still clip & clip

maiden wadi
#

Can you show the Macro? Because you should be able to use CreateEvent to specify the same function from multiple places in the same graph. You cannot have the same actual CustomEvent with the same name though.

dawn gazelle
dawn gazelle
#

And there it is.

gentle nebula
#

I think i should use a function instead

dawn gazelle
#

Since it's in a macro, you could potentially use a delay node to simulate the timer. Just would require a bit of rework if you only want it to fire so many times.

dawn gazelle
#

Yep

gentle nebula
#

Last time i tried doing it it gave me an infinite loop error

#

Probably done something wrong

#

Some one explained me that the loop has to end before next frame

maiden wadi
#

More correctly, the next frame won't ever happen if you cause an infinite loop. This used to crash entire systems. Modern operating systems just close the offending application now.

odd ember
gentle nebula
spark steppe
#

or million? i think million

#

but wanted to use the gif ๐Ÿ˜›

odd ember
maiden wadi
#

I think default is like 500,000. But it also depends on the UE4 version and whether they've fixed the counter. That 500,000 on some versions is more like 50,000.

gentle nebula
#

I expected it to be much much larger

spark steppe
#

well we can all agree that it's over 9000

gentle nebula
#

Wait, if i use set timer by function, i cannot input parameters to the function at every timer "tick"?

gentle nebula
#

Anyway, i decided to just duplicate the entire macro so it would have an original event, since i couldn't think of another solution, even though it would've been nice to have

wraith eagle
#

Hi again!
So, I made a topdown click to move game. Now I made it so that I can move the camera around the player, and also its possible to reset the camera by double click. But when I doubleclick, the camera is resetting instant, is there a way to make the camera-reset a little bit more smooth?

wraith eagle
#

yeah, what action do I use for that?

odd ember
#

there are different ways of doing that

#

I do something completely over the top because I have a complex camera system

#

but for starters using a timer or tick is fine

#

probably a timer is better just because it's easier to turn on and off

wraith eagle
#

hmm, not really sure where to add that or the action name?

tender gorge
#

@odd ember I just did made the Backgrounds completely independent from the rest and now everything works 100%.Actors are destroyed when they should be, no delays are used either. Also it feels more organized too.

odd ember
#

good stuff

trim marsh
#

hello guys, i have this horizontal box, and im adding a child box, how can center this box dynamically?

#

cause if a i have 5 theire not in the center of teh screeen

wraith eagle
odd ember
gentle urchin
gentle nebula
odd ember
wraith eagle
#

Sure, this makes it not reset insta, but my goal is for the reset to go back smooth, not like teleport back

gentle nebula
#

i tried using set timer by event but then i limited to one macro for an event graph

odd ember
odd ember
#

what do you want to achieve

#

because right now you're trying to break the engine I'm pretty sure

gentle nebula
#

I got it, i spoke technically because i achieved it but i just couldn't duplicate it.

gentle urchin
gentle nebula
#

I want a countdown system that i can easily call whereever

maiden wadi
#

Breaking the engine? Well that's easy. Just create an FText from an FString, and pass it back through a function, call that function and .ToString() the return in a Loop initation.

odd ember
#

is it a stop timer?

#

does the user invoke it?

gentle nebula
#

I want to invoke it at many different situations

odd ember
#

isn't this just... a timer?

maiden wadi
#

Not actually joking by the way. ๐Ÿ˜„ That crashes in shipping builds.

gentle nebula
odd ember
#

have you heard of timelines?

gentle nebula
#

actually no

odd ember
#

I would suggest looking them up

gentle nebula
#

Already at it!

odd ember
#

but also if you just need a countdown you don't even need a timer

#

you can just compare game time at two points

gentle nebula
#

Timelines seems interesting

odd ember
maiden wadi
#

Is this for UI or something else?

gentle nebula
maiden wadi
#

Yeah.

maiden wadi
#

What is your HorizontalBox's containing parent?

trim marsh
#

another widget

maiden wadi
#

Yeah. Which widget?

#

Different answer if it's a CanvasPanel or a VerticalBox for instance.

trim marsh
#

a canvas

maiden wadi
#

Make your HorizontalBox SizeToFit, and set it's X alignment to 0.5

#

Anchor it to center point or topcenter or whatever.

#

Will keep it in the center.

trim marsh
#

size to content = size to fit?

maiden wadi
#

Yeah

trim marsh
#

thx it work

crimson hornet
#

Does anyone has an easy way on how to stop the camera in first person view clipping through walls?

odd ember
#

or extend the collision cylinder

maiden wadi
#

The near clip plane in project settings is pretty high by default too. Can lower that to avoid it quite a bit more.

crimson hornet
#

alr ill try those

#

thanks

cold sinew
#

Hello guys i used the quaternion to get 360 degree rotation for the Gauge but also still broken .
I want relative rotation + Some value = set relative rotation

odd ember
#

did you try with rotate around axis?

cold sinew
wraith eagle
#

@odd ember So proud I actually got it to work like this! ๐Ÿ˜„

cold sinew
#

this is my Equation

cold sinew
#

First i got a function from youtube converting Euler rotation to Quaternion

// Formula to convert a Euler angle in degrees to a quaternion rotation
FQuat URotation_Quat::Euler_To_Quaternion(FRotator Current_Rotation)
{
    FQuat q;                                            // Declare output quaternion
    float yaw = Current_Rotation.Yaw * PI / 180;        // Convert degrees to radians 
    float roll = Current_Rotation.Roll * PI / 180;
    float pitch = Current_Rotation.Pitch * PI / 180;

    double cy = cos(yaw * 0.5);
    double sy = sin(yaw * 0.5);
    double cr = cos(roll * 0.5);
    double sr = sin(roll * 0.5);
    double cp = cos(pitch * 0.5);
    double sp = sin(pitch * 0.5);

    q.W = cy * cr * cp + sy * sr * sp;
    q.X = cy * sr * cp - sy * cr * sp;
    q.Y = cy * cr * sp + sy * sr * cp;
    q.Z = sy * cr * cp - cy * sr * sp;

    return q;                                           // Return the quaternion of the input Euler rotation
}
quick lark
#

Hi all, I'm having difficulty figuring out how to load a level with a specific game mode. Does anyone know?

#

i.e. During runtime, I want to be able to open Level_A with either GameMode_Foo or GameMode_Bar

honest wolf
#

Hey everybody, quick question about player camera setup. I'm trying to get the player / capsule to move towards the camera facing direction once the player starts moving, but rotation does not behave like I expect it to.

Here is my setup:

Use Pawn Control Rotation: off
Use Controller Rotation Yawn: on

When I move camera 90 degrees, the capsule only seems to move 45 degrees. What am I missing here?

honest wolf
hot lotus
#

Hello everyone,
I made an inventory system recently and the way I initialise the chests is bothering me.

I have a list of structs containing a datatable (like equipments) and a name (the row line of the item), then I loop through to fill the chest with the items info. Is there a simple way to have a scrolling menu lets say when I select the datatable to choose the items from? (Right now I need to manually write the name without typo)

odd ember
#

which can be different than actor rotation

honest wolf
#

Is there a way of getting them onto the same scale?

glass stump
#

hmmm, is there really no way to set the target point variable as a specific target point?

#

or access target point actors from a blueprint?

hot lotus
odd ember
glass stump
odd ember
#

you can expose the variable and once placed in the level you can then add it

odd ember
#

yes

hot lotus
# odd ember the node

Yes this is what I am using at initialisation, I was just thinking to simplify the way I am entering the names of the items. Is there a way to have a scrolling menu to choose from all the rows in the datatable? In the editor I mean, sorry I was not precise.

odd ember
#

once you place that actor with the variable in world

#

you can look in the details panel and set that target point to be an actor in world

glass stump
odd ember
glass stump
#

any ideas on how to put me in the right path?

odd ember
#

I don't know enough about your project to say what would be a good way

glass stump
#

ah fair enough, thank you

hot lotus
honest wolf
odd ember
#

that is half the battle

#

the rest you have to find out yourself

glass stump
crimson hornet
#

Hello I got an really tricky question. For example I got an collision sphere and if the player overlaps the collision sphere it will kill him. Then I got an wall but the collision sphere is really big. How can I make it that the wall will block the collision sphere for overlapping with the player?

gentle urchin
#

Before you kill the player, lintrace

#

If trace hits player, theres no obstacles

crimson hornet
#

Okay and then I make an boolean with CanHit for example and set it to true.

#

right?

gentle urchin
#

I wouodnt bother with a variable, but sure

#

If theres a chance the player peeks over/around the wall, and thats supposed to kill him, you need to trace on tick btw

#

And if the trace ever hits the player -> byebye

crimson hornet
#

alr

#

thx

lusty shard
#

how do i get the angle of a surface hit by a line trace?

crimson hornet
maiden wadi
#

Compare trace start and end as a unit vector dot product to the hit normal.

gentle urchin
#

OnOverlap -> start timer
EndOverlap-> stop timer

Timer -> trace @crimson hornet

lusty shard
#

this is currently changing what is printed depending on elevation level.. Ive seen printed values of 400, and 4000 lol

woven hearth
#

Yet again i have a problem

gentle urchin
maiden wadi
lusty shard
#

which one is Unit Vector?

maiden wadi
#

GetUnitDirection I believe.

lusty shard
maiden wadi
#

Yeah. From should be End on your HitResults.

#

To should be Start.

#

Basically creates a 1.0 length vector facing the opposing direction of your trace. If you use that in your DotProduct it should give you something > 1 usually since it's pretty difficult to hit from the other side. The closer to 1 this is, the more direct hit it was.

gentle urchin
woven hearth
#

error is still there

#

after i compile it

#

and refresh it

gentle urchin
#

Signature mismatch

#

Did you change signature?

woven hearth
#

what signature?

lusty shard
gentle urchin
woven hearth
#

i belive that i changed it only in the interface

woven hearth
#

but that was only the interactor

#

nothing else

lusty shard
gentle urchin
woven hearth
#

i will try it

#

still

#

even if it is not in anything connected)

lusty shard
# maiden wadi Should be this.

so this assumes I am sending a trace from the hit location bouncing outward, and outputing a value of 0-1? guess I should print the dot product and see.. Because the get unit direction node is using trace start which is just in front of the players camera

#

wish unreal slackers would allow 15 minute threads or something..

maiden wadi
#

The idea is that you're basically putting a stick where you shot the trace and another stick facing directly out from the surface you hit. The closer your sticks are to facing the same direction the closer to 1 that float should be.

lusty shard
#

wow. Get unit direction node is 1 stick... where is the other one?

gentle urchin
#

Impact normal

#

Is the other stick

#

Dot compares the two sticks

woven hearth
gentle urchin
#

Going from 1 (identical direction) to -1 (opposing direction)

maiden wadi
lusty shard
#

impact normal dot product is the other stick?

gentle urchin
#

Dot compares the two sticks

lusty shard
#

ooo

gentle urchin
#

"How mich alike are these two vectors?"

lusty shard
#

dot product outputs a value of 0-1 depending on the difference then?

gentle urchin
#

Answer come in a range -1 to 1

#

From totally opposite, to identical

maiden wadi
#

Yeah. Normally a DotProduct will be -1 to 1. In this case, you'll pretty much always be above zero. Hitting a surface from any angle enough to produce a zero or negative result would be rare.

lusty shard
#

so im trying to prevent players from placing a firepit on the underside of a roof lol

#

might make for a nice ceiling light

#

but that would output negative dotproduct yeah?

maiden wadi
#

Yeah, that's a different check. ๐Ÿ˜„ In that case you want to check if your Normal is DotProduct to VectorUp greater than zero

gentle urchin
#

Compare impact normal to world up

lusty shard
#

o gosh haha

gentle urchin
#

You can dodge a step if the player is pointing upwards in general

#

In no situation can you aim upwards and hit placeable location for a firepit

lusty shard
#

to be clear, i do want to disable that kind of placement

gentle urchin
#

Yeah

odd ember
#

why not just prevent that based on surface normal

gentle urchin
#

But instead of extra math

#

Id just check the aim direction initially

#

If aim direction is downwards, then check the surface normal

#

Probably a micro optimization, ignore it ๐Ÿ˜„

rain fractal
#

Which component would make an object be given physics so it can fall down?

lusty shard
maiden wadi
#

VectorUp in this case is your UnitDirection. So you just DotProduct VectorUp with the ImpactNormal.

gentle urchin
#

.5 would be 45 degrees

lusty shard
#

working beautifully

pulsar valve
#

Hi. Looks like variables exposed from Designer by Is Variable are always public. What's the point? why can't it be made private?

timber knoll
lusty shard
timber knoll
#

45 degrees is .707

gentle urchin
#

Dang

lusty shard
#

heck yes. thanks so much guys/non-binaries.

timber knoll
gentle urchin
timber knoll
#

I mean cos... ๐Ÿ˜…

gentle nebula
#

Any way to dismiss all error messages at once?

gentle urchin
#

No

odd ember
gentle nebula
#

I already fixed them

#

Still floating around

odd ember
#

then you didn't fix them ๐Ÿ™‚

gentle nebula
#

I did..

odd ember
#

not if they show up no

gentle nebula
#

You are wrong, these are from previous sessions, still showing

odd ember
#

restart the editor

#

but also why didn't you just clear them when they first appeared

#

some very strange workflows

trim marsh
#

guys sorry , how can i pick a unique random value with a for loop ?, is picking but this repeat values

gentle nebula
# odd ember some very strange workflows

Because, i was testing how my blueprint works, it required me to press the mouse many time, which generated those errors.
Yes you could say i should have fixed the error before continuing to test.
Is that what you think?

odd ember
#

either you get the error again or you didn't clean up your errors

gentle nebula
gentle nebula
odd ember
#

I don't need to really

keen hearth
#

Anyone know of a way I can set Self Shadow Only at runtime? By default you can only access the get. Not sure if it's modifiable via another function call.

coral terrace
#

guys can someone plz send me a blueprint of how to switch between a jumping and falling animation in 2d cuz i tried all day and its not working

odd ember
gentle nebula
#

You mean only with collisions coming from one direction?

coral terrace
gentle nebula
#

there's one thing coming to my mind(maybe others would provide a better solution)
Make the logic to determine the direction of collision by calculating the relative speed(either of two object, if both are moving, or the one object that is moving), and if it is from the direction you want, set the channel for the collision

coral terrace
glass stump
#

what does 'Deactivate' actually do?

#

Just tried to use it to deactivate a couple of components and it seemingly had no effect.