#blueprint

402296 messages · Page 711 of 403

ornate trail
#

I have a for each loop with coordinates. So currently I have this indexes coordinates but how can I also get the next index on the same iteration of the loop?

#

So for each I need this element and the next

maiden wadi
#

@ornate trail Get the same Array. Get the loop's iteration count. add one, and use it to get a copy of the index from the array.

spark steppe
#
  • ensure that you don't access out of range on the last run
orchid garden
trim matrix
#

Hello. Can I somehow call this "compile gear" from the BP details panel, or by another way? In my case when I am spawning skeletal meshes and assigning to them animations in the construct script by editing exposed variables in editor I should recompile BP in order to put them in the right pose in editor.

#

During the play everything works as I want.

pastel rivet
#

If you have hierarchy like this

Sphere
Plane
Cone

How would you move cone to center of sphere?

#

Nvm, was only thinking relative location, i can just set it to the world location of the sphere 💯

trim matrix
#

@pastel rivet Get scene component world location of Sphere. Then set cone world location.

smoky belfry
#

Hello everyone, I have a question about Distance Grids

I am currently trying to create a distance grid much like the one that you see while putting inside a golf game. The thing is I have no idea currently how to implement it. Does someone have an idea how I can start implementing a simple distance grid? Thanks so much in advance for answers.

maiden wadi
#

@pastel rivetAlso. Just in case you end up in a situation where you can't rely on world location for any reason, the answer is to get Plane's relative location, and multiply it by -1.0. This will get you the reverse of Plane's location to Sphere, and if you set Cone's relative location to that, it'll share the same location as Sphere.

ancient kestrel
#

how do i get ride of the target node connection on a UFUNCTION

maiden wadi
#

@ancient kestrel Presuming you're making a static library function, it's just this.

static void MyFunctionName(UObject* WorldContextObject);```
#

Mostly Meta=(WorldContext="NameOfWorldContextVariable")

ancient kestrel
#

thank you

maiden wadi
#

GameplayStatics library has quite a few of them. Things like GetGameState, or GetGameMode are good examples.

warped spindle
#

Does anyone know how to fix ES3.1 OpenGL ? When i want to change to preview ES3.1 OpenGL and reaches 100% and then tries to load,and then CRASH
Same on IOS PREVIEW AND ANDROID VULKAN

late cave
#

Matinee camera shake is deprecated but I still haven't seen a single person figure out how SequenceCameraShake works

plucky harness
#

could anyone please tell me how to calculate projectile rotation based on targets location

runic plinth
#

Hey, quick question, I think this is the case but just to confirm, does streaming levels as in load/unload on trigger overlap save performance during play?

uncut lark
#

If you overlap it properly, it can save resources, but keep in mind, it wont save the previous state unless you tell it to, and when loading the next area, it may need a dedicated loading screen

runic plinth
#

What do you mean by previous state?

trim matrix
#

Hi. Anyone care to help with delegating input mappings in BP?

crimson hornet
#

Does anyone know how to keep the UI on the same place for every resolution

proper umbra
#

Hey. Not sure what happened, but I moved the file location of my character and now when I press play it doesn’t possess the character. I already have the gamemode and character selected in the project settings.

topaz wigeon
#

could anyone help me, Im trying not to use level BP, I would like to use an Event dispatcher, then call it on an actor, but when I add that event to the actor its bringing me to level BP, any alternative not to use level bp ?

#

I just want to avoid using level BP, my teacher told me That should be used just for renders or cinematics

lofty ridge
#

Hello! I've been working in Unreal for a while but I'm new in blueprints and programming stuff.
I'm trying to create a blueprint that detects when the Player is affected by a Spotlight, in other words, I want to use the Spotlight as a trigger, but I can't manage to do it. Can anyone help me please? Thanks in advance 🙂

tame mural
#

Could anyone help me with a construction script to help me add trees randomly to my island

warped spindle
#

Thank you very much

gentle drum
#

hello . Can someone help me figure out why i cannot create a custome event in widget blueprints inside a function?

last abyss
gentle urchin
#

You can call a custom event from a function tho

obtuse agate
#

Does anyone have any idea why my UI widget doesn't update binding on tick ?

#

I have binded 4 text boxes but none of them update on tick and just stay as blank text.

gentle urchin
#

Also sounds like what they're bound to is either empty or invalid

obtuse agate
#

I print the output in the tick method, the binding is the same variable

#

I am taking the current time and formatting it to text then binding it.

mild jacinth
#

question, when creating a main menu soundcue that plays randomly with loop attached to it, how am I able to create fade-in and fade-out instructions for it?
or is it better to use audio program to make the fade, rather than using something programmed in ue4...?

knotty bane
obtuse agate
#

Sure thing.

#

This is the function, Its binding through a textbox in UMG

#

In my Tick, I print it to a chatbox. The last part is the days binding

knotty bane
# obtuse agate Sure thing.

and no warnings/errors in output log? and the nodes in your tick/printstring are the same like in your function?

wild moth
#

Hello, for spline meshes does anyone know how to bypass this issue here? Where the spline mesh is smaller than the current spline length

obtuse agate
#

Same thing, no errors. It just doesn't seem like any of the bindings are updated on tick

#

I added the function to the print string and it has the same output. The function returns the correct string but UMG does not update or refresh. Is there a way to manually trigger a refresh without having to rewrite all the binding functions to SetText etc?

knotty bane
#

i would test 2 things - make the return value static for testing to see if that text gets put into your widget on start (disconnect your nodes before and enter some test string). also check for isValid of your playerController - maybe it's some wired raceCondition and after it fails to get the PC it skips the binding.

obtuse agate
#

I'll give it a shot

knotty bane
obtuse agate
#

No luck D:

knotty bane
#

thats strange if it is not setting the text even with a static result...is the widget used anywhere else and maybe a setText is called on it?

#

this does not work?

obtuse agate
#

I figured it out, for some reason the font is broken. I reset the font to default and that fixed it.

#

I dont remember setting a font but well glad it was something as dumb as that not me going insane

knotty bane
#

😑 good to hear 😄

obtuse agate
#

I tried the SetText on tick and still did not work, glad to see I am not crazy. 😒

hot rose
#

Heyo, ive got a question for ya'll, i've been trying to find a way to set a new camera as the default one for my game, but have had no luck with it yet.
trying to make a static tetris-like camera, but i can't get it to be the set view on begin play for some reason

#

help

hot rose
#

found it

zealous moth
zealous moth
wild moth
#

I'll have a try thank you

late cave
#

Trying to find out what menu a widget is in... this was apparently not it 😆

#

top level seems to be user widget... not the whole menu class

slate sedge
#

Hey! Could anyone give me a hint on how to implement mouse pointer sensitivity ingame?
I'm not talking about making the movement of the camera faster, but the speed of the pointer. Thanks!

grave hornet
#

I hope this is the right place to ask this.

I'm setting up a combo system, but if a player smashes on the attack button after the first loop it gets messy and the character just does attack 1 and attack 2 over and over with a very rare attack 3.

What can i do to prevent that behaviour and get a crisp 1-2-3, letting the full length of 3's animation play out before starting the next combo.

icy dragon
zealous moth
#

@grave hornet you beed to make a buffer system.
Basically set up a boolran with a timer countdown. If the countdown expires, the boolean resets. If during that timer the input is pressed go to the next timer and so on.

grave hornet
#

oh, that would keep me from caring about any button presses between discreet attacks, i guess

#

will try

slate sedge
spark steppe
#

is there anything builtin unreal to distribute vectors on a 2D plane (or even better on any kind of shape) evenly?

#

e.g.: i give it a shape like a hexagon and say i want to distribute 10 vectors on it, do it

#

blender has something similar

thorny marsh
#

Thanks.

thorny marsh
#

👍

midnight wedge
#

So I'm working on a simple physics based projectile, but unfortunately the projectile's speed and size make collision testing unreliable and causing it to phase through both walls and the player at times due to how fast it travels. I've been trying to set up a ray trace to check if there is an overlap between frames, but I haven't had much luck with that. Anyone know of a good system and/or way to implement the ray trace system?

#

My first thought is to use the speed variable to calculate the length of the raytrace, but I'm bad at math and have no idea how to do that

#

Also I've tried a projectile path trace and while Im sure there is a right way to make it work for my purposes, I haven't found it yet

worthy tendon
#

Have you tried using CCD? @midnight wedge

#

check Use CCD under Collision category advanced tab for bullet.

mossy vessel
#

How do I add this like the picture?

worthy tendon
#

Just set MaxWalkSpeed?

#

CharacterMovement does not have NewWalkSpeed

mossy vessel
#

oh so its an actual node

#

prebuilt

#

or variable

mossy vessel
#

I see it now

heavy gulch
#

My melee system is leaving a lot to be desired because it's so framerate dependent and there's no fixedupdate

worthy tendon
#

I don't know, It's up to you. physics can be frame independent using substepping. just enable it in project settings and see different.

heavy gulch
#

But you cant use substepping for line traces

#

at least not in BP

#

right now im tracing the weapon arc with sockets

#

but obv if the frames go down the trace isnt too accurate

#

I thought CCD was primarily for physics sim like u said

#

but if I could trigger hits with it that'd be cool

worthy tendon
#

line trace is continous already.

spark steppe
#

i would just linetrace when you pull the trigger, calculate delay based on distance + bulletspeed and fire the hit event when the delay is done

worthy tendon
#

CCD will help to prevent fast moving physical objects passing through other objects.

heavy gulch
spark steppe
#

could also take the hit target velocity into account, and redo the linetrace if it would move out of the hit area

#

unless you need 100% accuracy that should work

worthy tendon
#

Your blueprint was about bullets and now 😅

heavy gulch
#

sowwy

#

I've just been looking for a solution everywhere with little luck

worthy tendon
#

I don't think you need CCD for this. How about sphere collision instead of line trace?

heavy gulch
#

Just like, not very accurate is it

worthy tendon
#

Box collision?

heavy gulch
#

I mean one school of thought is to make custom colliders for each attack

#

and just do an overlap like youre saying

#

what's nice about this system is I do know exactly where a hit happens for example

#

spawn particles there etc...

worthy tendon
#

That would be very expensive. I think you need to enable complex collision as well otherwise only a simplified collision is used.

heavy gulch
#

might be one of those things where you just kinda shrug and hope frames dont drop

worthy tendon
#

but I don't recommend you doing complex collision. a box should suffice.

heavy gulch
#

well a moving box has the same issue

#

right?

worthy tendon
#

how come?

heavy gulch
#

can skip over the overlap between frames

worthy tendon
#

but your animation is not that fast. and CCD would help if you have like 10 fps!

#

but who plays a game at 10fps

heavy gulch
#

that one isn't too fast no

#

but some are faster

heavy gulch
#

probably better to just try and make the framerate good

#

but I know that its possible to do it in real time

#

because Mordhau does it

#

I just cant figure out how 🥲

worthy tendon
#

Yeah you should try rather than speculation

heavy gulch
#

i have been trying friend

#

🤷‍♂️

worthy tendon
#

I know. sorry 😄

heavy gulch
#

I think maybe with some CPP i could run traces on substep

#

but havent delved into that yet

worthy tendon
#

Yes, I think I saw that too. to tick with substep

#

Me neither

#

How many of these are going to be in your game?

tired wolf
#

My engine keeps crashing when I try to have one client join another client's session (UE5 Beta)

heavy gulch
worthy tendon
#

You should find balance between performance and accuracy. with more accuracy comes more computation.

heavy gulch
#

weapons?

worthy tendon
#

I mean how many players or AI are going to use this system

heavy gulch
#

ah yeah

#

20 players max

worthy tendon
#

Yeah, so what ever you do, roughly the cost is multiplied by 20 😄

heavy gulch
#

yep

#

plus all relevant AI

#

but yeah

#

in mordhau they have teams of like 32

#

all doing real time tracing along the swing

#

so its possible, but technically challenging beyond my ken

worthy tendon
#

Also one thing comes to my mind, even with substep, I don't think your animation would substep, or would it?

#

probably you need to tick for every frame of the animation rather than substep

heavy gulch
#

well there's more animation frames than game frames if the framerate is below 60

worthy tendon
#

Yeah, but substep is for physics. I don't know if it works for animation or not. (it probably doesn't)

heavy gulch
#

🤔

#

unfortunately notifies only trigger on game frames

#

I havent learned a way to trigger on animation frames

#

if those are even running

worthy tendon
# heavy gulch

this is fine tho, this would definitely hit. also you can try sphere trace for example if your weapon has larger width to it.

#

to simulate low fps go with this command t.MaxFPS 20

#

and set it to 0 to reset to default

heavy gulch
#

I get like three points

worthy tendon
#

so basically you do the substepping your self for each tick

#

But I can't find it!

brittle garnet
#

How can I sync changes made to a component in actor's constructor (in C++ code) with a blueprint?

Let's say that this is the initial constructor

AMyActor::AMyActor()
{
    PrimaryActorTick.bCanEverTick = true;

    MeshComp = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("MeshComp"));
    RootComponent = MeshComp;
}

, and I create a BP based off this class.

And then later I modify the constructor like so

AMyActor::AMyActor()
{
    PrimaryActorTick.bCanEverTick = true;

    MeshComp = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("MeshComp"));
    MeshComp->SetCollisionResponseToChannel(ECC_Pawn, ECR_Ignore); // <<<
    RootComponent = MeshComp;
}

But the configuration of the mesh component in the BP does not change.

atomic salmon
#

@brittle garnet if you are hot-reloading, that may be your issue.

rotund pilot
#

I'm trying to cast a ray based on the input direction relative to the character and the camera and I'm not getting it right it seems

#

This is what I get. The ray seems to just point in one direction, regardless of the input or character/camera direction

atomic salmon
#

@rotund pilot Start = Actor Location, End = Actor Location + Direction (from camera) * Distance

brittle garnet
atomic salmon
#

@brittle garnetyeah, hot reload is known to cause such issues.

rotund pilot
worthy tendon
atomic salmon
#

@rotund pilotit isn't. You are not adding the actor location to the End location.

#

In other words, you are only using Direction vectors for your End location, which is what causes the issue. End location should usually be Start Location + Direction * Distance.

thin apex
#

Im trying to save this Widget object reference. but it just wont save it. I have no clue why?

brittle garnet
rotund pilot
#

Doesn't change based on input

atomic salmon
#

@rotund pilotstill wrong. It has to be Actor Location + Direction * Distance. Sum and multiplication are not commutable, the order matters.

#

So do Direction * Distance and then add the Actor Location to it.

rotund pilot
#

This is what I get. It's a lot closer to what I'm trying to do but the angles are weird

#

I think maybe the camera's pitch is causing it?

onyx token
#

god damn inheritance rooHold

#

I'm trying to do this on BeginPlay:

#

right

#

I wanna get a thing from my third person character, and put it onto an actor

#

problem is

#

it only works once my third person character has that thing too.

#

So i gotta do dumb shit like this to make it work rooBlank1

#

and add a delay.
Is there a way to make this more... elegant? And not scuff it with a delay?

rotund pilot
atomic salmon
#

@rotund pilot great! You are welcome. 🙂

unique solstice
#

🙃 I do wonder what would happen if I press compile now...

worthy tendon
onyx token
worthy tendon
#

Assuming at some point in your third person character blueprint, you set this widget variable, call the dispatcher.

onyx token
#

hm

#

using an interface is actually pretty smort

worthy tendon
#

It's not an interface, it's event dispatcher.

onyx token
#

or that

worthy tendon
#

do you have solution with interface?

onyx token
#

wouldn't an interface work too? rooThink1

#

idk, i got an interface already implemented...

#

so that way i'd just have to add a lil "initialize the thing"

worthy tendon
#

I don't know how to fix it with interface.

onyx token
#

hm fair

#

ok thanks for the help! rooVV1

worthy tendon
#

and something like this in your other blueprints

worthy tendon
onyx token
#

i see

maiden wadi
#

What is that even for? Why create a widget until you need it?

eternal reef
#

Hello there, maybe someone is able to help me out on an issue that has been bugging me for a while
So I have set up a bow and arrow logic (Third Person) and the camera is set up that its basically seeing over the players shoulder while aiming (HUD is fixed and centered)
I am using a transform for the arrow with a projectile movement which uses the look at rotation of the "Muzzle" and the Hit Location of my line trace which originates from the camera
It all works perfectly well, but now I am working on an ability which is a pierce shot, so the arrow goes through multiple enemies
Issue is: As the bow has an offset from the camera, the arrow travels obviously from an angle, but I cant figure out how I can correct its path
I tried readjusting the rotation on the first overlap with the last impact point of my line trace or changed the velocity of the movement component, but these things didnt work... any idea how I could overcome this issue?

I would have just gone for the look at rotation between Muzzle and End Hit, but this causes some issues when the first target is too close and the player misses that shot as the arrow passes by that enemy

Here is an illustration just to clarify... appreciate any help 🙂

runic terrace
#

You want the arrow to change its direction when it hits an enemy?

eternal reef
#

Basically, yes. So as of now the arrow follows the blue line, but what I would like is that after its first hit, the arrow should follow the red line

runic terrace
#

But the arrow is a projectile right not a linetrace? And the target might also be moving

#

so the initial direction of the camera won't be the same when the arrow reached its target

#

You might be able to set the direction of the arrow depending on to the hit normal but that's a dirty workaround

eternal reef
#

I have a line trace from the camera when the arrow is initially shot, if no target is hit, it will just use the end of the line trace for its direction
But if an enemy is hit, it takes the direction as illustrated
The idea was to take the same line trace values from the inital shot to adjust its rotation to account for the offset

runic terrace
#

What I would do is to probably move the camera to the shoulder of the player parralel to the muzzle direction

#

(When the player is aiming)

#

So there wont be a need to readjust the arrow's rotation

worthy tendon
#

How about moving the crosshair to the side?

eternal reef
#

Yeah I also considered that but I was not really satisfied how it looked with the characters animation etc, for which reason I was trying to figure out this alternative approach
You mean just aligning the hud with the offset of the bow? Not sure how that would look as I have a small hud just indicating the center of the screen while not aiming for interacting with stuff

surreal peak
#

I think TheAscent had that issue too, sort of

#

But different, I was of course not the one fixing it

runic terrace
#

Or at the very least you could make the arrow spawn from the camera not the bow itself, not sure if your game is fit for that but it's an option

eternal reef
#

With a bow and arrow its kind of weird as you see the arrow travelling in my case, I could use some sort of "decoy" mesh that spawns from the bow but the actual projectile spawns from the camera, might be worth a try

runic terrace
#

Yeah, many games do that especially if they're competitive such as csgo. When you shoot a gun you see a "bullet" travelling but it's just a particle effect and the actual shot is a raycast.

surreal peak
#

Overwatch did that for the stun grenade of the cowboy

#

They throw a mesh from the left hand

#

But then spawn and "throw" the actual grenade from the center of the screen

#

You don't really notice it cause it's so fast

runic terrace
#

Note that if you spawn the projectile from the camera in a TPS game if an enemy is too close to the character it will be obvious

eternal reef
#

I think I will stay with the logic for single target as I have it right now and just use the decoy method for the ability as it will use some sort of vfx and most probably hide the transition between the two

runic terrace
#

I think the best option would be to move the camera to the shoulder

maiden wadi
#

People shouldn't be using bows in melee range. O.o

runic terrace
#

But they will

eternal reef
#

Unfortunately Ive had the brilliant idea that the player is able to use the arrow as some sort of meele weapon when the enemy gets too close, which leads to the issue that its very likely that there will be such cases that they stay way too close while aiming

runic terrace
#

What if you make it so the character will automatically attack the enemy as melee if they're too close

#

and not give them the option of aiming the bow

maiden wadi
#

I mean. I'm all for programmatical solves. But as an avid gamer this is also a player issue. If you want to pierce things in a straight line, don't offset aim at things close to you.

#

If you're a bad player, use something that bounces arrows off of targets.

eternal reef
#

I am always hesitant to remove players abilities in some certain scenarios, would require some clear indication

runic terrace
#

There are lots of ways to solve this and it's a matter of game design, you should probably choose the best one that fits in your game

#

What works for one game doesnt always work for the other

eternal reef
#

Definetely, yeah I might give my current solution of changing the rotation of the arrow a few more tries, otherwise I probably just switch over to spawning the ability from the camera. Im investing way too much time in such a minor thing which most likely no one will notice anyway

#

Anyways, thank you all for the helpful inputs, appreciate it

runic terrace
#

You're welcome

night scarab
#

I am trying to create a widget in the top down template but even though I can interact with the buttons/etc just fine, the "Get Hit Result Under Cursor by Channel" node keeps firing so the player is interacting with the world unintentionally. Set input mode game and UI isnt working either. Is there a better solution than to use like an switch on enumeration to turn it off?

burnt nest
winged thicket
night scarab
burnt nest
winged thicket
#

isnt the idea of game instance that the vars in it doesnt change when you change levels?

burnt nest
winged thicket
#

and i save 17 other vars in game instance and it works

#

but for some reason this one doesnt work

burnt nest
#

Ah, between changing levels... yes, I would expect it to work for that. 🤔

winged thicket
#

what other stuff can make it not work
like its just getting all the "0_cup" and adding it to the game instance

#

and spawn them back

#

they dont even spawn

night scarab
rain fractal
#

I've attached a ProjectileMovement component to a Cube practicing making a simple rock throw in first-person

#

I can't seem to get the thing to lob forward in the direction I am looking at

#

Am I missing a step?

pastel rivet
#

Lets say i have 3000 boxes that change size simultaneously (Same size, size fetched from GM). Would it be more optimized to use a parent class for that box to fetch the size variable? or wouldnt it matter performance wise?

earnest tangle
#

It's getting it from a different actor, it makes no difference whether the function that does it is in the current class or its parent class

#

Most likely the action of getting the variable is the least expensive part of that whole thing, to the point that it probably doesn't even matter much

odd veldt
eternal reef
#

@runic terrace Managed to get it to work with my initial logic. Seems like while the projectile is moving, it does not accept any rotation. So at the moment when the first target gets hit, it stops the movement for a brief second (which is not noticeable ingame), rotation gets set to align with the initial line trace when the arrow was fired and afterwards I just add the velocity via the forward vector
Not the cleanest solution, but it works for now. At least the adjustment of the rotation only gets fired on the first enemy hit and when the ability is actually used, so it not that often fired

winged thicket
runic terrace
#

Oh ok no just got what you're trying to do now

#

Are you trying to just reset the level to its initial state?

winged thicket
#

the idea is that it saves the transform for "0_cup" and when restarting the level it spawns them at the same transform

runic terrace
#

Why not save the transforms before the restart occurs

#

And then load it right away when level starts again

winged thicket
#

you mean like event end play?

runic terrace
#

end play is when the game is closed

winged thicket
#

oh really?

#

anyways

#

it saves every 3s

#

and when the level is restarted it spawn them

runic terrace
#

when does the level restarts? if its with a button then you can just hook it up to that button

earnest tangle
winged thicket
#

my problem that it doesnt work, it saves but doesnt spawn anything

runic terrace
#

w8 lemme look at that bp again

#

You're saving actors as objects

#

save the class of the actors

#

not the object references

runic terrace
#

When the level restarts the actors get deleted and the object references become invalid

#

You need to save the classes of the actors

winged thicket
#

OHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
im stupid af

#

lmao thanks!

runic terrace
#

If you want the properties of the actors to be saved as well then you need to save the properties additionally and set them when spawned

#

You're welcome

winged thicket
#

ahhhhhhhhhhhh
atleast it works
tysm

earnest tangle
#

Does it? LULWW

#

I guess I never really tested it with that much detail

rain fractal
#

is there a specific way to make a specific actor ignore collision with a specific actor?

glad python
#

Use trigger box?

odd veldt
rain fractal
#

I don't get it, I used a Box Collision with a Cube as its child. I can't get it to ignore a specific actor still

maiden wadi
#

@odd veldtUse a pitch value for your actual spread variation. Randomly select a number between -180 to 180. Make a rotator out of that from Pitch and roll. Rotate your forward vector by it. Should work.

maiden wadi
#

Had a feeling. 😄

rain fractal
#

.

maiden wadi
#

This for instance will randomly spread your forward vector in a circle by up to six degrees.

#

Er

#

@odd veldt This rather.

#

Yaw should be zeroed.

odd veldt
#

this gives me a quare pattern i want a round one

maiden wadi
#

What I just posted definitely should not give a square pattern?

odd veldt
#

no, your image does not work

#

I need the 3 axes... its the camera forward vector

surreal peak
#

Yaw and Pitch should be enough. You won't really see any "Roll" or?

odd veldt
odd veldt
unique wasp
#

I'm having trouble with figuring out where the cursor is aiming. I use a simple raycast towards a vertical plane, but if I then put a point there, it's in the wrong spot. In this screenshot I clicked on the place of the black dot, but DrawDebugPoint gives me the position of the pink dot below it. What am I doing wrong?

#

This is the Blueprint for the raycast

#

(When I eject I can see that the points are in the correct plane, at least.)

warm ermine
#

Hey is it possible to make a attack only available during a certain few frames of a animation?

dire zealot
#

Hi all, I have a question, can anyone guide me to seek tutorials on how a player can switch between roles in a game in UE4 if they are playing against an AI?. For example, if a game is cops and robbers, I want a player can be able to choose which side they are on in the beginning of the match, like if they choose to be cops Ai is going to be robbers. And vice versa in the next match. Also is there a way to randomize it? Thank you for the guidance.

rain fractal
#

now I can't even open project I recenlty did days ago

#

nothign works

surreal peak
maiden wadi
#

That is weird. I swear I've used Rotate Vector for that before. :/ I could have also been dealing with pure local vectors though. I ended up with this.

runic terrace
#

ah w8 no

maiden wadi
runic terrace
#

Damn I missed out

odd veldt
runic terrace
surreal peak
#

I think one of the differences is how the rotations are applied

odd veldt
surreal peak
#

Could be that RotateVector does it in one go

surreal peak
#

Yeah I think the difference is how you are all calculating these vectors.
Authaer is first rotating it around Up, then taking the result and rotates it around forward.
That should be a different result than what "RotateVector" does.

earnest tangle
#

Interesting, has RandomUnitVectorInConeInDegrees new in 4.26 or something? 🤔

#

If it actually does that thing then it seems pretty handy, must've completely missed it somehow if it's not new :D

surreal peak
#

Don't know, I was looking for something to fix their problem but then this popped up

unique wasp
#

Note that the method you currently use has a strong focus of points in the centre: it's not evenly distributed over the surface of the circle. If that's desired or doesn't matter, then fine of course, but if that's not desired then you need a different implementation.

earnest tangle
#

Looks like there's a japanese UE4 related article mentioning the C++ version of this function from 2017

#

so I'm gonna say it's not new :D

runic terrace
#

It's probably a stealth node

#

was hiding

earnest tangle
#

or I just assumed that a game engine powering lots of shooting games wouldn't have such a function which is definitely unnecessary in shooting games

#

lol

odd veldt
midnight ravine
#

I'm trying to smoothly translate a meshcomponent using VInterp to Constant but it's as if I'm not using the node (jumps to new location)

#

the new locations seems to be correct but again, it's not smoothly translating.

earnest tangle
#

Are you calling it on tick?

midnight ravine
#

@earnest tangle it's just an event that gets triggered when the player presses a button so no, I don't.

earnest tangle
#

also you seem to be translating the forward vector which is not the position of the object

#

right - so the interp is not like a "fire and forget" thing which automatically interpolates something to a target

midnight ravine
earnest tangle
#

you'd need to call it over time until it reaches the target

midnight ravine
#

so I'd use a while loop?

earnest tangle
#

well it does the job but it doesn't do it the right way unless you call it with the correct parameters

zenith trout
zenith trout
earnest tangle
#

a while loop does not work because a while loop runs within the same tick

#

calling it on tick, or from a timeline, are the two options that would make it work

zenith trout
#

^

midnight ravine
#

@zenith trout and an ease node is a "fire and forget" node?

fossil crystal
#

Good Morning everyone, little help please? all I want is the Month a date and current year (But it cannot be before today)

zenith trout
#

I’d go with tick or a timeline

#

I haven’t used the ease node before but logically it probably wouldn’t work as the value would still only be set once instead of every frame as it interpolates

midnight ravine
#

I'd have to set a boolean flag so that the event isn't called all the time right? So I'd just do something like this?

earnest tangle
#

Ease is similar to VInterp in that you'd need to call it several times over time

midnight ravine
#

oh, nvm I can't even call the event.

#

how would something like that using tick look like though? Would I need an additional flag?

#

that's the only way I've ever worked within the tick function.

earnest tangle
#

A flag would be one way to do it yeah

#

Depending on how your actor works, you can also turn tick on and off

midnight ravine
#

how would you do it without one?
My Actor is based on a custom cpp class but I don't know if I should be turning tick on and off just for my "animation" to run.

earnest tangle
#

you'd need to have some way of determining whether it needs to be animated or not, so a bool would probably be easiest way to do it tbh

#

the other option is using a timeline, the timeline node will run similar to a tick

midnight ravine
#

gotcha. Thanks a bunch

fossil crystal
#

anyone know what im doing wrong here, the year format is all messed up

earnest tangle
#

Messed up how?

#

The Get Year node will get the year value from an existing date time, so it probably doesn't return anything very useful there

slow valve
#

The selection list in the Force Feedback Effect is not appearing . Can anyone tell me where did i mess up

#

trying to select fire material from the list but the list is missing. I'm noob and need assistance

earnest tangle
#

Do you have a force feedback effect?

#

You're saying "fire material" which confuses me a bit - force feedback effects are not materials

slow valve
earnest tangle
#

So are you actually trying to spawn a force feedback effect? (as in, something that causes gamepad rumble/feedback effects)

#

or something else

slow valve
#

yes

earnest tangle
#

Have you created a force feedback effect asset?

slow valve
#

what should i do to resolve this

slow valve
#

how should i do that

earnest tangle
#

right click in content browser, under miscelanerous you should find force feedback effect

midnight ravine
#

@earnest tangle I tried what you had suggested. The sword does not get set back to its original position but I can't figure out why.

pine roost
#

Why, no matter how hard I try to clean up the zero field, does it always give it to me as populated?

midnight ravine
#

the float is from the timeline

#

@pine roost because you're not "cleaning" the value at index 0. You are removing the item at index 0.

#

you will get a value until there's no items left in your array

earnest tangle
#

this way you could have the timeline go up and down to have it first move away from start, then back to start

midnight ravine
#

that's exactly what I want. I'm currently just having the timeline go from-to: 0, 1, -1, 0.

#

is it because of floatpoint calculations that it doesn't get set back to the original position? the math seems correct to me. Just curious.

earnest tangle
#

It's probably because the rate at which it gets called varies by framerate and such, so it ends up doing slightly different amount of calculations per direction, so the overall movement doesn't match

#

That's why it should work with lerp if you just save the start and end positions into variables, and lerp between the two

midnight ravine
#

@earnest tangle this way the sword just goes into infinity. Timeline: 0, 1)

pine roost
fossil crystal
#

okay heres my dilemma,, i want to pull the current year and subtract 1

midnight ravine
earnest tangle
#

Also with this method, you'd need to use set actor location, not add offset

#

(either set local or world should work)

midnight ravine
slow valve
#

@earnest tangle i'm still not able to select an asset in Force Feedback Effect after trying the above mentioned options

midnight ravine
#

It works in general but the sword just stays at the new location.

pine roost
earnest tangle
#

@midnight ravine is the sword actually attached to the player in this case?

midnight ravine
earnest tangle
earnest tangle
# midnight ravine

okay, so I think it would work better if you set the sword's local position, and make sure you use the same location in A, your current method changes the A position if the sword moves, so it doesn't return correctly

midnight ravine
#

@pine roost if you can rule out that there won't be a vector with 0,0,0 in your data then just check against that when you do the calculations. Or instead of replacing the value with 0,0,0 just replace it with something unrealistic like 999,999,999

slow valve
earnest tangle
#

Oh, sorry maybe I was unclear

#

you can also do it by clicking the add/import button there

#

click it, go into miscelaneous, choose force feedback effect

#

this should create a new ffe asset which you can then modify and also select from the spawn node

gentle drum
#

Anyone know how to get a simple text body from a url and then save it to a slot . Then recall it to a widget UI? Anyone ever seen this?

slow valve
pine roost
#

I am working with instancedStaticMesh.

Generating them in a random position in runtime, I would like to perform a check on collision with other objects, so as not to create them if there was an overlap. Is there an effective way to do this?

midnight ravine
#

@earnest tangle not really working well. I'm saving the current position before heading into the timeline but
a) the sword keeps turning in the original direction even when the player rotates while the timeline is running
b) the sword still doesn't set itself back to the original position.
c) using SetRelativeLocation yield weird results

I probably misunderstood you on some part.

midnight ravine
pine roost
midnight ravine
#

@pine roost won't you want to spawn the instances at some point though?

pine roost
earnest tangle
#

also the set actor forward vector will return the forward vector in world space, so if the player turns, that also causes the result to become different

#

in local space you can also just use some vector like 50, 0, 0 or whatever as the target position since it just moves in local space

shell jetty
#

I'm attempting to create a function that creates automatically resizes a collision box to encapsulate all of the spline points inside a spline. I was able to code something that gets close, but I wanted something more precise similar to the Bounds.Encapsulate function from Unity

#

Btw, I just need it to adjust the X and Y(length and width) of the box. The depth is handled separately

brittle plinth
#

Is there a on collision touch event that I can assign to a mesh with collision? So that when it touches something, it executes code?

midnight ravine
#

@brittle plinth AFAIK no. Add collisionbox to your mesh and use the OnOverlap event from the collisionbox.

#

I don't know what to attach my weapon to. Currently, when the player looks around the weapon starts to look weird. What is causing that/how should I attach the weapon instead? I'm currently attaching it to the capsule component of my player.

midnight ravine
brittle plinth
paper galleon
midnight ravine
paper galleon
#

Check that it's not using pawn control rotation. I don't think it should be able to. But check

midnight ravine
paper galleon
#

Yep it's not able to.

midnight ravine
#

the pawn itself:

paper galleon
#

The usual method is to attach to a socket on the mesh.

midnight ravine
#

I can do that.

paper galleon
#

Only yaw

#

For pawn itself

#

For spring arm, you can use the pitch

midnight ravine
#

if using yaw only the sword stays put.

paper galleon
#

Yeah. The pitch of the sword should be set another way. Either from aim offset in anim BP or attaching to the spring arm as suggested earlier

midnight ravine
#

gotcha

paper galleon
#

If you inherit pitch on the pawn and look at it from a third person perspective, you'd see the character rocking back and forth which is usually not what you want

brittle plinth
#

How can I stop a sound I previously made Using Play Sound at a Location?

blissful gull
#

does the construction script run in packaged games?

#

im having an issue with actors i spawn in a construction script disappearing in the packaged game

earnest tangle
brittle plinth
trim matrix
#

do you know how to make a camera shake?

brittle plinth
#

I'm using these nodes to call a function in another actor blueprint. It works.
But now I have stored the actor in a actor variable but I can't call the function from it. What am I missing?

#

Picture of the variable

icy pilot
#

Is there a way to remove those "Reset to default" things ?
Or at least do a double check if you really wanna reset it ?
I feel like one click could destroy too much work 😅

dawn gazelle
# brittle plinth Picture of the variable

Your "Target" variable is only of type "Actor" which isn't specific to your BP. You would need to cast to your specific BP type before you can access the functions / variables that it contains.

brittle plinth
dawn gazelle
paper galleon
brittle plinth
paper galleon
# fallen glade why ?

Because the construction script is run every time the smallest change happens to your blueprint in editor. Changing variables, dragging the actor in the level, simply clicking the compile button.

#

You normally can't call the spawn actor node in the construction script but it is possible to bypass that by wrapping in another function

fallen glade
paper galleon
#

The side effect is that you can potentially spawn thousands of actors without knowing.

midnight ravine
#

@fallen glade use BeginPlay instead. That's probably what you want. EXCEPT you need something to happen before runtime (before you can interact with the world as a player)

paper galleon
fallen glade
fallen glade
paper galleon
#

Yeah and the array issue too is there also. You're lucky you caught it quickly.

midnight ravine
#

mb wrong @gritty aspen

paper galleon
#

You can clear the array before doing anything else in the construction script. That's what I do

blissful gull
paper galleon
blissful gull
#

Yeee

rapid token
#

So I have visibility variable. Is it possible for me to check if the visibility is visible, and if it is, it will set the visibility of something to hidden..?

#

I hope that makes sense lmao

runic plinth
#

Quick question, in editor how do you teleport/move the far away actor to the location you are pointing at instead of dragging the pivot

earnest tangle
#

You can right click choose snap object to view, think that should do it

#

there might be some shortcut for it too but not sure

fallen glade
#

Could someone explain to me the error in my logic please?

(This is a blueprint component)

1 - At begin play collect owner
2 - When given the command, add a static mesh to owner (works)
3 - When given the command, remove "mesh" from owner (triggers, doesn't destroy the mesh??)

earnest tangle
#

Can't really say just looking at it, it seems like it should work

#

The one thing that comes to mind is that if the false branch triggers multiple times for some reason, it would cause you to get multiple meshes and "lose" the earlier ones

zealous moth
#

the question is why do you want to add and remove that component

fallen glade
#

:/

earnest tangle
#

So does it enter the remove branch correctly?

fallen glade
zealous moth
#

@earnest tangle based on what he said, yeah but his component isn't destroyed

earnest tangle
#

and it remains visible despite being destroyed? 🤔

zealous moth
#

again though, why destroy it?

fallen glade
#

why not?, one thing less to care about

zealous moth
#

:/

earnest tangle
#

Just as a test, try changing it to invisible instead of destroying

#

I don't think that should make any difference but it seems kinda weird destroying it wouldn't get rid of it

fallen glade
earnest tangle
#

:D

#

I wish I knew, that makes no sense to me

fallen glade
#

haha lol I'll keep trying

fallen glade
zealous moth
#

maybe not garbage collected?

earnest tangle
#

Yeah, although it seems a bit weird it would affect it in that way 🤔

#

I guess you could try destroying it, and then clearing the variable so it no longer has any refs to it

zealous moth
#

just tested:

#

works as intended.

#

oh you know what

#

might be because component tick was disabled

#

he is disabling tick but you need tick to progress in the bp logic

earnest tangle
#

I don't think tick should affect destroy

#

disabling it would just stop the Tick event from being called

zealous moth
#

a lot of things are on tick, like collisions. If you disable it, there is none detected

fallen glade
#

Tick is fine, might be because I try to remove the component from a component?

zealous moth
#

ah there it is

fallen glade
#

but my components share the same owner

zealous moth
#

so your component is part of another component?

#

says so in the tooltip, can only be called by the owner

fallen glade
#

that's a bit annoying, oh well thanks guys!

zealous moth
#

np, but your logic is very odd to say the least. Why disable the tick? Why destroy the component?

earnest tangle
#

I haven't really tried disabling component tick much so not sure about that :)

#

that owner aspect of destroying the comp is interesting

#

I wonder why it works that way

fallen glade
#

and doing it as a component so it's plug and play

zealous moth
earnest tangle
#

Might be yeah

paper galleon
zealous moth
#

^ pretty much this

#

and resizing on tick.... that's kinda weird

#

and disabling tick before destruction... why?

#

just kill it

earnest tangle
#

it's actually disabling tick on self, not on the destroyed comp

fallen glade
trim matrix
#

Someone please help me been struggling with this for a week. I need to create a local database with Structs + savegame instance . Still very new to unreal but learning fast. I need to be able to call a url then convert string to text. Save that text to the database mentioned earlier with Structs + savegame instance . I been using Varest to pull the text from a url. I cannot for anything get this working. Please please help? Does anyone have an example project that does this? Can you share one so I can see the logic? If this helps this is the text value I need from https://www.coinexplorer.net/api/v1/DASH/circulationSupply . So I need to pull the valve “text” from the api and save it. Then be able to call the saved value to a widget blueprint. If someone can help me. I can pay a reward in litecoin, Bitcoin or etherum. Thank you

fallen glade
paper galleon
fallen glade
zealous moth
#

yeah cause you will trigger massive garbage collection later >.>

fallen glade
zealous moth
#

just disable them, they will do nothing at runtime and if you need em enable

fallen glade
paper galleon
fallen glade
paper galleon
#

Yeah. Activate and deactivate is better. If you're really concerned about performance (which isn't very even significant in this case), you can even rework your shader to avoid using the component at all. I may be very wrong here but I think a Fresnel node can give meshes outline of a certain colour.

late cave
#

Why am I not seeing components added via Blueprints in the details panel of actors when pressing play in editor? There should be a component here!

gentle urchin
#

I would think its because its some sort of a static view

#

Dynamically added stuff never showed for me in the details panel (altho i never needed them there either)

late cave
gentle urchin
#

I suppose it could have its benefits. You could expose it as a variable that is instance editable variable and get it confirmed that way

late cave
#

Right, but that's so extremely limited... I mean, the components have their own variables that I want to check in on!

gentle urchin
#

Hmmmm

#

Cant you check the component itself?

#

I was pretty sure one could...

#

Havnt touched a project in a few weeks so dont recall properly right now (vacation mode hit me hard)

late cave
#

Yes, you can open the blueprint asset and then check the drop down list to see how many are active, but it's not an easy thing to deduce, and then you have to add watches manually, etc, etc

gentle urchin
#

Doesnt sound very intuitive does it

late cave
#

No 😦

gentle urchin
#

Is there a "register component" function exposed in bp?

#

Done in cpp, only diff i see is the register component...

#

But even then there's limits to it

paper galleon
#

You just add the component.

gentle urchin
#

Right, but it doesnt show in the details panel as eobet pointed out

paper galleon
#

Yeah. It wouldn't. It's not a variable

#

The ones that show in details panel are explicitly UPROPERTY variables.

late cave
late cave
opal ivy
#

So, why isn't Blueprint nativization talked about more often?

late cave
opal ivy
#

I was unaware of this. That's.... frustrating.

late cave
#

But yes, it's sad that they abandoned it instead of figuring out how to improve it (which I bet they tried, but still).

zealous moth
#

?? Never had issues with it

opal ivy
#

Debugging in C++ is getting the better of me between compile times and editor restarts.

zealous moth
#

As long as your bps are not overly complex nativization works pretty well.
Like loops with multiple entries or nested loops may cause issues.
But simple things dont

opal ivy
#

Nested loops, from my understanding, are one of the biggest performance bottlenecks for BP

zealous moth
#

Depends how you make them. Unless it is a 3d grid simple chain loops should be fine. And if you run them on tick just use a modulo frame skip

opal ivy
#

Recently I've been trying to convert my rollercoaster track mesh generator from BP to C++ (with hopes of it running in real-time in-editor) but somehow I've managed to screw my vertex placement and it's frustrated me to not wanting to work on it.

zealous moth
#

Why nativize that? Sounds like a regular constructor

opal ivy
#

It's slow enough that it doesn't run well in editor while adjusting a spline, but fast enough that I think the little extra speed could make it run realtime

white lynx
#

Is there a way in BP to get the path name from a TsubClassof Variable?

zealous moth
#

Dunno if you can run command to do it

trim matrix
#

I'm trying to set control rotation from two locations atan2 degrees but the pitch is from -90 to 90 while atan 2 result pitch is 180 above the range, how to fix?

fossil dagger
#

Would anyone know how to add controller input yaw as recoil in the VR template? Do it exactly as described doesn't work.

#

I have a gun set up, does everything but the recoil

#

And the node Add Control Input doesn't work

rapid token
#

Hey, im having troubles with the widget component.

#

Im using the same widget on my screen and on the laptop screen but when I press E, it doesnt get updated on the laptop screen
Ive tried manually updating it every frame, but that doesnt work.

mossy vessel
#

Is there a way to ignore other pawns on the camera I am getting a weird flickering when the ai attacks my player?? Not sure what it is ??

foggy escarp
#

would anyone know why get directional vectors of actors and components are retrieving the respectable vectors from the world rather than the object?

#

using the get forward will do the same thing and still of the world rather than the actor

#

This is quite confusing to me because i've been in a long term project for almost a year now. This is not the first time using these nodes.

wind sequoia
foggy escarp
#

oh wow i should of known that

wise edge
#

Hi Im trying to replicate a top down ability like League or Dota for example.

To throw an object to a SPECIFIC location. Ie, the abilities landing location must be a parameter and it should travel through the air like a grenade or something. Can anyone point me in a good direction?

Maybe i can just translate the object between two points but with a curve thrown in so it looks like a throw?

strong flame
#

Is the take high resolution screenshot through blueprints calling something other than the one available from the menu? The args are totally different… notsureif

granite seal
#

SweatPepe gonna assume this right spot for this question,

How do i set up the variable in save game object for morph targets so when save and load it keeps morphs targets?

I'm about 24 hrs into this and i know its probably super simple but for the life of me i can only do whats visually show like all the tutorial videos, yet none covers this exact question *or at least i can find lol ASsad

tranquil steeple
winged thicket
worthy tendon
rapid token
maiden wadi
#

You need to show how you're trying to update the widget.

rapid token
#

With the option to update every frame?

worthy tendon
rapid token
worthy tendon
#

you can probably use a render target to show what's in the other widget

rapid token
#

I shouldnt need to do that though, it should be updating every frame with the new values in the variables

worthy tendon
#

there are some nodes about Predict Projectile Path. maybe you can use that as well. @wise edge

worthy tendon
rapid token
worthy tendon
#

They don't share same state

rapid token
#

I dont understand ._.

#

If the Player and Laptop BP share the same variables, why can't the Widget Component inside the Laptop BP share it as well?

worthy tendon
#

show me how you create two widgets?

#

the one for laptop and the other for player

rapid token
maiden wadi
#

This is entirely moot until we know how you're updating the widget. Tick? Which tick? Timeline? Where? Widget binding? Show how you're doing it.

worthy tendon
#

Ok I found it. You need to do this

worthy tendon
#

that function is just an example, you need to get the 2d widget from player and set it to the widget component. it should show the same thing

worthy tendon
#

that's for the player. and how about widget component?

rapid token
#

Yep

rapid token
worthy tendon
#

widget component creates it's own widget. I suspect you set the class here.

rapid token
#

Yep

worthy tendon
rapid token
#

How do I get the players widget??

#

Ive never had to do that before lol

worthy tendon
#

after you create widget, just set that for the widget component as well.

rapid token
rapid token
#

Any idea why everything is squished together though?

#

Its normal on the player's viewport

worthy tendon
#

Try Draw at desired size

#

show me your layout

rapid token
#

Nope..

rapid token
worthy tendon
#

maybe wrap the whole thing in ScaleBox. then set draw size manually. let me try

rapid token
#

Hm okay.

#

Did it work? @worthy tendon

worthy tendon
#

are your pivot points correct? for each element inside the canvas.

rapid token
#

What are the pivots supposed to be?

worthy tendon
#

for each element it should be center of it. pivot point is that star thing

#

sorry it's anchor.

#

not pivot point

rapid token
#

Yes, all of the anchors are correct.

worthy tendon
#

With smaller draw size your fonts become relatively larger. I think that's the issue

#

try 1280x720 draw size and scale the widget component to fit. (no draw at desired size)

rapid token
#

That works, thanks.

worthy tendon
#

but that has extra cost though. you can try 1920x1080 and that should look exactly the same as what you see on screen. (if your resolution is 1920x1080 as well)

rapid token
#

Okay, thank you!

worthy tendon
#

one last thing, maybe do this so that it looks the same at all resolution settings. remember to update this again when you change resolution in game settings. @rapid token you need to adjust scale as well, i'll leave that for you 😄

rapid token
#

Alright, thank you so much for your help!

dire atlas
#

Hello everyone, tell me why the picture is so stretched?

worthy tendon
dire atlas
worthy tendon
#

how do you set the image brush?

#

if you do this, tick the match size

dire atlas
#

Image stretched differently

worthy tendon
dire atlas
worthy tendon
# worthy tendon

this was just an example, you can move them into center as well like you shown at end of video

#

Nice graphics btw 👍

dire atlas
ornate sleet
#

Question. I'm trying to make a cone aoe attack. Mainly a fire breathing system for a dragon and abilities. Naturally I know I would just use a trigger. Thing is I am wanting to detect if the object can burn. Torches, oil, ect. This would be a tag. But what I'm wanting to do is have the blueprint check if a particle hit it so it can do its own events. Is there a way to have the blueprint check for that particle? And what's the best way?

maiden wadi
#

Very rarely do you use particle hits to detect gameplay decisions. Most times the gameplay math is significantly simplified, and the particle system is created to match those parameters.

little cosmos
#

Working on a scene where I have a day and night scenario.
My persistent level has all of my geometry, my day map has my day skysphere,skylight, directional light and my night scenario will have it’s own skylight, directional and skysphere with stars. Scenarios will be toggles with a key press.
I have several meshes that have backlighting on signage that turns on in the night scenario and I am wondering the best way to acheive this.

A typical mesh is a wall with signage as a different material channel so the idea is during the day it is just an opaque white but at night time it turns to a different material which is emissive.
One thought I had was to duplicate the object and have one day and one night object with different materials but I don’t know if that is the best way.

Thanks in advance for any help.

jovial ridge
#

hi, i've got a quick question. How to change a static mesh in a blueprint so that the pivot will be located in correct place?

atomic salmon
#

@jovial ridgeplace a scene component where the pivot needs to be, parent the mesh to it and rotate the scene component instead of the mesh

crimson hornet
#

Hello I have an problem I tried searching on the internet but none of it helped so ill ask here. The problem is: my event from an interface isn't getting called.

crimson hornet
atomic salmon
jovial ridge
#

but still, pivot is moving with object

atomic salmon
#

actually it is the object which moves with the pivot (scene component) in this case

#

if you want to change the pivot for the static mesh iteself, either you do it directly in the level or you edit it in Blender/Maya/...

earnest tangle
#

^it's probably a good idea to fix it in the 3D tooling tbh, because if you ever need to do calculations based on the dimensions of the object etc. it may be a bit annoying to deal with it if the centers of your meshes are in different places and such

atomic salmon
#

for a simple rotation around the z axis the scene component trick will do, but I also prefer clean implementations (fix the pivot in your DCC tool of choice)

jovial ridge
#

yeah, but i need to change only pivot position 'cause when i changed the door mesh it stoped working properly

atomic salmon
#

@crimson hornetstart looking where the interface method is called. Does the call actually take place? Is it happening on the right actor?

#

@jovial ridge if you need a modular solution (working for all doors) then your best option is to get the pivot right on the mesh itself. So fix it in Blender/Maya/etc. and reimport

pseudo chasm
#

hey guys. Can anyone help me out , on my project

#

which is to display and indicator path from a location to another

#

like gps

pure garnet
#

Hey am I blind or is there no documentation for blueprint stats plugin anywhere?

surreal peak
#

Looks like all it does is give you a console command to log some stuff

#

DumpBlueprintStats

pure garnet
#

Interesting was there a document with this information I can reference?

surreal peak
#

Source Code :P

pure garnet
#

or am I better off finding the plugin source

#

Yeah

#

Figured

#

Ty

pure garnet
#

Appreciate you

brittle plinth
#

how can I add an interface to a blueprint actor?

#

Ah I found it! It's in class settings

atomic salmon
#

@crimson hornetis the target actor actually implementing the interface?

crimson hornet
#

yes

#

sorry for late respone

surreal peak
#
  • Is the Object you call the Interface Message on valid?
  • If Valid, is the Object the one you expect? (print its name)
  • Does the class of the Object implement the interface?
  • Does the Interface Message call even happen? (breakpoint it)
  • Does the Event actually call but something after that doesn't and you are looking at the wrong "issue"? (breakpoint it)
#

Some of this was already asked

#

But that's basically all you have to check

#

Interfaces aren't really that complex

crimson hornet
#

yes it is valid

#

ill send some screenshots

surreal peak
#

Why is that a Server RPC :D

crimson hornet
#

idk

surreal peak
#

Now i have the feeling that your network code is just wrong

#

If you do a multiplayer game, then Health should be an OnRep variable

#

And in the OnRep function you should access UI and update it

#

And you should already be on the Server when you modify the Health var

crimson hornet
#

mhmm

#

thinking

#

does that also have some sort of connection with the interface not being called?

surreal peak
#

Well I believe, just from the screenshot, that you are trying to update the visual health above the characters head

#

And you are only calling that on Server side

crimson hornet
#

thats true

surreal peak
#

So clients won't see this

#

If you play with a dedicated server, then it would seem that it doesn't call

#

This is basically the wrong place to do this

#

It needs to be in an OnRep of the Health Variable

crimson hornet
#

okay

#

I made it an onrep variable

whole dune
#

I‘m sorry for this question but i actually don‘t know how i can simply move my pawn forward with „w“... without physics..

atomic salmon
#

@whole duneyou can simply give it a new world location based on the expected movement. Basically you take the current world location of the actor and offset it by the amount of the movement. First define the forward axis, then multiply it by the movement distance over one frame (say 10 unreal unit = 10 cm), then use the result to feed an AddActorWorldOffset call.

whole dune
#

Wouldnt that look jittery

#

Or am i understanding this wrong

atomic salmon
#

This way of moving an actor around is called kinematic, as opposed to using physics which entails adding forces/torques to your simulating actor.

#

Yes, it will look jittery if your offset is too large.

#

Make the offset small enough and it won't look jittery.

whole dune
#

Ok.. i‘ll try, thanks

atomic salmon
#

That is also related to the speed of movement of course.

#

If an actor moves very quickly you can expect it to have a large offset from one frame to the next, which is perfectly fine.

whole dune
#

Yeah.. my pawn is moving along a spline so maybe i can use a timeline aswell

atomic salmon
#

Then you can get the distance along the spline, find the next point your actor needs to move to and move it there. Then increase the distance variable and repeat.

whole dune
#

Alright

atomic salmon
#

If it is like a vehicle following the spline or a character you will also need to adjust its rotation

whole dune
#

Already got that set up

atomic salmon
#

Sweet

whole dune
#

Well thanks for helping

#

Appreciate it

atomic salmon
#

You are welcome 🙂

#

@crimson hornetnext time please keep in mind that mentioning you are working on a multi-player game is a quite relevant piece of info... 😉

hazy linden
#

hi guys

#

Im just calling the crouch function and the character seems to be going under the floor

#

any idea why? and any fixes?

atomic salmon
#

@hazy lindenmake the character capsule visible in game, you will see what is happening.

hazy linden
atomic salmon
#

Basically when you crouch the capsule becomes shorter, so your character can pass under obstacles. That shifts the center of the capsule down. If you don't adjust the animation/pose of your character accordingly, it will look like he is going partially through the floor.

hazy linden
atomic salmon
hazy linden
#

as u can see, if i use the default thirdperson character, its working fine. I'm unable to figure out what setting i have messed up to get this happening

atomic salmon
#

You mean the skeletal mesh stays on the floor even if you crouch and the capsule becomes smaller?

#

It should be controlled by bCrouchMaintainsBaseLocation

hazy linden
#

lemme give it a shot

atomic salmon
#

also check what the spring arm + camera is parented to

hazy linden
#

im not using a spring arm

hazy linden
small swift
#

Hello, is this the right chat room to ask for help with UE4 blueprinting problems?

small swift
#

Sweet, I'm adding enemy archs of view with a procedural mesh, which are being updated via line tracing. In the editor the archs will get updated when I move the enemy BP, but when I play, the procedural mesh won't update and will hold the shape they started with in editor.

#

(Works in reverse order)

rigid tundra
#

I'll bet you guys I've got something you've never had

#

a blueprint node that is deprecated

atomic salmon
#

@small swiftyou shouldn't call the line trace + adjustement to the procedural mesh from the Construction Script. It should be called from an On Tick Event.

fair sun
#

how do you go about passing multiple options while opening a new level?

zealous moth
#

In bp you cant the way you show it. You would need to create your own game instance and store variables

maiden wadi
#

@fair sun @zealous moth You pass multiple options by separating them with ?. So "MyOption1=315?MyOption2=true"

lofty hound
#

I have an array that changes the amount of elements within it depending on what happens in game. How can I get a copy of a random int within the range of the array elements?

maiden wadi
#

@fair sunSo, in the order of top to bottom. Passing a string, passing a true/false, passing an integer.

hazy linden
small swift
remote obsidian
#

Hi there, is it possible to add a blueprint component to a regular actor in a level? (not a blueprint actor)

Basically I've created a separate blueprint actor in the scene that will have logic to activate / deactivate other actors based on the component attached to them

My scene is mainly imported via datasmith so I dont want to go around converting every sub-object to blueprints as that may be lost on a later reimport (also the sub objects have children that I also want access to without having to dive into blueprints whenever I need to make a small change ie. change the angle of a door)

I've mainly used unity in the past so I'm used to being able to add components to objects in order to create functionality

How should I approach this?

#

Aah it seems I can add the components to the actors but I can't do multiple at once so I have to do each manually

#

?

atomic salmon
#

@remote obsidian what are your "components" meant to do? Manipulate the actors inside the level/editor or provide a behavior during game play? The former can be addressed via editor scripting. The latter can be achieved by turning the actors into blueprints. If you create the behavior in a base class and then base them all on that class, they will all inherit that behavior.

vast crow
#

How to bind events inside functions?

maiden wadi
#

They need to fix that event auto generate to go to a graph. 😄

vast crow
#

Created an ugly intermediate event for that. Why not just allow selecting any events from the list

atomic salmon
#

@vast crowyou don't. Functions are not Event Graphs, they are reusable pieces of code meant to be called multiple times from multiple code locations.

vast crow
#

Aren't events too?

maiden wadi
#

Just cut the event and paste it into the Graph. Then set the CreateEvent node to the event.

atomic salmon
#

@vast crownot really. What I mean is that by binding an event "hidden" inside a function (which is anyway not possible) means part of that functions would be run each time the event is triggered, which logically doesn't make sense. That is why Events need to be outside of a function and inside an Event Graph. If you want to hide a bit of the complexity you can always collapse that part of the code in the Event Graph or use multiple event graphs.

vast crow
#

means part of that functions would be run each time the event is triggered, which logically doesn't make sense

Lambdas make a lot of sense, though. I see something similar here.
Anyway, it's possible by putting event into event graph

atomic salmon
#

Lambdas can be argument to functions, but they are not called asynchronously from within a function with an own entry point.

#

That said, you can do whatever works best for you provided the VM supports it.

vast crow
#

Slowpoke I got it, the CreateEvent list actually discovers event from event graphs, I just had wrong parameters in the event I wanted to bind. All good then

eternal kraken
#

Quick question, why does this cast fail? (GM_Main is the default level gamemode)

#

Calling this in the player controller

#

since i need to get and set a variable from the gamemode inside the player controller

whole dune
#

Does anyone know why my spline is so way off on curves?

atomic salmon
#

@whole dunewhere is the pivot point of your rail mesh?

whole dune
#

I fixed the mesh

#

Its just off

whole dune
#

I totally forgot to check that

#

I tried adjusting the relative location but that wouldnt fix it

atomic salmon
whole dune
#

I fixed it and its still off

#

Hmm

#

I‘ll have to fix it inside blender

earnest tangle
#

Print the name of the object you get from get game mode

#

or do get class and print it

#

that should give you an idea

lofty hound
#

Having a bit of trouble with taunt logic on my turn based game. by default all enemies are targetable but when taunt is applied to an enemy or more than one enemy i need only those enemies to be targetable. How would i approach this in BP?

earnest tangle
#

Depends on how your "is this a valid target" logic works I guess

#

you could for example do a loop of all the enemies, and if any of them have taunt, don't allow targeting anything that isn't one of those

atomic salmon
#

@eternal krakena cast fails either because the object you are casting from in invalid or the object is valid but it doesn't have a relationship with the class you are casting it to (for example is derived from a different parent class). I would suggest you to place break point on the cast and check what happens when the execution gets there.

#

@whole duneyes, that is the only way to make sure the pivot is permanently in the right location.

worthy tendon
#

Why do you want to get length of cube with line trace? You can probably get mesh bounds and that gives you the length

hasty river
#

I recently started to do a pedestrian system and i´m trying to figure out how can i make that my NPC´s character move along desired track points, but the problem is that i don´t know how can I save all track points in array and then sort them with the distance, when I try to do this all of my NPC´s are stuck in the first track point and don´t move to next points. Does anyone know how to help me solve this problem ?

grave hornet
#

anyone have a guide/link for how to build a fixed/isometric camera for a 3d game that moves with the player? kinda like lego games or Marvel Ultimate Alliance

heady rain
#

hello everyone. should I be moving my actors like this? or should i connect "speed" directly to the "AddActorWorldOffset" node? does "AddActorWorldOffset" node multiply the input with deltatime inside itself already?

worthy tendon
# heady rain

This should be ok. The value you give to speed would be centimeters per second.

eternal kraken
worthy tendon
#

Make sure your custom game mode is applied correctly

#

Check project settings and world settings

eternal kraken
#

it is

atomic salmon
#

print the name of the game mode before the cast

#

let's check what it actually is

eternal kraken
#

It's the correct type

#

This is very strange

#

I have a Create Widget node right after

#

And the Create Widget node only gets called if i switch the exec to Cast Failed

#

so the cast fails

#

but it's the correct type to be casted to?

atomic salmon
#

@eternal krakenfirst things first, it seems you are developing a multiplayer game but you are handling the execution flow like it would be a single player game

#

I suspect your problem is mainly due to this

eternal kraken
#

I'm still learning multiplayer in UE, watching a whole multiplayer series didn't help me learn much so i'm just jumping straight into it

atomic salmon
#

yep, got it

eternal kraken
#

It seems like the gamemode is invalid

atomic salmon
#

so your problem is that the Game Mode object only lives on the Server Side

eternal kraken
#

Ah

#

thought it would somehow get replicated to the clients

atomic salmon
#

so if you do a Get Game Mode on the client side it will fail

eternal kraken
#

I need some way to store global variables

#

For all the clients to be able to access

atomic salmon
#

That is the Game State

eternal kraken
#

Got it, thanks

atomic salmon
#

Np. If you still have multiplayer related questions it is better to ask them in #multiplayer

eternal kraken
#

ah

#

Still have one question

#

I'm thinking of making an array on the server to store all the animation speeds for the players (and i need to change the animation speed for the current player inside the player pawn)
Would that be a good idea or would there be a better way to achieve this

atomic salmon
#

Is that something all players will use, they just need to be told by the server which one to use?

eternal kraken
#

I need all the players to see eachother using the proper animation speed

#

Each player will have their own animation speed, not being able to modify the other player's

atomic salmon
#

got it. So if the player changes their animation speed locally, you need to let the server know by using a server side RPC. Then from the server you can inform the other clients using a multicast. This is one way to do it, there may be other ways.

#

Again, ask in #multiplayer, it is better suited for this type of questions.

eternal kraken
#

Yep

#

Got it

#

Thanks for everything

atomic salmon
#

You are welcome

pine trellis
#

hey everyone, I am using a time line to make my health go up but it always goes up from 0, how can I start it from my current health instead of 0

worthy tendon
#

You should use tick not timeline

mild lotus
#

The first two putts work normally, but 50-60% of the time, the golfball hits an invisible object on the way to the hole

#

there's literally nothing for it to be bouncing off of like it does in the last four-five putts in the video

#

simply enabling physics, does anyone know what it might be bouncing off of?

#

(might need to watch in full screen to see it clearly)

atomic salmon
#

@mild lotusis the ground a terrain or what?

mild lotus
#

landscape

atomic salmon
#

got it. Engine version?

mild lotus
#

4.26

atomic salmon
#

go to your project settings, under physics and set Min Contact Offset to 0.0001 and Max Contact Offset to 0.001

#

see if it still does it

mild lotus
#

the first putt I tried worked perfectly so I thought it was fixed but then the next two bounced, so no luck but I appreciate the try!

atomic salmon
#

ok wait

#

iirc there is a known bug in 4.26 which ignores the contact offset for the landscape

mild lotus
#

so maybe I should update to 4.27?

atomic salmon
#

that may solve it

#

need to check the source code for 4.27

fluid lance
#

So I have a struct A that has an array of structs B. Struct A is used on a Data Table.
If I edit struct B, the engine crashes. Also, since struct B has an Enum E field, if I edit Enum E, struct B gets updated and then proceeds to crash. (This is how we found the crash, actually. Trying to add a new entry to the Enum).
Does anyone have any idea on how to solve this? I have been googling and trying a few different hacks for the past 2 days, between moving the struct B file to another folder, deleting saved/intermediate, forcing a refresh on all dependencies...

We have found this https://issues.unrealengine.com/issue/UE-40033 which is pretty similar and supposed to be fixed.

`[Compiler] Invalid property 'DialogStates_10_A3CEF14C4AFD47CB903227A69891E54A_Value' structure 'SDialogArray' error: Struct 'UserDefinedStruct /Game/Programming/Core/Gameplay/Data/SDialogArray.SDialogArray' is not compiled

LogBlueprint: Error: [AssetLog] D:\Projects\ProjectName\Content\Programming\Core\Gameplay\Data\Dialogs\SDialog.uasset: [Compiler] The variable DialogStates_10_A3CEF14C4AFD47CB903227A69891E54A declared in SDialogState has an invalid type Map of Names to SDialog Array Structures

LogBlueprint: Error: [AssetLog] D:\Projects\ProjectName\Content\Programming\Core\Gameplay\Data\Dialogs\SDialog.uasset: [Compiler] Structure 'UserDefinedStruct /Game/Programming/Core/Gameplay/Data/SDialogState.SDialogState' is empty `

Unreal Engine

Welcome to the Unreal Engine Issue and Bug Tracker. You can check the status of an issue and search for existing bugs. See latest bug fixes too.

atomic salmon
#

@mild lotusI will DM you a fix dll for the landscape

worthy tendon
#

does it crash on fresh project/asset? @fluid lance

grave hornet
#

im doing dodge/roll. and i use an input action for dodge and want to read the current movement axis to decide which of 4 dodge directions/animations to use.

how could i pull out the vector of the current input and get that to a place where i can make 1 of 4 choices

maiden wadi
#

@grave hornetIs this like TPS, dive forward, dodge left/right, jump back, sort of dodging?

grave hornet
#

yea

#

i have animations for 4 directions

#

so i just want to get the nearest cardinal direction to current input direction and perform that caridnal direction dodge

#

oh

maiden wadi
#

You should be able to get MoveRight/MoveForward axis from your character.

grave hornet
#

i could just compare teh axis values to dermine the highest

#

?

#

highest absolute value wins

maiden wadi
#

Pretty much.

#

Personally. I'd turn it into an axis, and get a 0-3 integer to use for an array of animations. Unless you're doing blendstates with enums or something, Depends on how your animations are set up.

grave hornet
#

no blendstates

#

the array of animations would be prefered. im confused on turning my two axis into a 0-3 int tho

#

its gross, but i think it works

trim matrix
#

Anyone know what I need to do to convert to Int

zealous moth
#

Round it

trim matrix
#

I want my health to be in Int so more then 1, but I know the progress bar needs from 0 to 1 but apply damage needs float

#

This is the damage applying side

#

hey

#

i've got issues with something

#

could someone help me

maiden wadi
#

@grave hornet Whew. That's dirty in Blueprint. 😄 My solution would have been this. Either way works. In this Left=0, Forward=1, Right=2, Back=3.

grave hornet
#

if its dumb and it works....

#

okay. thats way better

#

i was also having trouble figuring out how to then take those booleans and turn them into a switch or some other form of CASE statement

#

so, i'll steal yours