#blueprint

402296 messages ยท Page 953 of 403

cedar crypt
#

when aiming up and down it doesn't work properly

#

when aiming left to right it works

trim matrix
#

now i can only press w once when i press it goes 1 down and when i releasd w it goes up again and nothing with s

blissful widget
trim matrix
blissful widget
# trim matrix

Looks right, except for the add. You need to add the current elevation to it

blissful widget
#

Connect the current elevation to the pin that's set to 0 here

trim matrix
blissful widget
#

Current "Gun Elevation Angle"

trim matrix
trim matrix
blissful widget
#

It won't be 0 after you've added to it though. The point is to add to the current angle, and keep adding to it instead of just setting it to 0.1 and that's that

manic adder
#

hello. how can i set up a camera to do a 360 rotation around a given point ?

lucid lynx
blissful widget
# trim matrix

There's a pin with a raw value, currently 0. That needs to be getting Gun Elevation Angle. To get its value, you need a getter, which would be a function node like Get Gun Elevation Angle.

lucid lynx
#

How would I get the dot product of an actor based on their velocity rather than their facing? I want to determine if they're moving towards something, not that they're facing it.

blissful widget
#

I think you'd be much better off watching a few BP tutorials to get the general idea as well, if you know some programming already

blissful widget
trim matrix
lucid lynx
limber parcel
#

whats a dot product? xD

lucid lynx
blissful widget
manic adder
limber parcel
blissful widget
#

This is what that node does

gentle urchin
#

Basically how alike they are

gentle urchin
limber parcel
#

so its 1 if they face same direction?

gentle urchin
#

Yes

trim matrix
gentle urchin
#

0 would be perpendicular

blissful widget
#

You're not trying to set it to a static value, rather change its current value upwards or downwards, IE you need its current value, then you add an offset to its current value, and then you set that to be its new value.

blissful widget
# lucid lynx I'm not sure what to do with that, though. I'm spoiled by GetHorizontalDotProduc...

There's a dedicated dot Node that just takes in two vectors
https://www.youtube.com/watch?v=-r-ahrPQrLU

How to use the dot product node? What does dot product actually do? How can it tell you if two vectors are facing the same way?

Welcome to How to... a snack-size video for a snack-size question in Unreal Engine 4.

SUPPORT ME
Patreon I https://www.patreon.com/ryanlaley
Buy Me a Coffee I buymeacoffee.com/RyanLaley
Donations I paypal.me/ryanlaley...

โ–ถ Play video
#

One input would be the last update velocity, the other would be... well, you decide. The other actor's last update velocity?

cedar remnant
#

Good morning! I'm reposting for morning so I can get more eyes.
I am trying to find a way to remap the controller Dead Zone settings using the Enhanced Input Action system. My goal is to expose the lower and upper threshold as variables I can access through UI. Any idea on this or know of anyone who may know?

mental trellis
#

Why not just access them directly from your UI?

#

Why do you need the intermediate variable?

cedar remnant
#

Either works. I am just unable to access them either way

mental trellis
#

Unable to access them because?

#

Is EI stuff not exposed to BP?

visual crest
#

UE5 crashed and I lost a interface I remade it but now when I try to add that interface as a call action I get this. How do I fix?

cedar remnant
manic adder
#

how can i animate a camera rotation around a fixed point while skipping all the game/player-realted stuff while i work on a render export ?

limber parcel
mental trellis
#

Your render is a "game" so you can't skip the "game" stuff.

cedar remnant
mental trellis
#

Your rotating camera would either be controlled by the "game" or a level sequence

cedar remnant
visual crest
#

MY Blueprint is referencing a interface that was lost in a crash I removed all interactions with it but is still will not compile

blissful widget
limber parcel
limber parcel
visual crest
#

ok

trim matrix
#

@blissful widget pls dont be mad im just asking

how do i make a getter๐Ÿ˜ฌ

blissful widget
gentle urchin
#

1 mississippi, 2 mississippi, 3 mississippi... ๐Ÿ™‰

gentle urchin
#

So instead of just grabbing the health variable or whatever, youd make an explicit public function to GetCurrentHealth , which simply returns the value of the variable

trim matrix
gentle urchin
#

Very simple

trim matrix
gentle urchin
#

The most basic function you can make

trim matrix
gentle urchin
#

Create a function

#

Drag in the variable into the function graph

#

Right click the graph and add a Return Node

#

Drag from the variable onto the return node

#

While the return or entry node is selected , in the details panels, mark it as "pure"

gentle urchin
#

Almost

#

But instead of set

#

You should "get"

#

Get GunElevationAngle

trim matrix
gentle urchin
#

Remember , we want to read the value, not modify it

#

Now connect the variable

trim matrix
gentle urchin
#

To the output

#

"Get" reads

trim matrix
#

ahhhhh

gentle urchin
#

"Set" writes

trim matrix
#

now i need it in the other bp

gentle urchin
#

Show the result first

blissful widget
#

You really want to watch some BP tutorials to get hang of the basics IMO

#

Like this stuff is covered in heaps of tutorials, we're just typing up BP 101 for you ATM

gentle urchin
#

Yeah theres many pitfalls and issues thats on its way towards you if you dont understand how things work

trim matrix
#

sorry

gentle urchin
#

Atleast thats the case when i watched 'em many moons ago

#

Casting from here to there, allowing any other actor to modify any variable in some random bp is not a good idea

blissful widget
fallen glade
#

Are there animation libraries? like blueprint macro/function libraries?

blissful widget
#

Personally I'd rather just a straightforward tutorial than an 'architected' one. I'm going to redo everything about it anyway, I'm just there to understand the idea behind it, rather than learn someone's implementation details.

I've got a software background so I just hate everyone else's programming style. It's in my nature at this point

gentle urchin
#

I try to always improve my own setups

blissful widget
#

The one thing that annoys me is when BP tutorial makers apparently forget about functions, collapsed nodes, events, and just any BP organisation method. Readability is important, and actually speeds up tutorials if you have to pan around the editor less

gentle urchin
#

Plus the mind can only cope with like 7 variables at the time,

#

So these massive functions become incomprehensible if not divided and structured with sub functions etc

visual crest
#

Is there a way to convert this node into any pawn currently controlled by players?

visual crest
#

ok Ill try

#

Thanks that worked!!

#

Does doing that have any down sides? like cost more processing power or something?

dawn gazelle
#

It looks like you're using an interface right after it tho... It's not really necessary to cast if you're using an interface call.

#

If anything casting to pawn is better than casting to ThirdPersonCharacter as it's a lighter class

visual crest
#

ok thanks Ill need to go to all my BP and change it to pawn

dawn gazelle
#

I wouldn't do that.... Sometimes you need the reference to be at ThirdPersonCharacter if you need to access variables and functions that you've set up in ThirdPersonCharacter.

alpine ingot
#

Hey I thought this is gonna be simple but got stuck with it. Is it possible to write the output log to the running game's screen? How do you even read the output log from blueprint or cpp?

#

Should I just read the actual log file?

visual crest
#

I know but if I change pawn or have multiple players I have to have it pawn... I just have to add thoes functions to all my pawns

visual crest
#

Why is this not compatible?

tight schooner
#

@visual crest try casting to "BP My Charactor"

#

A cast is a class check

#

If it passes the check, it transforms the reference into that class

#

You were casting to the pawn class, and trying to feed that pawn reference to your "BP My Charactor" variable

#

So yeah, not the right data type

visual crest
#

I am trying to make a controller for all player pawns

#

how do I do that?

#

any ti

#

any time I try to use jump it always says not compatible

tight schooner
#

Is jump a function/event? The node should say "target is..." such and such

#

So it'll only work on a target of that type

#

Anyway you can look into how controllers possess pawns

#

It's kind of weird for a controller class to be directly telling a pawn to jump

#

Usually a pawn, when possessed, will listen for the jump input (see project settings โ€” inputs) and handle that itself

#

And the controller does universal stuff, like handle the action for opening the game menu

#

That's kind of all I can say cuz I never made a multiple pawn game before

visual crest
#

ok I get it the controller is not the player controller per say but the interface controler

#

Thanks Ill watch a tut or two more on it

tight schooner
#

If you need one BP to talk to other BPs of different classes, you need to learn about interfaces and class inheritance

#

Otherwise you end up casting to every type of thing in your game

visual crest
#

I learned that too day ๐Ÿ™‚

#

GTG thanks for the help

tight schooner
#

You can cast to a parent class and call a parent function, and that'll work for all of its child classes for example

#

np

trim matrix
#

How to stack function calls

#

Like how can I add the same function more than once

#

Use the same function multiple times, how to link them

obtuse geyser
#

Hello I need some help, so I made an Array of anim montages, and I'm playing them on my keyboard keys as you can see on my screenshot

#

But I want to make it stop playing whenever I'm moving my character
Could someone of you help me construct blueprint to detect player movement, and if so to stop playing Anim Montage? I would appreciate

rapid robin
#

Hey all. Is it possible to set up a Sequencer camera, and trigger it to do a screenshot in blueprints?

neon forge
#

Is there a way to bypass a Layered Blend per Bone node when I play an anim montage from a bp? I have a bp set up to trigger an animation (kneeling down to pick something up) and only the top half of the animation plays on the skeleton.

The blend per bone is used in conjunction with the Document Reader Pro asset on the marketplace.

neon forge
icy dragon
#

After the layered blend

ornate trail
#

how can you make a character nose dive when jumping off something high up. Basically not sure how to orient him as the gravity always makes him straight up and down.

#

tried set / add rotation but doesn't see to work.

loud cipher
#

I have created a simple dismemberment system that checks a list of broken bones already, it checks if the hit bone is already in the list of broken bones, if not, then hides the bone and spawns in a static mesh version

#

But i have craeted a branch inbetween because if i shoot the upper arm l, it only spawns the upper arm l, disregarding its lower arm l and hand l

#

hiding them without spawning them in

#

I am really stuck on how to get it to recognise the child bones and spawn them in

#

i got up to finding the parent bone, checking if it is in the list of broken bones

bitter ingot
#

trying to load a level but the volume simply doesnt trigger the level what should i do???

#

tho it works if i use the blueprint node "Load Stream Level"

trim matrix
faint pasture
#

anything you play on UpperBodySlot is before the blend, put FullBodySlot AFTER the blend.

blissful widget
#

Anyone have a clue WTF is going on? Character is oriented to movement, but sways really fucking weirdly during movement. Jump is wacky as fuck too

faint pasture
trim matrix
#

why the script not working

faint pasture
blissful widget
faint pasture
faint pasture
gentle urchin
#

Or that i guess

faint pasture
#

You could reorient the capsule but that gets much fancier

gentle urchin
#

Probably more correct ๐Ÿ˜„

blissful widget
#

The particles (if visible), trigger when the landed event is fired, but the jump is still broken, among other things haha

neon forge
gentle urchin
#

Its struct has a bone name which it will affect all the child bones to, iirc

neon forge
gentle urchin
#

So you usually divide them into whats practical, upper/lower body, head etc

blissful widget
#

Alright I figured out my issue, the weapon I re-created seemed to be blocking the pawn's movement and pushing it away? Have to remember what I had it set to

gentle urchin
#

All the things to be mindfull of

#

Damn weapon ๐Ÿ˜…

blissful widget
#

I had to mass re-create BPs because I did a C++ no-no, and just squashing bugs from my shaky data entry haha

shrewd abyss
#

is it possible to create a mesh volume that culls a specific actor BP when you step inside of it?

tawdry surge
#

on overlap-> actor has tag-> destroy actor

shrewd abyss
#

ok good

trim matrix
#

But the script isnโ€™t working

#

I Just want it to continually add force

tawdry surge
#

Your adding 5 force (basically nothing) at the origin of the world it looks like

trim matrix
trim matrix
tawdry surge
#

Just give it the box's location

#

Pretty sure torque is a different function

trim matrix
#

No

#

Add force at position is supposed to generate torque and force

#

Itโ€™s not doing anything

shrewd abyss
#

is there a way to do that within the blueprint of the mesh volume? so that i dont need to make a new level BP for every possible trigger created?

azure smelt
#

I set up some IK for a VR player awhile ago and it was working great. Now I have returned to the project and for some unknown reason the walking animations aren't blending. I don't know why, can some please help? I'd really appreciate it

tawdry surge
#

@shrewd abyss same nodes

zealous moth
#

I am trying to make an updatable list in UMG but I am getting way too confused...
I have a map of an enum and int. Basically, count X things.
When I pick up a coin, it triggers adding the item base umg but it never updates the values to the right texture nor number. Error states "accessed none" but I cannot fathom why..

shrewd abyss
#

okay but i cant reference the BP i want to cull in the event graph of the volume BP

#

sorry im not great with BP im mainly an artist

zealous moth
#

base item:

#

list

#

base item design

gentle urchin
#

Damn, actual list view

zealous moth
#

๐Ÿ˜„

#

I figured i didn't want a static UMG for score

#

just add stuff and if i want more, i update my Datatable

gentle urchin
#

Id just do scrollbox

zealous moth
#

if i pickup 3 coins i get this

gentle urchin
#

Dont need such optimization ๐Ÿ˜…

zealous moth
#

I did this once before

#

and it worked

#

no idea what i am doing wrong

#

here's errors

#

for each coin 2 errors

#

so there is a none value in the "on added"

#

but i don't understand why it is none

#

should be something

tawdry surge
#

@shrewd abysson overlap will give you the overlapping actor. You can check class or use has tag to filter out which actors to destroy

trim matrix
#

Dude

#

@tawdry surge do you know what is wrong with my script

tawdry surge
#

My guess was you aren't setting the right location

trim matrix
#

It should still be moving even if itโ€™s the wrong location

#

@tawdry surge

#

Like it should be spinning

#

None of that

gentle urchin
zealous moth
#

should be since it loads the default values

#

it's the changing of the values that isn't working

#

this was a game about stickers

#

the unit ^

#

and the list:

shrewd abyss
#

yeah im sorry i have no clue how to do this

faint pasture
shrewd abyss
#

idk how to give something a tag

zealous moth
faint pasture
#

0.5 is a TINY TINY force

#

Unreal units of force are centinewtons

#

that's like half a gram

#

half a gram isn't gonna move much

tawdry surge
#

@trim matrix Works for me

zealous moth
mental trellis
#

Momentum is irrelevant, as everything is relative.

tawdry surge
#

barely moves at 5000 tho

mental trellis
#

The same force will produce the same acceleration regardless of momentum.

faint pasture
#

5000 isn't even that much

#

Wait till you add a torque

tawdry surge
#

I'm just saying 5 doesnt do anything cuz it's like a weak breeze

zealous moth
#

@faint pasture i wish the values weren't in the millions

faint pasture
#

I deal with torques on the order of 400M - 2 Billion

#

Torque units are centinewton x centimeter so 1/10,000 of a Newton-meter

tawdry surge
#

that's based on mass tho right? so scaling down mass should allow you to use lower values of force and torque

trim matrix
faint pasture
#

Set it to 100k and dial it back from there. We don't know the mass or moment of inertia of the thing you're trying to spin

faint pasture
#

If you're just trying to spin tho add torque. The non-location ones can ignore mass and directly affect acceleration

shrewd abyss
#

like every node im finding relating to getting stuff with a tag wont go into the destroy actor node

faint pasture
#

is it a ship or a fly

#

default mass depends on volume and density and mass scaling which are all on the physical material.

tawdry surge
#

@shrewd abyssYou'll have to add the tag on the actor you want to be destroyed and then set the has actor has tag node to look for it

trim matrix
zealous moth
#

@gentle urchin so i did a test with print string on event construct.
I have default values in the unit at the designer level and at the variables level.
The output is the default designer values.
The print string shows the defaults for the variables.

So there is no communication anywhere ~_~

faint pasture
#

just set the mass

#

god damn

trim matrix
gentle urchin
tawdry surge
#

I think default is like 100kg

gentle urchin
zealous moth
gentle urchin
#

kiddo is not asleep yet

zealous moth
#

and that works

gentle urchin
#

Oh, you solved it ?

#

damn

#

well done ๐Ÿ˜›

zealous moth
#

no

#

it's crap

gentle urchin
#

oh xD

zealous moth
#

the overrides that takes in the umg every tick

#

that was my bandaid

#

terrible solution

tawdry surge
#

@faint pasture torque in radians also works with much lower numbers than degrees, which makes sense

zealous moth
# gentle urchin oh xD

so the order of operations when the widget unit is made is that it is constructed first and then added to the list

neon forge
gentle urchin
zealous moth
#

this works

faint pasture
gentle urchin
#

sorta

zealous moth
#

not quite, i was just pointing it out. No matter what order you use, it has to be AFTER the event on list item object is set

gentle urchin
#

right, but doesnt that qualify as a race condition ๐Ÿ˜›

#

anyways

#

hows the performance going now then ?

azure smelt
#

I set up some IK for a VR player awhile ago and it was working great. Now I have returned to the project and for some unknown reason the walking animations aren't blending. I don't know why, can some please help? I'd really appreciate it

trim matrix
zealous moth
gentle urchin
#

right, for sure

#

how many items are you planning to have in game?

zealous moth
#

10

#

maybe more

gentle urchin
#

๐Ÿ˜›

#

ok

#

surprisingly few for such an optimal list

tawdry surge
#

get actor location or get world location if you wanna reference the static mesh spacifically

zealous moth
#

So here I have 3 points:
1 - After the item is added
2 - I cast inside my item added
3 - I set it as a reference.

From here I should be able to set the values

#

this was used to run on tick

#

and that works

hexed jungle
#

Is it possible to have base scalability overrides in a packaged project?

I need r.SceneColorFormat to never go beyond setting 3.

trim matrix
faint pasture
#

100 Unreal Force = 1 N
10,000 Unreal Torque = 1 N*m

trim matrix
#

that is ridiculous

#

why is it centinewtons instead of newtons

faint pasture
#

Well it's because the unit of length in Unreal is the cm, not the meter

#

look at your gravity constant. It's -980

#

unit of mass is kg, so force is kg*cm/s^2 or centiNewton

#

since force is centiNewton and length is centimeter, torque is centiNewton*cm

trim matrix
#

how can change the keybind for the blueprint editor

#

want to change grab to middle mouse

faint pasture
#

If you don't like the units, go talk to Tim Sweeney. And while you're at it, get the axis setup fixed.

trim matrix
#

wat

humble sleet
#

so, question

#

I'm trying to make a menu system

gentle urchin
trim matrix
#

duplicate is ctrl w

zealous moth
#

yeah

trim matrix
#

wth is wrong with the keybinds

gentle urchin
humble sleet
#

is this a valid way of doing things? I haven't a clue what I'm doing with event dispatchers

#

DoThing is just an empty function in the menu pawn

faint pasture
humble sleet
#

idk

faint pasture
#

What are you trying to have happen

humble sleet
#

I'm honestly not sure, I'm trying to follow 2 different tutorials at the same time concerning a menu, and one of them uses a specific pawn for the main menu

faint pasture
#

Is this just like the opening screen?

humble sleet
#

yeah

#

I get the feeling I don't need to do a lot of what I've done

#

but at the same time it doesn't quite feel right to not do it

faint pasture
#

Just create the widget and add to viewport from wherever if you want

humble sleet
#

ok

gentle urchin
#

Keep the maps and modes separated imo

humble sleet
#

so what is the point of the Create Event node?

gentle urchin
#

It's handy for sure,

#

but not for this

faint pasture
#

if you want to have the same thing availible everywhere, like the same menu when you pause in game, I do that by making HUD stateful

humble sleet
#

you're gonna have to define stateful for me

faint pasture
#

State machine

humble sleet
#

ah

faint pasture
#

I have an enum in my HUD

humble sleet
#

yeah that would make sense

#

is there any point in having a specific pawn just for the main menu?

faint pasture
#

Switch on EHudState which can be MainMenu, Options, Gameplay, whatever, whatever

gentle urchin
#

statemachines can go into locks if you're not carefull ๐Ÿ˜›

#

anything can, i suppose

faint pasture
#

we don't do a hard load at any time other than startup and joining multiplayer, so it's all the same gamemode, playercontroller, pawn, all that, the entire time from boot to exit

shrewd abyss
#

yeah i cant figure it out

humble sleet
#

is there a default pawn that gets loaded on start or can you be pawn-less?

shrewd abyss
#

i will try again later

faint pasture
gentle urchin
#

I didnt know that was possible, but apparently it is

#

for a main menu you usually dont need a pawn

faint pasture
#

AFAIK we are pawnless until spawning/loading a character (it's a roguelike)

#

but we directly control the player camera manager and don't use camera components

humble sleet
#

I'm just wondering if UE will just grab my main character as the default pawn or sth

gentle urchin
#

It wont

#

unlress you tell it to

humble sleet
#

ok

faint pasture
#

you have a default gamemode and also a level can override it

gentle urchin
faint pasture
#

gamemode chooses your other classes

humble sleet
#

ahhh

faint pasture
#

Maps and Modes in project settings chooses the default maps and gamemode

trim matrix
#

how can i

humble sleet
#

yep, set default pawn class to none

trim matrix
#

input a float value

#

variable

gentle urchin
trim matrix
#

how to add float variable node

faint pasture
#

click the plus

#

read the getting started with BP stuff

#

just mess around

gentle urchin
#

(psst; watch a tutorial)

humble sleet
#

so for a level select screen, how would you recommend doing the actual level loading? just have a bunch of 'open level' nodes directly in the widget?

gentle urchin
#

Depends on the amount , but thats the gist of it yes

#

At some point with most setups you reach a point where the overhead for creating a procedural system becomes worth it

#

if its 5 levels i'd never bother

#

but if its 500 (for some insane reason) then I'd definetly consider it

humble sleet
#

I'm interested in the procedural approach, what sort of thing do you mean?

#

or are you just gesticulating verbally

zealous moth
#

@gentle urchin so i missed a part in the designer that binds the output to a variable

#

I did that

cedar crypt
#

how do i fix this camera movement?

zealous moth
#

now it goes to the variables

cedar crypt
#

when looking up/down the weapon aims at an angle

near wolf
#

I have a blueprint with instance editable variables. But When I duplicate it in the world and try to do a change, it applies for both actors. What am I doing wrong?

gentle urchin
#

@humble sleet Well, you could make some function that searches for all the "maps" in a given folder, and for each map found, create a widget and add it to a level select container of some sort, which references the level it was given, either by name or index

As an example

cedar crypt
#

when i aim sideways it works fine

near wolf
#

I have this media source, where you input the source. I wanna have 2 actors with 2 different sources, but it doesn't work

humble sleet
#

I was definitely thinking about it the wrong way

trim matrix
#

i set this to a variable but now its acting as if its set to 0 when it isnt

zealous moth
#

FIXED IT

gentle urchin
#

For it to be set, a white line must be connected to it

#

otherwise it's not set

#

it acts as a normal get'er in this case

humble sleet
#

@trim matrix these need to be connected

zealous moth
#

@gentle urchin

#

THERE

#

stupid moth******* piece of ******

gentle urchin
#

This is getting better and better ๐Ÿ˜›

zealous moth
#

you set the variable OF THE OBJECT to the reference

#

absolutely assinine

humble sleet
gentle urchin
#

all for the sake of using an absurdly optimized list for 10 items ๐Ÿ˜›

zealous moth
#

well, if i ever want to add different or more items, i can now ๐Ÿ˜›

gentle urchin
#

YEs, but this is made for thousands ๐Ÿ˜„

humble sleet
# trim matrix

that's one way to do it, but if you select your Force variable in the details panel you can set a default value

zealous moth
#

I could have different pickups based on different levels

gentle urchin
#

anyway, when it work, it works ๐Ÿ˜›

humble sleet
#

down at the bottom

trim matrix
#

is this 3rd person player controller physics based?
because all the "Simulate Physics" toggles are off

humble sleet
#

it uses acceleration, friction and gravity, so yes to an extent

#

but that stuff is calculated in the Character Movement Component

gentle urchin
trim matrix
humble sleet
#

you can apply forces to the player character and it will act like a cube

#

except the capsule will stay upright

gentle urchin
#

unlesss custom movementmode

humble sleet
#

^

#

you can use the Set Velocity and Add Force nodes to the character and it will work as usual

trim matrix
#

thats the player after colliding with the spinning cube

humble sleet
#

well the mesh doesn't matter IIRC

#

because it's a child of the capsule and is controlled by the animation blueprint

#

ok ok I guess I'm being annoying and dancing around the question, yes the character movement is physics-based in all the ways that will matter to you

#

you can use forces to move it around

trim matrix
#

Nicee

humble sleet
#

it seems he was using it to hold the menu widgets

#

I presume I can just stick that stuff in the menu level blueprint

gentle urchin
#

Or the playercontroller used in the menu

#

or the hud used in the menu

#

many options really ๐Ÿ˜›

humble sleet
#

I want to be railroaded into the correct way, for once

gentle urchin
#

I'll let you in on a little secret

humble sleet
#

I have choice paralysis

gentle urchin
#

nearly anything can be done in a thousand ways

gentle urchin
#

Ask 3 people how to do one thing, and you'll get 3 different answers

humble sleet
#

call it immersion therapy

trim matrix
#

How can you change the method that is used to add forces to the rigidbody

humble sleet
#

force is an acceleration over a time period

gentle urchin
#

write a custom physics component ?

humble sleet
#

what are you trying to achieve?

trim matrix
# humble sleet wdym by 'method'

In unity there is a parameter called ForceMode that changes the effect AddForce() has on a rigidbody
When forcemode=VelocityChange it adds the value to the velocity, when forcemode=Force it takes into account the mass I think
And of course forcemode=impulse is impulse

humble sleet
#

ahhh yeah there's something like that in UE

#

it's a bool in one of the nodes

#

hol up, I'll have a look

gentle urchin
#

isnt that just different nodes here?

humble sleet
#

I definitely recall there being a 'velocity change' option

trim matrix
#

Ik there is add impulse and add force but idk about velocity change/acceleration

gentle urchin
trim matrix
gentle urchin
humble sleet
#

character movement components can't have their mass overridden

gentle urchin
#

in blueprints?

humble sleet
#

in blueprints

gentle urchin
#

it is atleast a parameter

#

guess its just blueprintReadOnly

humble sleet
#

I guess I meant to say that by default, the Add Force for character movement components doesn't have an Accel Change input

gentle urchin
#

ah

humble sleet
#

which explains why I was struggling to find it initially

#

and why @trim matrix may also have not been able to find it

trim matrix
#

Add force at location local

humble sleet
trim matrix
#

Custom gravity

#

But without adjusting world gravity

humble sleet
#

I think you can set gravity strength per object

cedar crypt
trim matrix
#

What about direction

cedar crypt
#

that?

humble sleet
#

custom directional gravity is harder to make in blueprints without some hacky fixes

#

especially if you're using the default character movement component

trim matrix
#

Like addforfe

#

Add force but acceleration

#

So it adds the same force to all objects independent of mass

humble sleet
#

yeah

trim matrix
#

Ah thatโ€™s why you were referring to mass overrides

humble sleet
#

check the Accel Change

#

but again, that node doesn't work for the default character movement

#

which is annoying

trim matrix
#

Oof

humble sleet
#

yes

trim matrix
#

Kekw

humble sleet
#

I saw the realization real-time

#

hoookay

#

I'm doing a turn-based game

#

bog-standard "let's all line up at opposite ends of a clearing and take turns hitting each other"

#

so I guess the player characters represented on screen can be completely disconnected from the actual player pawn

remote stag
#

Hello someone know what is wrong with this blueprint?

#

im removing a elements from array to get a unique actor every one loop body, but i dont know why im getting a duplications

humble sleet
#

ah

gentle urchin
#

Its because random

#

produces random

#

for each pin

#

this basically queries random 3 times

humble sleet
#

no, it's because the output pin of the Set node caches the initial value

gentle urchin
#

Nothing sets it

humble sleet
gentle urchin
#

You must cache the output from any random if you want to reliably use it

#

the array is set

#

not the random node

#

or random output

humble sleet
#

oh yeah

#

bruh

#

3head

remote stag
#

so i need to get new array when im removing elements?

gentle urchin
#

No,

humble sleet
#

hold on

gentle urchin
#

you simply must cache the found random

#

save it in a variable, temporarily

trim matrix
gentle urchin
#

Also,

humble sleet
trim matrix
#

O

remote stag
#

Im setting a founded actors to BP Curse Item, then im removing founded item and getting random again from array without that elem

gentle urchin
#

you're not checking if the found item is already cursed, and that another one should be made cursed...
yepp, you're removing it alright

humble sleet
#

squiz

#

the elements are removed from the array

gentle urchin
#

Yepp

#

noticed

humble sleet
#

but surely since the output of the Set node is used

gentle urchin
#

i was to quick on the trigger there ๐Ÿ˜›

humble sleet
#

then doesn't that cache the initial value of the array, and not the updated version

humble sleet
#

or does it update

gentle urchin
#

I believe it does work as it should

#

I believe the get side of a Set actually is a regular Get

humble sleet
#

ahh ok

gentle urchin
#

i could be wrong, but i believe so

remote stag
#

so i need to get every time variable after removing a item from variable?

humble sleet
#

probably not

#

but wouldn't hurt to use a get

#

would also reduce the number of node wires

remote stag
#

okay but where to place it?

humble sleet
#

directly next to whatever you're plugging it into

#

just use a bunch of them

remote stag
#

too many getting variables is good to preformance? just asking

humble sleet
#

I don't think it matters, might be wrong

gentle urchin
#

But i presonally also prefer to separate the Gets

#

avoids spaghetti ๐Ÿ˜„

humble sleet
gentle urchin
#

reroutes also affects performance

humble sleet
#

don't you mean spaGetti

gentle urchin
#

but you'll never notice

humble sleet
#

wat

remote stag
gentle urchin
#

Still not caching the found one

#

so what is removed

#

is not what is added

humble sleet
#

right click on the output of the Random node

#

and promote to variable

gentle urchin
#

(or Get CursedItems(Output from Add as index))

#

but thats just messy

#

Aalso

#

Curse vs Cursed

#

has like 99% overlap

#

you've messed up on the one you remove from

remote stag
#

okay wait guys

gentle urchin
remote stag
#

thats what i get before

#

look

#

BP_Curse_Item is a array with all elements
Cursed Items is a array with elements, that will be added in loop (thats are a CURSED CURSED elements)

gentle urchin
trim matrix
gentle urchin
#

replace string array with your array

#

and your naming convention

trim matrix
#

referencing this will changing the velocity of a physics object directly break its physics calculations?

remote stag
gentle urchin
#

the important part is how I cache the output from the Random node

humble sleet
trim matrix
#

if you directly change the velocity of a rigidbopdy

humble sleet
#

no

#

it just overrides its previous velocity

trim matrix
#

so it doesnt break the phsycs?

humble sleet
#

define 'break'

trim matrix
#

uh

#

idk

humble sleet
#

you won't break it, don't worry

dry condor
#

depends on the value i would say, if you make the value too high something might start "breaking"

humble sleet
#

true

trim matrix
#

i just read somewhere that messing with the velocity directly is bad pracitce

humble sleet
#

potentially

#

but it depends on what you're trying to achieve

trim matrix
#

but there is no alternative here except writing a player controller from scratch

humble sleet
#

ideally a gravity system would work in a physically-accurate way and you'd apply acceleration using the inverse square law

#

so I guess in that sense, directly overriding the velocity is a hacky solution and thus not best practice

remote stag
gentle urchin
#

Whenever you get something from a random node, it will find a new random

humble sleet
#

it doesn't store the output in the output pin

gentle urchin
#

you can test this easily by doing 2 print strings after each other, and a random int in range

remote stag
#

So there will be a 2 separate random items?

humble sleet
#

ye

remote stag
#

gotcha, thanks! :D

gentle urchin
#

1 random for each wire ๐Ÿ˜›

#

so on your original screenshot, 3 randoms

cedar crypt
#

cool

#

i got my leaning system to work

humble sleet
#

gah

#

head hurt

dim tapir
#

Team, I'm trying to get a melee combat system going but it deals damage multiple times to a single enemy. I don't understand why it's not working. Any ideas?

gentle urchin
humble sleet
#

I'm just trying to figure out how to set up a turn-based game

gentle urchin
#

Manager, interface

#

what else is there ? ๐Ÿ˜„

humble sleet
#

I don't even know what I would use a manager for

#

as in, what do I put in the manager, and what in the game mode

#

choice paralysis

gentle urchin
#

Manager would be in the GameState (or be the gamestate)

willow pike
#

Working on an inventory system and have a question. Is it better to use a line trace to interact with items or would a collision box/overlap event be better?

gentle urchin
#

"better" is arguable

#

Linetrace requires accuracy

#

collision volume can show the closest to center item as interactable (with a given treshold)

white elbow
#

might be a dumb question, but how do "picked up" items exist in the game world? like when you pick up something and it disappears and shows an icon in your inventory

gentle urchin
#

Varies greatly

spark robin
#

How do you rotate content browser images again? I can remember there being some like keyboard combination, I cant just recall what keys it invovled :c

gentle urchin
#

some games keep them around as their actual "actors", some make them into "Objects", and others keep them strictly as "data"

white elbow
#

what's the difference between objects and actors?

gentle urchin
#

Objects dont exist in the world

willow pike
# white elbow might be a dumb question, but how do "picked up" items exist in the game world? ...

I started with this guys tutorial: https://youtu.be/2fdpqBBhWmw

We are revisiting one of my first series on the channel; the inventory system series, this time with different implementations, improvements, and now in Unreal Engine 5.

In Part 1 we set up the inventory component and some of its core functions and variables that will be in use.

SUPPORT ME
Patreon I https://www.patreon.com/ryanlaley
Buy Me a ...

โ–ถ Play video
humble sleet
#

you can have the in-game item as a thing with a mesh and a link to some data

#

or you can have it as the full actor with all the logic

willow pike
# gentle urchin Objects dont exist in the world

Thanks for the replies, I will play around with the two. I have it set up with line trace right now and everything works as expected but I am in a third person perspective and it seems I have to get really close and find the "sweet spot" so to speak.

humble sleet
#

in the first case you'd keep the logic stored within the 'inventory', insofar that you don't need to use the logic if the player isn't holding the item

#

I think that's the case, at least

gentle urchin
long schooner
#

Hey guys, do you know any good flying tutorials??

humble sleet
# long schooner Hey guys, do you know any good flying tutorials??

This video is part of the communications channel from Daher to TBM operators, pilots, training institutions, instructor pilots, mentors, and safety pilots. The aim is to enhance the pilotโ€™s situational awareness when flying the TBM. At no time does this information replace the procedures within any aircraftโ€™s Pilot Operating Handbook (POH) or ...

โ–ถ Play video
#

I kid

gentle urchin
#

Its good

long schooner
gentle urchin
#

serious reply

#

๐Ÿ˜›

humble sleet
#

I posted the wrong video

long schooner
#

how about in unreal?

#

Lmao

gentle urchin
#

just do custom movement,

#

add some Z to the char

#

and watch it fly

humble sleet
#

idk if you've seen Reid's Channel

gentle urchin
#

What sort of flying are you after anyways

humble sleet
#

I think he has tutorials for a jet and heli

gentle urchin
#

superman ? dragons?

#

Planes?

willow pike
#

Isnt there an example flying project?

gentle urchin
#

there is

humble sleet
#

I'd love to remake the flight from Freefall Tournament

gentle urchin
#

I (ignorantly) assumed it didnt suffice, my mistake

willow pike
#

lol no worries

#

@spark robin well well well, look who it is!

gentle urchin
humble sleet
gentle urchin
#

One of the templates , as Harry pointed out

long schooner
gentle urchin
humble sleet
#

I think I should be fairly safe to make the main menu be its own self-contained thing

trim matrix
#

How can you

gentle urchin
#

I gotta should stop procrastinating now

humble sleet
#

so I can use (what feels like) ugly hack code

trim matrix
#

Like

#

Guys

gentle urchin
trim matrix
#

I saw a reddit post in which the player controller was flying

tawdry surge
#

My main menu is usually it's own level

trim matrix
#

Like supperman

#

How can I do this

humble sleet
#

but

#

it just feels wrong

gentle urchin
#

thats my basic setup for it anyways

humble sleet
#

hwuwh

#

why it's own controller?

gentle urchin
#

Feels right i suppose

humble sleet
#

ahA

gentle urchin
#

no good reason

humble sleet
#

so I'm not alone

tawdry surge
#

It's just cleaner, and controller is best since the pawn is usually not used

gentle urchin
#

I dont make a HUD for the main menu tho ๐Ÿ˜›

#

even if I should, I dont

tawdry surge
#

Can set show cursor, click events, lock view etc..

gentle urchin
#

yepp

#

very handy

humble sleet
#

do you mean HUD as in the specific HUD class, separate from UMG?

gentle urchin
#

Yeah

#

as the container for the widgets

dim tapir
humble sleet
#

I thought the HUD class was just an old feature from before UMG

gentle urchin
#

Anim notify is unstable ๐Ÿ˜„ ?

gentle urchin
humble sleet
#

go on

gentle urchin
humble sleet
#

ok so not anything I'm really going to need

gentle urchin
#

Unlikely ๐Ÿ˜›

humble sleet
#

thanks

gentle urchin
#

As I said, I never create it for my main menu

humble sleet
#

I never create it

gentle urchin
#

period lol

#

It's nice to keep all widget stuffed in a single class imo

#

instead of bits and pieces all over the place

humble sleet
#

that's why I was trying to use that horrible delegate setup

gentle urchin
#

delegates are great

#

Functions should be embraced

gentle urchin
#

Almost

#

I'm not satisfied with my setups yet

#

but i prefer to let the owner of the widget do the registration

#

owner being whichever class made the widget

humble sleet
#

I was trying to put all the actual logic in the menu pawn, and just have the menu buttons announce that they had been pressed

gentle urchin
#

Right

#

but you'd reverse it

humble sleet
#

but then if it's just a navigation button like options, then it's the widget itself that needs to be listening

gentle urchin
#

Pawn creates widget

#

registers the dispatchers

humble sleet
#

ah

gentle urchin
#

thats how I would do it

humble sleet
#

you see, I had the menu level blueprint creating the widgets

gentle urchin
#

I avoid the level bp like the plague

humble sleet
#

ok

#

that's the sort of thing I want to hear

trim matrix
#

If I were to make my own player controller how could o got about it

gentle urchin
#

subclass the playercontroller

humble sleet
trim matrix
#

Like what if the player gets stuck in a wall

#

If the player gets stuck in a wall

#

Can just detect the collision and get the normal to check if wall and if so donโ€™t execute addforce

#

But the friction

bold shard
#

I'm trying position a widget on screen, based on a percentage, but it doesn't work. If I set it to 1/1 the widget shows up halfway down, and most of the way to the right. I'm not sure what I'm missing.

humble sleet
#

idk if that might affect it

gentle urchin
bold shard
trim matrix
# humble sleet

If I were to add a force to an object and it hit a wall will it slide down or just get stuck

humble sleet
#

that has a click event

gentle urchin
trim matrix
#

In unity if a rigidbody gets stuck in a wall so you have to set friction to 0 and use drag to make fake friction

humble sleet
#

the event comes from the innate functionality of the button

gentle urchin
#

Its just a dispatcher in the button widget ,

#

so i'd just pass it forward

bold shard
trim matrix
#

I need to test these

humble sleet
#

so I make an event in the menu pawn, and make it fire when the event in the button widget goes?

gentle urchin
humble sleet
#

ohhh yeah I get you now

#

I was still working on the basis that my widgets are being made in the level bp

gentle urchin
#

Well, you could still pass it forward..

#

just ... more work

humble sleet
#

keyword being 'was'

#

I am taking your advice

gentle urchin
humble sleet
#

also I still don't fully grok delegates/dispatchers so I don't know what 'pass it forward' means

#

ok that's basically what I had originally

humble sleet
#

which I didn't like because casting

#

casting bad

gentle urchin
#

Like.. Does it make sense to store a widget in the levelblueprint?

#

Is it unique to that level?

humble sleet
#

no

gentle urchin
#

tied to that level ?

humble sleet
#

well

gentle urchin
#

So then your cast becomes extra work, for no good reason

humble sleet
#

the main menu buttons are going to be unique to the main menu lvel

bold shard
humble sleet
#

so kinda

gentle urchin
#

Lol, true, but still

humble sleet
#

yeah

gentle urchin
#

If you decided to swap main menu level

humble sleet
#

that's why I was stuck

gentle urchin
#

you'd need to do it again

humble sleet
#

because the bad option still made too much sense

dry condor
humble sleet
#

honestly I wish there was just a massive list of best practices for every possible thing

gentle urchin
#

And I'm still not getting my work done.. sigh joke, its on me

humble sleet
#

anyway, thanks for pointing me in the right direction

gentle urchin
#

General OOP practices apply I guess

humble sleet
#

not a coder

#

well

#

I know MATLAB

gentle urchin
#

๐Ÿ˜„ It's something ๐Ÿ˜›

bold shard
humble sleet
dry condor
gentle urchin
#

I wonder if there's any way to set variables to private as default ..

humble sleet
#

is it a good idea to save a ref to the player controller or just use a get each time?

gentle urchin
#

Depends ..

humble sleet
#

up until now I've been caching everything

gentle urchin
#

Do you use it a lot ?

humble sleet
#

probably not that much

gentle urchin
#

likely insignificant difference then

gentle urchin
#

I prefer saving them

#

while i dont mind casting when it makes sense, its that extra step

#

over and over

humble sleet
bold shard
#

Figured out my issue. Had to multiply my X and Y by the inverse of the viewport scale.

fiery swallow
#

If you have code you use a lot and it's generally small you can always put it in a macro. That's what it's for

humble sleet
#

but then I just realised I did mean to cast in this case

loud parrot
#

I also save it as a reference, it will be cheaper than calling it every time

humble sleet
#

but hadn't actually so it seemed pointless

gentle urchin
#

I wouldnt put a cast in a macro instead of caching it , but thats me ๐Ÿ˜›

humble sleet
#

one other thing, would it make sense to set up cached stuff like that in the construction script?

#

or is that not what it's for?

gentle urchin
#

construction is risky

trim matrix
#

How can I Make a derivative of the player controller

gentle urchin
#

things may yet exist

humble sleet
#

idk what the constructerino is for

humble sleet
#

macro library :kekw:

gentle urchin
#

I should probably use it more

fiery swallow
#

so if you have like 4 or 5 nodes you are going to need to use often, but you don't want to save it as a variable. Macro is your man

gentle urchin
#

But its like.. It's never so often that it feels worthy to use a macro

fiery swallow
#

I do it alot for getting the anim blueprints

loud parrot
#

Functions a cheaper than macros

fiery swallow
#

just feels cleaner to me

fiery swallow
gentle urchin
gentle urchin
loud parrot
#

Macros are needed if additional pins are needed

fiery swallow
#

I don't know about that chief

gentle urchin
#

Functions cant be latent

#

macros can

fiery swallow
#

they both win in clear cases fam

humble sleet
#

@gentle urchin about the set/get caching thing, I just noticed this

gentle urchin
loud parrot
#

yes, pins, latency, enumeration of arrays.

gentle urchin
#

So its just a hidden get inside the set ๐Ÿ˜›

loud parrot
#

In c++ it is possible to create additional output pins for a function

gentle urchin
#

Exec pins? (wasn't specified, I know)

loud parrot
fiery swallow
#

There's a reason why ue has some native nodes in functions, and some in macro :/

#

Some things you just dont want in a function

#

Specifically because functions are expected to return something immediately

loud parrot
gentle urchin
#

Input

loud parrot
gentle urchin
#

I've seen this in some plugins

#

not often used to my knowledge

trim matrix
#

The

loud parrot
#

You can create any number of pins using k2 nodes, but it's difficult

naive stag
#

How can I get 'Reverse For Each Loop With Break' ?

gentle urchin
naive stag
gentle urchin
#

how so ?

#

Btw

#

are you using it inside a function ?

naive stag
#

no

gentle urchin
#

If so, there's a pro tip laying around

#

ok

#

well, if we disect the foreachloopwithbreak

loud parrot
#

when compiling, the code from the macro is copied to the place where you call it. and if you use a macro a lot, it's better to remake it into a function

gentle urchin
#

all its doing is setting a bool to true on break

gentle urchin
#

all we need to do is figure out where and how to add the break

brittle osprey
#

whats the difference between macros and event dispatchers

tight schooner
#

Everything...

loud parrot
brittle osprey
#

what do they do thats different?

tight schooner
#

... Everything...

#

I would start by reading up on both

#

Macros are just a node graph helper so you don't have to copy paste nodes as much

gentle urchin
loud parrot
#

I would advise you to read the documentation, or look at the examples

humble sleet
#

where is this function?

naive stag
gentle urchin
humble sleet
#

and where is the event dispatcher made?

#

because I don't have an option to plug the button reference into the bind

gentle urchin
#

In the Pawn (since thats who wanted to listen to it in your scenario)

humble sleet
#

ahhh

#

that would do it

brittle osprey
gentle urchin
#

A macro is basically a pastebin for code

#

While a Dispatcher is a callable event that is executed on every listening actor

fiery swallow
humble sleet
#

so a dispatcher is a dude ringing a bell, and anyone listening does their stuff upon hearing it

gusty shuttle
#

Might have an easy question. I'm trying to do a map mouse zoom in, however it only does it once in zoomed in or out currently. Why wont it keep getting tranform scale and adding every time I mouse scroll?

loud parrot
#

But I don't understand why they wrote some blueprint macros

#

If it was possible to do it in c++

gentle urchin
fiery swallow
gentle urchin
#

this is the standard library

fiery swallow
#

True

brittle osprey
gentle urchin
tight schooner
#

This is a solid channel for learning specific things in ue4

fiery swallow
#

Event dispatchers in a nutshell are amazing

maiden wadi
#

@brittle osprey A macro is a predefined set of code, very similar to a function with minor differences. If you're not a programmer, you probably won't care about the difference and should try to use functions more.

An event dispatcher is like a pager service. You page the dispatcher, and it sends a message to everything that has subscribed to it. You use it to notify multiple objects that something has happened. For example, if a character has a health variable and you have a dispatcher. You would set the new health value, and then call the dispatcher. Then everything registered to it knows that health has changed and they can update. Materials can be changed to be more bloody, healthbar can change numbers and progress bars, hud can spawn a floating damage widget, etc. All from one single actor calling it's dispatcher.

gentle urchin
#

You've perfected the analogy

#

i like it

brittle osprey
#

THAT makes sense to me thank you SO MUCH

tight schooner
#

I remember an epic training video that was like, an event dispatcher is like a Twitter feed...

#

Actors can follow the feed

#

Lol

gentle urchin
#

xd

humble sleet
#

potentially silly question, what would be equivalent to the opposite?

maiden wadi
#

I suppose a Twitter feed is a more modern terminology. ๐Ÿ˜„

humble sleet
#

like a secretary who everyone calls

maiden wadi
#

Functions in GameState or similar.

gentle urchin
#

well,

#

kinda, but not really

tight schooner
#

The diff is like who has the object reference for the other thing. The object doing the dispatch doesn't need object references to the listeners

gentle urchin
#

a function is equivalently close i guess

dry condor
#

caution, dumb question: wouldnt a interface be kind of like an event dispatcher ?

gentle urchin
maiden wadi
#

Interfaces are nothing like dispatchers. In a perfect code base, interfaces are actually useless.

gentle urchin
#

I see I should stop talking xD

tight schooner
#

But a more direct form of communication would be like (for example's sake) get all actors of class and then calling functions / sending interface messages etc

#

So it depends how you want to set up those relationships

maiden wadi
#

Interfaces are a patch to the fact that we can't insert functionality to Actors or UObject, so we have to have a way to call functions on objects of differing hierarchies. Interfaces patch that issue, but it's still just that, it's a patch.

fiery swallow
craggy hatch
#

can someone help me please im stuck๐Ÿฅฒ

tight schooner
#

Click on that "set world location" link in the message; that's the node causing the error

dry condor
#

you are trying to access something that does not exist

tight schooner
#

Accessed None means you're giving it empty data

gentle urchin
#

Almost looks like its done on tick aswell, given the amount

craggy hatch
#

but it exist

tight schooner
#

Idk are you destroying the actor before that timeline finishes?

fiery swallow
loud parrot
craggy hatch