#blueprint

402296 messages · Page 770 of 403

sonic crow
#

when you say after I spawn the bomb, do you mean after my private function inside of TopDownCharacterBP i pull out the Execute triangle, create a float function...last thing I am still not sure how to create the target. Also now I need to address two inputs?

#

should i promote the target in the image to a variable?

faint pasture
#

Are you following what I'm trying to have you do at all?

sonic crow
#

that makes sense you want me to create a reference for where the bomb spawns from

#

i think i got it

faint pasture
#

No, i want you to make a reference to the actual bomb

#

so then you can tell it the direction to explode in

#

but anyways i gotta go, good luck

sonic crow
#

thank you

#

you are a legend it works

gusty cypress
#

Yea I'm so lost it didnt work but every number I fed it was rounded so?

#

split times add up to 26.108 final time was 26.111 (ignore the 18.104 thats level record)

brazen merlin
gusty cypress
#

yea 1 sec

#

timer

#

end time (display) and math

#

wait this is the in game timer display

brazen merlin
#

question, do you need the float or the text or both?

#

as in, to be used elsewhere than just to show the player

gusty cypress
#

float for math text for display (to see if the split times/final times are slower or faster then float to display it so its readable format 00.00.000)

brazen merlin
#

well, i mean i see the leaderboard on the right, that's updated somehow too right?

gusty cypress
#

yea trying to find that spaghetti

#

so the split time is set depending on what level your on shown here

brazen merlin
#

and is this a mp game?

gusty cypress
#

wait trying to find how current split time is set

#

Here we go

brazen merlin
gusty cypress
#

This works as if your on stage 2 and time is 10 secs and stage 1 was 6 secs it subtracts that giving stage 2 a time of 4 seconds since it will always add up to total

#

it even works for first stage since previous stage doesn't exist so its total time - 0 which works fine

brazen merlin
#

hang on, brb

#

Hmmm so theres this tiny 0.03 discrepency but otherwise everything works as you intend?

#

Would this also be the same when tested in standalone?

gusty cypress
#

the discrepancy is different every time but very minor this is why I believe its a rounding error

brazen merlin
#

I was thinking it was a tick thing, not being true to framerate

#

this is editor after all, not accurate of true framrate

gusty cypress
#

yes but what confuses me is the in game timer and split times should both be being fed the exact same values to do the calculations

brazen merlin
#

so, about that

solar dawn
#

hey guys, level bp stops working after my level encounter starts. anyone knows what happens?

brazen merlin
#

here's how i read it

solar dawn
#

gimme a sec, snapping

brazen merlin
#

Game time should be the same, but its on Tick's repeated call, which could differ as startTimerEvent accesses game time, then opens the gate, Tick fires thereafter

#

I would be under the assumption that it should happen in one frame though

gusty cypress
#

so should I not be using an event tick?

brazen merlin
#

so, without having you tear this all down, i think testing it standalone would be easiest to verify my assumption

solar dawn
brazen merlin
gusty cypress
brazen merlin
#

if the average difference between times is around 0.03, then im looking at tick, even though its quite a large chunk in regard to tick rate

solar dawn
gusty cypress
#

it adds .000001 so its like whatever just interesting since I round it at .001

brazen merlin
brazen merlin
#

.000001 yes, but not .01 or .001

#

keep testing it though, maybe a pattern emerges

brazen merlin
last abyss
#

it just seems like a math error to me, on the end result you have the total time spend in the event rounded while in the splits you're rounding it up or down on every split, so wouldn't you naturally get a different result from adding the split times vs the total time

solar dawn
gusty cypress
brazen merlin
gusty cypress
#

bc here I print 15.242 ... the timer says 15.242 ... but now the in game final time display is 15.241?? it happens after how is it a lower time? first I pause time then I set final display

#

I did not expect time to be this hard

brazen merlin
#

in reading that forum post a little closer, it seems converting the time float to an int or text is more accurate

gusty cypress
#

once in text can I do math or do I have to convert it back

brazen merlin
#

maybe float to string to float would be better

#

ive not done this kind of accuracy with floats/time so personally, i would use integers

#

in any form it still seems like it will not be accurate

gusty cypress
#

Im not worried about accuracy I just want the split times to match up with the final time

#

ill try the float to string to float

brazen merlin
#

i did have a different notion

#

seems just as unknown though

gusty cypress
#

Im interested

brazen merlin
#

make it a pure function, since it is performed for Old Time and New Time

#

for the gate

#

To me, that may look it up as the same value, and this is on the assumption that this is where the discrepancy is happening

#

to know exactly where the difference is happening then it might be easier to discern

gusty cypress
#

is this what you mean by pure function

brazen merlin
#

on the function itself (select the function) there is a pure checkbox

faint badge
# brazen merlin I would be under the assumption that it should happen in one frame though

In one frame doesn't mean it'll be the same value as that node gets the exact time when you call it so it's totally possible there's a small discrepency between repeated calls even on the same frame.

Also depending on how you're calculating the split totals you could run into issues as float math is not exact and every operation you do introduces some small error, if you repeat that the errors can compound. So for example repeatedly adding your split times may not give the exact same value of just subtracting your start time from your final end time. See https://0.30000000000000004.com/ for a good example of what's going on there

faint badge
brazen merlin
faint badge
#

Ah sorry, I came in late so I may have missed that. Anything involving floats is definitely tricky to get right sadly

brazen merlin
#

nah its good to reiterate

#

i would think to set a variable to then use so it is the right value, but this sutuation doesnt allow that

gusty cypress
#

I'll try the function with the pure true and see if it changes

brazen merlin
#

and if the pure function doesnt change it, which is a reach, then maybe keep it a float for as long as possible and convert just the one time it needs to be

#

this, i assume, could be with the CurrentSplitTimerNEW

faint badge
brazen merlin
#

still doesnt seem like any way around it though

gusty cypress
#

Okay noob question how can I use an integer to get decimals?

brazen merlin
brazen merlin
#

again, this still does not quite get around floating point precision though

#

so, basically, 30 minutes ago, GO TEST THE STANDALONE

gusty cypress
#

I'll do that now

brazen merlin
#

thank you

#

id hope its more accurate if anything, even if still a bit off

#

wait didnt you test standalone actually?

gusty cypress
#

Confused float inaccuracy is such an issue when so many other games (every racing game) .001 precise split times and in game times which align

brazen merlin
#

well.........

#

programming may have some extra tools that bp does not

#

they could write the entire thing with ints for the sake of accuracy

gusty cypress
#

Thank you so much, even If I can't figure this out right now I've learned a lot, Im gonna sleep while it packages considering baking lighting for just 1 level takes nearly half a day

brazen merlin
#

yep, learning is important

faint badge
#

float IS float32 on modern systems

#

the 32 just specifies the number of bits (effectively how much memory it takes to store the number, which also determines how accurate it can be)

float on modern systems is set to be 32 bits and double is 64 bits. In UE5 we'll have support for double in BP which will give you more accuracy in floating point calculations

icy dragon
#

I think a lot of racing games went for fixed frametime rate, e.g. only logging the record in multiply of 16 ms or 8 ms.

brazen merlin
brazen merlin
#

starting to wonder how effective it would be to use tick delta for counting frame/sec but im pretty sure that what get game time does already, and specifically when game starts too

faint badge
brazen merlin
icy dragon
brazen merlin
faint badge
icy dragon
#

One trick that I've been thinking is to switch the time value from the paused real-time to the stored one upon finish.

brazen merlin
quick kettle
#

hey ya, i have a question. i need to use blueprint to control some actors depend on a work flow. some of the actors need to move or do some operation sequentially, and others need to do the same tings in parallel. how can i implement such feature? do i need multithreading?

brazen merlin
faint badge
icy dragon
brazen merlin
faint badge
icy dragon
brazen merlin
faint badge
# icy dragon I think if anyting, MTing would just even out the tasks, possibly reducing the f...

Though I don't think BPs are capable of MTing to begin with

They are not and in fact it is not safe to interact with any Unreal Object outside of the main thread. You can still do multiple things on the same frame which will appear to a user like they happened at once but really they'd be calculated sequentially. Considering a user only sees updates when a frame changes, doing multiple things on the same frame will have the appearance of it happening in parallel

quick kettle
icy dragon
#

Though that being said, if your BP logic does impact the Game thread that bad, just try translating the function in C++ so that it runs on C++ speed, and still no MTing involved.

timber knoll
#

Was about to say the same

#

C++ isn’t as daunting as people say it is

#

Especially if you’re just translating from BP

#

Rule 1: don’t optimize

icy dragon
# timber knoll C++ isn’t as daunting as people say it is

Yeah, considering a lot of built in BP functions are callable in C++ through Kismet function libs (just that you'd prepare for lengthy function names), and stuff like asset loading (which is PITA to do in C++) can still be outsourced to BP for the ease of use without taking much BP overhead.

timber knoll
#

Yeah exactly if you just expose some data to BP but your logic is in C++ you will still benefit the performance

#

But regardless you should always follow rule 1 of optimisation

#

Don’t optimize.

brazen merlin
#

regarding bp and cpp, ive tried the bp nativization on packaging but i hadn't notice a difference in framrate and there is a lot of bp being used

timber knoll
#

It really depends what you’re trying to do

#

In many scenarios your framerate will be depending on GPU not CPU

brazen merlin
#

i tried it thinking it would be better seeing that the preference on performance is cpp

icy dragon
brazen merlin
#

i kinda figured as much, it also did not work on some bps (i think because they used structs?) Maybe one day ill optimize things in cpp

timber knoll
#

Have you compared actual stats? Or just framerate?

brazen merlin
#

just framerate, so yeah i getcha

timber knoll
#

Because cpu load and time should be different

quick kettle
brazen merlin
#

i felt no difference when playing the game, which means i dont need to profile to great length 😅

timber knoll
#

Nah don’t use level BP

#

If you want level specific logic, you should probably have it in gamemode instead

#

And just have more gamemodes

icy dragon
brazen merlin
icy dragon
#

In fact, my own rule is not to use level BP at all times (mainly due to open world necessity)

timber knoll
#

Yeah I just make child GM blueprints instead

quick kettle
#

thank you for all of you, you guys really give me a lot of advice!

dapper bobcat
#

The Level blueprint is nice to use for debugging at times, but yeah avoid actual game logic in there

brazen merlin
#

im comfortable just making a bp class and tossing it in, but thats me

#

i feel its a remnant from udk days where kismet was only level bp

dapper bobcat
#

Using the level bp might actually be easier for beginners, but it’s not best practice and that should be explained in tutorials that utilize it when you maybe shouldn’t

timber knoll
#

There are some use cases...

dapper bobcat
#

I can see how just putting everything in the level bp to make your logic work can be encouraging and easier for beginners

dapper bobcat
timber knoll
#

Such as tutorial triggers that are completly level depending anyway

#

But not much more besides that

brazen merlin
#

easier yes, but still possible without

timber knoll
#

Well anything is possible without the engine structure haha

#

You should always make your life easiest

brazen merlin
dapper bobcat
#

Generally speaking though, the level blueprint isn’t too useful. More for prototyping, debugging and perhaps some one off logic.

brazen merlin
#

what's easy right now vs down the road

timber knoll
#

If you’re like me, down the road will include rewriting everything 4x hahaha

brazen merlin
#

yes, programmers call that refactoring so they sound like they know what they're doing 😁

timber knoll
#

Hey!

#

I do know what I’m doing... sometimes 🤔

icy dragon
timber knoll
#

I think artists are worse in that case, they don’t refactor

#

But they change their mind 10x

brazen merlin
timber knoll
#

Which makes programmers have to make changes 10x

#

😅

brazen merlin
#

no one is safe! it's all anarchy in game dev

timber knoll
#

Yeah I can only talk about student game artists

#

When you’re almost done with making it all work they go like: “wouldn’t it be nice for this to do that”

#

😔

brazen merlin
#

yeah, gotta have some professional background to realize its better to complete an idea than to never decide on one

#

thats discipline right there

#

contradictory to what most artists want

timber knoll
#

I’m guilty!

#

Altho not an artist... trying to make a full game has been a lot of back and forth

#

But you learn along the way...

#

A lot of leaving “dreams” behind and just making it very simple to begin with is the key

brazen merlin
#

yes it is! tis why i avoid cpp, it would be another avenue to change my mind in, ill stick with..... design, bp, art, animation, vfx, sfx, data tables

#

i think the list goes on but yeah, many hats right?

timber knoll
#

Haha for aure

brazen merlin
timber knoll
#

I got in to C++ for my project, just as an extra challenge

#

But I’ve been learning the language in uni anyway so

brazen merlin
#

too cool for me

timber knoll
#

I might be overscoping a little with added multiplayer...

#

Considering how many other things I still have to learn about animations and vfx 😅

brazen merlin
timber knoll
#

But oh well for such a simple game, making it MP isn’t that hard and I wanted to learn it at some point anyway

#

Might as well start simple

brazen merlin
#

anyways, yeah you know... blueprint performance is a riddle, that framerate... mp with bp, tricky huh?

timber knoll
#

For sure possible to make most games if not AAA work in BPs only

#

Mp that’s something else...

#

Can’t even get Steam to work without custom C++ code in 4.27

brazen merlin
#

can you think of any mostly bp AAA games? fortnite?

timber knoll
#

Don’t think there would be any really...

#

They all have experienced C++ programmers

brazen merlin
timber knoll
#

There are fairly big BP games tho

brazen merlin
#

right on

#

anyways, just trying to keep on topic with the channel

timber knoll
#

Haha don’t worry I’m done ranting 😂

#

Best of luck with your project, I should get to work

brazen merlin
#

im off to bed actually

timber knoll
#

Goodnight in that case

gritty aspen
crimson jolt
#

Either I've discovered an engine bug or I'm doing something wrong. It seems like the SceneCapture2D component's "Show Only Component" node isn't working with Niagara components.

Steps to reproduce:

  • Add SceneCapture2D component to BP
  • Assign a RT Texture Target, set Render Mode to "Use ShowOnly List", Source "Final Color", turn off all Show Flags except Particle Sprites, Static Meshes and Translucency
  • At Begin Play, execute Show Only Component with target as the SceneCapture and In Component as the Niagara Component (if this is changed to a static mesh it works).
thorn ermine
# gritty aspen

was there a question here? 😆 or you just want to show an internet connectivity issue?

gritty aspen
#

i just want a solution

thorn ermine
# gritty aspen i just want a solution

Ok, for whatever reason, your editor believes it is unable to connect to epic games data collection endpoint. it is just a warning and has no impact on your game.
if you have a specific issue with your project you can ask here as well, but that is just a warning and has nothing to do with your project. 🙂

gritty aspen
#

ok solved

vivid sleet
#

i need help with something, i converted some meshes into blueprint actor and when i try to save all, the level doesnt save, what could be the problem ?

atomic salmon
#

@vivid sleethttps://answers.unrealengine.com/questions/1000387/cant-save-map-graph-is-linked-to-private-objects-i-1.html

#

Maybe make a full backup before attempting the fix.

#

Just to make sure.

vivid sleet
#

i fixed it, the problem was the blueprint i recently made didnt get included in the level somehow,

desert relic
#

Guys im having problems setting up a multiplayer game

#

I cannot posses a character in client

flint warren
#

When I bind a button's "Is Enabled" to a function, and it gets disabled, it looks like this and is still clickable

#

but if instead I call Set Is Enabled with false, it looks like this and ISN'T clickable

#

what gives?

#

(is this an Unreal bug or am I doing something wrong?)

#

for reference, when the button is enabled it looks like this

vivid sleet
#

@atomic salmon it didnt work for me

atomic salmon
atomic salmon
vivid sleet
#

i fixed it by deleting the blueprint that i just made

#

once i convert the sofa as a blueprint actor, it does the same error

#

is that normal ?

atomic salmon
# vivid sleet is that normal ?

Errors are never normal. It may depends on how it was imported. Maybe you can try to reimport or try a different import method if feasible?

vivid sleet
#

i imported it by datasmith

#

question, doesnt making copies from the object of the same object then coverting them into blueprints produce this error ?

#

bcuz at first, i imported 1 sofa, then i coppied it and converted them both into blueprint actor

atomic salmon
# vivid sleet i imported it by datasmith

Q: Is there a way to clear the datasmith user data or remedy this problem?

(I figured out the solution to this shortly after posting)

A: There is an “Asset user data” category at the bottom of the object’s detail panel, clearing the datasmith user data asset from this has solved the error and allowed the object to save.

vivid sleet
atomic salmon
#

If the clears the error then you can try converting it to BP

#

I guess you need to be able to interact with the object?

vivid sleet
#

i just want to change the materials of it by widget BP

atomic salmon
#

Then yes, usually through a dynamic material instance

vivid sleet
#

hmm, okay

#

thanks for the help

#

🙂

open walrus
#

I've got a little puzzle I need to solve for my game. I posted yesterday about the weapon attacks being too quick for a basic trace to work, so I needed to find a different solution.
The solution I've found so far is to do a sphere trace based on the maximum range of the weapon. This consistently hits enemies, but obviously it can't distinguish between enemies that are in range of the swipe, and enemies that are behind the player.
I have it saving the position of the weapon in the last frame so I should be able to test whether the enemy is between the two angles, but I'm still working out a way to do it consistently, so far it only works most of the time. Does anyone have any suggestions?
Apologies for the terrible example drawing BTW 😛

#

So in this example it would need to register a hit on the top enemy because it's between the two weapon positions, but not the lower enemy.

timber knoll
#

Dot products my friend

open walrus
#

Thanks, I'll look into that.

timber knoll
#

that will give you the cos value of the angle between two vectors

atomic salmon
#

Consider the weapon positions as vector and do a dot product with the vector from the player to the enemy

#

If the sign of the result is positive the enemy is in front of you

thick dirge
#

just a quick question... when i play animMotage for death. how do i stop ai standing back up into idle pose after it completes?

timber knoll
#

have you tried to disable auto blend on your montage?

#

you could also freeze/pause the last frame or just disable all animations on the mesh in general

thick dirge
#

🙂 i didnt know i could disable animations, thank you

desert relic
#

is this how spawning and possesing in multiplayer should look like

silk cosmos
desert relic
#

bruh no one is answering there

silk cosmos
#

And no one is guaranteed to answer, but you're more likely to get a response if you ask in the correct channel. The game mode has an easy system for respawning players. Why don't you just look up tutorials

icy dragon
silk cosmos
#

@desert relic this is the process I have set up for one of my older projects

desert relic
#

yeah but u didnt use "posses"\

silk cosmos
#

😐

#

The game mode has a built in function called restart player at player start, which takes in said player, and said player start. It handles all the spawning and possessing

desert relic
#

oh

#

do you need to use authority for it

silk cosmos
#

No. The game mode is server side only. So every thing done on the game mode is done on the server. The cast to the game mode will fail unless the cast is done by the server

desert relic
#

well im trying to make mine for on the client too

silk cosmos
#

? It also respawns clients

desert relic
#

bruh how

#

ok im gonna try to make it myself

ancient atlas
#

I am trying to play a sound whenever my enemy moves but it isnt working. Is there something here which isnt correct thanks

silk cosmos
#

Create an event and plug it into set is moving. Off the begin play use set timer by event, plug the event you just made into the timer, and set a delay on the timer

atomic salmon
#

@ancient atlasEvent Being Play is executed only once, at the beginning of the game (when you start playing). After that it is not longer triggered. If you need to constantly check if you enemy is moving, either use a timer as suggested or use the Event Tick which fires at each frame

#

The best would be to delegate that to the enemy blueprint itself, so when the enemy moves it will trigger its own sound

silk cosmos
#

Event tick in this case wouldn't make sense, because you don't want a sound to play each frame. You could set a delay, but generally you should clear your tick event from code as trivial as this

ancient atlas
#

i hooked it up to event tick before but it still didnt play, i will try the other way

atomic salmon
#

@silk cosmoscorrect, I should have been more complete in my answer. In that case one would check if the sound is already playing and not play it again.

#

Same problem with a timer though. You would need to know how long the sound lasts or still check if it is already playing.

#

@ancient atlasin that case you would need to check your logic and also ensure the sound is not triggered again if it is already playing

ancient atlas
#

i also tried to add the sound to the actual run animation but i couldnt get it to trigger

atomic salmon
#

You would need to use animation notifies for that

#

Do some basic debugging to your blueprint

#

Use Print String to check when something is executed and write a message on the screen

#

@ancient atlas ^^^^

ancient atlas
#

print strings are my friend 🙂

desert relic
#

how do i replicate everything from server to client or vice versa

fiery glen
tawdry surge
#

Do on clicked events not replicate properly?

#

Still working on 3d widgets and someone said they had to use on pressed instead to get it working

trim matrix
#

why do people abuse blueprints

tawdry surge
#

Personally I like to prototype in BP and then transfer.
I find it way easier for debugging and iteration, plus it's easier to visualize the flow of the logic

vivid sleet
#

where can i find the " asset user data " ?

fiery glen
#

he probably means convert by hand

#

and yeah C++ is too slow to prototype on

tawdry surge
#

^

woven wing
#

Unless you're really into watching things compile.

mild shell
#

is there a way to temporarily disable all physics in the world instead of looping trough all actor and manually disabling it?

faint rivet
#

how to replace that Jump Asset when i have a custom jump function (it didnt worked so i just created my own, and actually want to keep it now :))

that Screenshot is from the 3rd Person template State Machine, from JumpOut to Idle again

like what does this function

warm rock
#

Little question, do umg tooltips work on 5.0?

odd ember
#

perhaps better asked in the UE5 section of the discord

faint rivet
#

nobody anwsered there and i thought this function might be used in other cases too

odd ember
#

no it's purely animation based

warped spindle
#

Hey. Can anyone help me with a save game problem.
I made a currency in game.
I win coins in game so I put the coins in the player BP then i reference the save game and set the coins i won from BP player to save game.
So when i go to menu to use them. In bp menu widget they are not there.
I've set already in widget to show me the coins saved in SAVE game and they are not saved. I don't know what to do anymore. All other things are saved like unlocked level

maiden wadi
warped spindle
#

INT

maiden wadi
#

Would need to see the saving and loading code then.

warped spindle
#

Yeah.. but all the other things are saved ,just the coins aren't saved. Could be a bug?

maiden wadi
#

It's unlikely a bug. Unless you're using UE5.

warped spindle
#

I tried to see the problem with print string and then the level is done the coins are changing like it should be ,but when i change the level in this case the menu level that number is not saved

#

UE 4.27.1

spark steppe
#

show your save/load stuff

maiden wadi
#

Can't help without seeing literal logic. 🤷‍♂️

#

Best anyone can do before that is to tell you to make sure you plugged the thingy into the other thingy that does the thingy with the thingy.

spark steppe
#

make sure you plugged the thingy into the other thingy that does the thingy with the thingy.

maiden wadi
#

^

spark steppe
#

you wish^ (and so do i)

dreamy ice
#

is the only way to delete an object is to remove all references and wait for it to be collected?

maiden wadi
#

Pretty much. At least in Blueprint.

dreamy ice
#

thats painful

maiden wadi
#

O.o Why?

dreamy ice
#

I built it with many references in many different blueprints and now I have to change how ive written the system

maiden wadi
#

Wait. What?

#

Filetype reliance is very different than garbage collection.

warped spindle
#

The first is Menu WIDGET ,second level BP to save every time the level is complete , the third is in the player BP

dreamy ice
#

actually does it include references to something within the object?

maiden wadi
#

@warped spindle I don't know where that long blue line is going. Where are you setting SaveGame1Ref? Both in the Level and the Widget

warped spindle
maiden wadi
#

What about the SaveGame1Ref?

warped spindle
#

It's the save game reference

maiden wadi
#

But where are you getting it from?

warped spindle
#

To set coins

#

To get the coins in save game and change them with the coins collected trough level

dreamy ice
#

I meannnnnn how many objects would be performance dropping? they're all very time logic wise.

maiden wadi
# warped spindle

Right. But where are you setting the reference at? That is just a pointer. Have you actually loaded a savegame and set the return to that pointer? I'm assuming initially that is what you need to do right after LoadGameFromSlot.

shy plover
#

If i have radial force in my character bp will it affect the charracter in game ?

odd ember
warped spindle
maiden wadi
#

How does it get from HUD to the level blueprint?

warped spindle
#

I made the reference is level BP too

maiden wadi
#

Made or set? Because just making the variable creates an empty pointer for an object of that type. It'll be empty/null until you set it to a valid object.

warped spindle
#

No. It's made exactly like in the image before.

maiden wadi
#

Then you haven't set the variable to anything.

warped spindle
#

The thing that's not working is that Int after i change the level.
The bool highlighted it's working perfectly and it's saved in save game.

maiden wadi
#

Then you have to be setting that variable somewhere in your level.

#

It won't just work by naming them the same thing in the HUD and the Level and you're setting it in HUD.

haughty nymph
#

how can i make a exec line to my location vector

warped spindle
odd ember
#

although level BP should not house logic that is systemic

warped spindle
odd ember
sage magnet
#

Hello everyone,
I'm trying to figure out how to make a crank in VR. Anyone had experience with this or can share resources?

#

(research resources)

odd ember
sage magnet
#

whoops 🙂

spring bramble
#

Hey im currently setting up a system for being able to throw/drop an object and on hitting the floor it activates a game over.( the object being thrown is simulating physics but when it is being held it is not simulating physics) when it hits the floor after being thrown it doesn't trigger the overlap but while holding the object it triggers the overlap is there any way to trigger overlap events on objects that are simulating physics or another way creating the system that could fix this issue altogether? thanks in advance 😋

haughty nymph
#

i mean that yellow position thing if you want to spawn

timber knoll
#

lorash is trying to say a vector is just data, you can't execute data

odd ember
spring bramble
odd ember
spring bramble
odd ember
#

but you need to be sure that it has generates hit events checked

spring bramble
spring bramble
#

can do 1 second

odd ember
#

(... and they were never heard from again)

spring bramble
odd ember
#

ah

#

can you show me the physics settings in the details panel for your mesh?

spring bramble
#

thats the physcis for the thrown object

#

the simulated physics gets turned on once the object is thrown but turns back off on pick up so the player can hold the object again

odd ember
spring bramble
odd ember
#

that does look alright

#

try enabling ccd

#

and do a print on the event hit collision

spring bramble
#

coolios ill try that quicklu

#

quickly *

fallen glade
#

is there a way to calculate a clockwise angle between two vectors?

#

or any angle in BP?

spring bramble
odd ember
#

though it should work

brazen merlin
odd ember
spring bramble
spring bramble
#

yeah it does

odd ember
#

but I would recommend that you speak to people in the #legacy-physics channel I'm sure they would know

spring bramble
#

yeah ill look into it and ill ask over in the physics channel and see what they say thanks appreciate the help

desert relic
#

How do i create 2 cursors for 2 players

#

in local multiplayer

#

1 cursor controlled by mouse other by joystick

odd ember
#

use get viewport size

#

and the input values

#

if you add 1 then multiply by 0.5 you can get the input axis value from -1..1 to 0..1

#

which you can multiply

#

onto the viewport size

desert relic
#

i mean how do i create that cursor

#

so that it can be seperate from the mouse cursor

odd ember
#

a cursor is just a widget

#

so just spawn another widget

snow jolt
#

Is there a way to get the list of object that collide with a mesh?

#

Without a hit event

odd ember
#

well

#

you can check every frame if one object is within the other object's bounding box, or close to it

#

but you'll be better off with collision

snow jolt
#

Or is there a way to check if an object doesn't have any collision?

odd ember
#

the above

snow jolt
#

But how wich nodes

#

I tried using is overlapping but doesnt work

odd ember
#

I just told you

timber knoll
odd ember
#

probably wrong collision settings

snow jolt
#

Im using the physics actor preset and am currently using the rolling ball template

desert relic
#

i can only move the cursor by a bit

#

from gamepad

#

why?

#

and when i stop moving it

#

it defaults it to center of the screen

timber knoll
#

your math is all messed up

gentle urchin
#

you're not saving its relative location

timber knoll
#

axis values are -1 to 1

#

ooh you want it to keep moving

desert relic
#

yes

timber knoll
#

yeah then you need to add it on top of last location

gentle urchin
#

limited to screensize x,y

desert relic
#

if i change it to 1920x1080 then when i move it a bit

#

it straight up teleports

#

to top of the screen

gentle urchin
#

top left i would think

timber knoll
desert relic
#

wait

timber knoll
#

why do you have these 2 tho

desert relic
#

i dont know i watched some tutorial

#

lol

timber knoll
#

you watched tutorials on math 😛 ?

desert relic
#

tutorials on moving cursor by gamepad

#

he did this shit and it somehow worked for him

#

can someone help me fix this lmao

#

how do i save its last location

timber knoll
#

store the 2 values before you draw rect

desert relic
#

i dont understand

timber knoll
#

hold on

desert relic
#

so i need to make a separate variables

#

for x and y

timber knoll
#

yes so you can store the last value

odd ember
#

if you're using any kind of XInput compatible joystick you can use input axis with MoveRight and MoveForward

desert relic
#

can i update it by

#

wait

timber knoll
#

it's all in my example

desert relic
#

can i update it like that

odd ember
#

also doesn't DrawHUD run every frame on it's own?

timber knoll
#

hmmm might not be every frame, but basically

odd ember
#

anyway you can do it without even being inside of the HUD class

#

since you can GetViewportSize inside the player controller

desert relic
odd ember
#

all inside player controller

desert relic
#

@timber knoll is this how its supposed to be

desert relic
desert relic
odd ember
desert relic
#

no

#

i will create one

odd ember
#

yeah do

desert relic
#

it will be this for now

#

what now

odd ember
#

for now, inside your player controller you can create that widget

#

and set it as a variable

desert relic
#

widget variable?

odd ember
#

use the CreateWidget node

desert relic
#

is this good

#

or should i have created variable for something else?\

odd ember
#

well you haven't created the variable, just the widget

desert relic
#

the cursor widget is a variable

odd ember
#

from the blue pin at the end of the CreateWidget node promote to variable

desert relic
#

oh that one

#

like this?

odd ember
#

yeah

#

but

#

actually

#

no

#

you need to connect the out pin

#

from the Set node

#

to Add to Viewport

desert relic
odd ember
#

yes

desert relic
#

what next

odd ember
#

so from your widget variable

#

you should have something like...

#

set position

#

or set location

desert relic
#

this?

odd ember
#

yep

#

so for right click on the position pin and Split pin

desert relic
odd ember
#

so now you can probably see how this lego brick connects with the previous lego brick construction I showed you

desert relic
#

yea i do

#

thanks

#

the only thing

#

i dont have MoveRight

odd ember
desert relic
#

And MoveForward

odd ember
#

then head into your Project Settings > Input

desert relic
#

i didnt create the axis bindingsi guess

odd ember
#

yep

desert relic
#

I have gamepad right tho

#

can i use that

odd ember
#

I don't know which controls your controller uses

#

so it's trial and error for you to find out

desert relic
#

w8

#

u here use

#

move right

#

and i have gamepadright X and gamepad right Y

odd ember
#

yeah that's just the name

#

it doesn't correspond to the input, it's just the default name of the axis value

naive gazelle
#

where do i talk

desert relic
naive gazelle
#

with these problems

odd ember
#

if it's UE5 then try one of the UE5 channels

naive gazelle
#

ty

odd ember
#

MoveRight and MoveForward are default names used by epic for templates

#

they are just names

desert relic
#

Yes

odd ember
#

nothing more

desert relic
#

i have a problem

#

its not showing the widget

#

the cursor

odd ember
#

did you hook it up on begin play?

desert relic
#

i guess i did

odd ember
#

you need input events for that

#

and you need to follow the other lego brick I gave you

desert relic
#

what should move forward

#

be

#

Y?

odd ember
#

well if you look at screenspace you probably need better naming

#

so forward could be up

#

and right could be.... right

desert relic
#

ok so where do i connect this now

odd ember
#

you should have input events now

desert relic
#

u said that i have to remove set position righ

odd ember
#

from setting the input

#

so look for something like InputAxis

desert relic
#

i found this

#

nvm

#

this

odd ember
#

try it

desert relic
#

where do i plug it

#

this?

odd ember
#

no you need it to run set position

#

and set position doesn't run on begin play

#

and you don't need to set variables for the floats, you can use them directly

desert relic
#

where tf do i put set position

odd ember
#

think

desert relic
#

i dont know im 1 digit iq

odd ember
#

what red node did you just pull out

desert relic
#

Gamepad left thumbstick X- axis

odd ember
#

so where can you connect it then?

desert relic
#

set position?

odd ember
#

show me

desert relic
odd ember
#

correct

#

well

#

almost

#

you don't need variables for the floats

#

and both events need to connect

desert relic
#

good?

odd ember
#

you need the rest of the math still

desert relic
#

good?

odd ember
#

try it

desert relic
#

nothing again

odd ember
#

probably your cursor is tiny

desert relic
#

now its not and again it didnt show up

odd ember
#

remove the canvas panel

#

and it can still be tiny

desert relic
#

it removes the pictrue

odd ember
#

so add a new one

desert relic
#

i did

#

again

#

nothing

odd ember
#

head over to #umg to see if you can get the cursor to spawn properly

#

but the logic should be correct for moving it

#

assuming you picked the right input axis

#

for your particular controller

desert relic
#

yes but the widget isnt creating

odd ember
desert relic
#

ohhh

#

i know why

#

shit

#

when i press ready i remove all widgets

odd ember
#

well there you go

desert relic
#

what the fuck

odd ember
#

means that your cursor wasn't created

#

for whatever reason

#

I can't tell you why

desert relic
#

here it is down there

#

its moving tho

odd ember
#

hmm

#

ok

#

well

#

no problem then

desert relic
#

but it throws 11 gazilion errors

odd ember
#

click on your cursor variable

desert relic
#

and it defaults back down there

odd ember
#

right click

#

and select Convert to Validated Get

#

then on IsValid plug it into position

#

leave the other path

desert relic
#

where tf is that

#

oops

odd ember
#

that'll be why

#

you can't use pins between execution paths

#

that's going to give you errors

#

you need a new variable

#

that's why we made it a variable in the first place

desert relic
#

what do i do

odd ember
#

on the left side

#

select cursor and drag it into your viewport

#

select Get

desert relic
#

then

odd ember
#

once you have it, right click and convert

odd ember
#

then hook it into your set position

odd ember
odd ember
desert relic
#

what do i do with "add to viewport"

odd ember
#

you f'd up

#

why do you bring it back into set position from there

#

nobody said that

desert relic
#

whaat u said that i should hook it up to set position

odd ember
#

yes but not from beginplay

desert relic
#

so this?

odd ember
#

also you completely f'd it

#

yes

#

no

#

why do you have a validated set

#

is said Get

#

come on

#

you gotta listen

desert relic
#

i did get

#

and it is get

odd ember
#

ok

#

so where is the set node now

#

why is gone

desert relic
#

here

odd ember
desert relic
odd ember
#

the get needs to be with the other execution path

desert relic
#

i switch up get and set?

odd ember
#

no

#

read pls

desert relic
#

with what execution path

odd ember
#

where get position is

desert relic
#

this???

odd ember
#

no

#

...

#

christ

desert relic
#

bruuuh

odd ember
#

yeah bruh you

desert relic
#

bro idk where to fucking hook it up

odd ember
#

hook the red nodes into the get, into the set position

#

christ

desert relic
#

is it finally good no

#

w

odd ember
#

yes

#

just hook up the set to add to viewport

#

and connect the pin from the get to the set position

desert relic
odd ember
#

try it

desert relic
#

its working

#

buut

#

its defaulting

#

offscreen

#

and its not going frame by frame

odd ember
#

it is as long as you hold down the input

#

unless your controller is broken or something

desert relic
#

yes but when i stop moving

odd ember
#

from GetViewportSize, multiply both of those with 0.5

desert relic
#

why?

odd ember
#

do you want to fix your problem?

#

all this time you've been fine following what I said now you're asking about why we're doing things

#

lmao

desert relic
#

i did it

#

but im asking why

odd ember
#

to center the viewport

#

so your cursor starts in the middle

desert relic
#

doesnt look center to me

odd ember
#

show me what you did

desert relic
odd ember
#

.... you didn't multiply by 0.5

#

lol

desert relic
#

wdym i did

odd ember
#

no that's just the previous logic that I showed

#

you didn't add the extra change that I asked you to do

desert relic
#

noow?

odd ember
#

do it before the other logic

desert relic
desert relic
odd ember
#

or actually

#

let's just do something real quick

#

create a new set position node

desert relic
#

then

#

i mean this aint too bad

#

its suposed to be on that side anyway

#

the only problem is

#

its teleporting

#

not going frame by frame

odd ember
#

do this after you set the cursor variable on begin play

#

as for why it's not going frame by frame, it should follow the framerate

#

so either your controller is busted somehow or your framerate is low or your widget has some weird settings

desert relic
#

if i straight up go right it teleports to right

#

but it goes slower

#

i think sensitivity to high

odd ember
#

yeah

#

so you can add a float variable

#

called Sensitivity

#

and multiply it onto where you have the other logic

#

you need to do this for both x and y

desert relic
#

can i do it in project settings

odd ember
#

yes but also no

#

you can set the value of the axis to be lower

#

at the risk of screwing all the logic

#

so I'd recommend you do this as a separate value

desert relic
#

and how do i set sensitivity then

odd ember
#

just set the default value really low to start

#

like 0.01

#

and adjust as needed

#

later on you can set that to be a custom setting somewhere

desert relic
#

this?

odd ember
#

but that's another can of worms that I'm not gonna open with you

#

where you have the 2nd 0.5, hook it up into there

#

on both x and y

desert relic
#

so i should create sensitivity and hook it into 2nd 0.5

odd ember
#

on both x and y

desert relic
#

it just lowers space where it can move

odd ember
#

ok but is it at least slower now?

desert relic
#

no

#

it teleports

#

only not that far

odd ember
#

try setting it even lower and see if it keeps teleporting

desert relic
#

i realised whats going on

#

its not repeating

#

like if i hold right

#

i teleports and thats it

odd ember
#

on the set position node

#

try unticking the DPI checkbox

#

but tbh I think it's your controller that has binary input or something

#

because that corresponds with why you're not seeing a steady increase or decrease

#

so you need to setup your input properly for this

gentle urchin
#

Isnt this an issue of not keeping track of current position? Atleast it looked like it was

odd ember
#

nah we're scaling the mouse position to viewport

gentle urchin
#

So its supposed to reset to center?

odd ember
#

but given it's teleporting it sounds like there is no inbetween from 0 to 0.5 to 1

#

which is true for boolean inputs

gentle urchin
#

Or low res analog sticks

odd ember
#

yes

desert relic
#

Dude its not my controller

gusty shuttle
#

Is there a reason why I don't have the option to create a new skeleton (right)? The normal one is on the left (every tutorial out there) and for some reason I just don't have that option when bringing in a mixamo skeleton

desert relic
#

In the real planrs vs zombies it aint teleporting

#

And i have 60fps

odd ember
#

well you didn't set up the input events properly

#

so it might be that your controller is ok

#

but I don't know which values it uses

#

because you shortcut it

atomic salmon
odd ember
atomic salmon
#

More #ue4-general as this is a generic question on using the engine

gusty shuttle
heady saffron
#

Can someone tell me why my character doesn't go up the ladder on this blueprint? he just stops movement completely.

odd ember
heady saffron
#

@odd ember no

south bone
#

I want to be able to call "ce <customevent>" using my gamemode instead of having it be tied to level blueprints. Is it possible to add a custom event to the level blueprint from the game mode blueprint at runtime?

odd ember
#

sure

#

you can use GetGameMode

heady saffron
#

Ce u got any ideas?

odd ember
#

nope

heady saffron
#

been playing around with stuff and idk why it isn't working

#

hmm alright

odd ember
#

debug it with breakpoints

#

is my best advice

#

see if the bool is true

heady saffron
#

will try that, not much else to debug tho

odd ember
#

the place where you set the bool, the value of the axis, the up axis being correct

#

etc.

#

you can try ticking force as well

#

it might be that the CMC ignores up input by default

south bone
#

I wasn't clear. I am trying not to write code in the level blueprint cause I want the commands to work at any time the gamemode is active instead of being tied to levels. 'GetGameMode' would only be useful if I am writing it in the level blueprint right?

odd ember
#

the event(s) would still exist on the game mode

#

you're just calling them from the level blueprint

#

doesn't mean you can't later call them from somewhere else

#

or even use the command yourself

heady saffron
#

Damn nothing worked... Will keep playing around with stuff like if flying is enabled etc... must be something small like that holding it back

odd ember
#

probably is yeah

#

check the flying movement section under the CMC

#

to see if there's something there

heady saffron
#

at first it was disabled, but enabling it didn't fix it

south bone
#

Ok so I made a new level, "LEVEL_BASE" for all of my existing levels to inherit from, so they can all have the same set of commands. But it doesn't show up if I try to reparent the level blueprint of an existing level. Am I missing something here?

odd ember
#

and to be honest I'm not sure you can create a level script actor in blueprint

south bone
#

Ok so I'm starting to think it is just impossible to make all my levels share a set of commands without copy/pasting all of the events each time.

hardy fable
#

whats fun is that level script actor classes dont show up when making a new blueprint

#

you have to click the + icon next to the selection in project settings, unless im just bugged

south bone
#

I already closed my project to go grab lunch but thanks @hardy fable . I'll try that out when I get back.

vocal pumice
#

How can I use blueprints to make an ability target the mouse location?

#

Don't need a targeting reticule or anything like that, just press ability and it goes to mouse location instantly

wooden adder
#

Instead of having the new target view as third person character I want to set it to a camera from a different Blueprint, how do I reference that camera

#

anyone any ideas?

south bone
#

That worked (almost). All my levels show the command. However, for some reason calling the command doesn't do anything.

trim matrix
#

rookie question

#

i'm bad at maths I need 75% of a number in this case 75% of 104 but want the game to work it out

#

incase any levels made have different overall number of pellets

#

i've tried 75 / 104 * 100

#

sorry 104 / 75 = XX * 100 = XX

#

for some reason this isn't working ??

#

where my maths failing please

#

hang on there a percent node on UE4

#

75% of 104 would be 29 that correct thats waht U seems to thing anyway

supple dome
#

104 * 0,75 = 78

faint badge
#

To expand on this, to find any percentage first divide your number by 100 to get 1% and then multiply by however may percent you need, in this case 75. Due to how multiplication and division works you can just calculate 75 / 100 first and then multiply your number by it. i.e. (SomeNumber / 100) * 75 is the same as SomeNumber * (75/100) or SomeNumber * 0.75.

Because dividing by 100 is just moving the number two decimal places to the right you can easily figure out what value you need to multiply by. For example if you want 25% it will just be 0.25. For 125% it will be 1.25 and so on

trim matrix
#

yeah for some reason taking the 104 vaule down to 0.75 or atleast the way i was doing it it wasn't liking

wooden rapids
#

Does anyone knows about the Replay System with the Console Command in BP the question is the Camera spawn i think in the middle of the Map ,how i can set the Camera or Move it to a specific location or can i controll the Movement anyway of the Camera

dark crow
odd ember
#

those nodes are so dark they're almost invisible

dark crow
#

Just how I like it for my fragile little vampire eyes

fair magnet
#

Not really sure where this fits in but:
I'm currently trying to achieve offsetting a Relative Transform location.
I have an Array of Actors
This I put in a ForEach loop and spawn a Spline mesh component.
my question is how can I offset them in Y Coordinate based on the Array's length?
For example
Distance float= 50
Array Length = 5
Result should be:
-25
-12.5
0
12.5
25

Any guesses? I would search the internet but can't really find a term for it

#

1 Entry = 0
2 Entries = -25, 25

#

so it spans out equally

odd ember
#

I think I would need to see a visual of this to understand it

static charm
#

you can use a Mod of 2 and when result = 1

#

and set the 12.5 to negtive

#

and multi that by the index of the loop

keen wedge
#

Hi all, anyone know if its possible to add a socket to a skeletal mesh in blueprint, in the construction script for that blueprint?

#

I see a "Add Socket" node, but I'm not sure what's supposed to go in the bottom pin for the Socket Asset... I cant seem to create a "Socket" asset..

odd ember
#

afaik a socket is just a transform

fair magnet
static charm
#

yeah nevermind i didn't think it though lol. i dunno

faint badge
keen wedge
odd ember
#

you can hover over the pin to find the class

fair magnet
keen wedge
#

but I can't create one of those as an "asset" despite it having a search... I think its for hooking it up to a socket you've already created manually on a static mesh

fair magnet
#

oh wait nvmd that's what you said already lmao

#

sorry

#

so far that's what I got

faint badge
# fair magnet Can I calculate the stepsize ? or will I have to just set that manually ? :o

You can calculate it, it's just Distance / (Length - 1) using the names from your example. So if Distance = 50 and Length = 5 the Step size is just 50 / (5 - 1) which is 50 / 4 or 12.5 like we'd expect

for Distance = 50 and Length = 2 we get 50 / (2 - 1) = 50

Just be careful as you have to check the case that Length = 1 as you'd get Distance / (1 - 1) which means you divide by 0 and it'll throw an error. You need to decide what should happen in that case (maybe just return 0?)

odd ember
#

the closest BP equivalent is a scene component that you could perhaps offset from an existing socket

keen wedge
#

but if I can't do that... Im back to crappy string references 😦

odd ember
#

why are you referencing socket names constantly?

keen wedge
# odd ember why are you referencing socket names constantly?

You put the name in the socket itself - so thats one...

Later, using a Physics Handle, I need to set the "In Socket Name" - so that's twice

and I think, in Tick, I'm going to need to constantly set where this thing is (as its sway about a bit outside of the animations at the moment) - which means I'll need to use the string reference again for that too!

faint badge
# fair magnet so far that's what I got

Those should be two separate things and saved to variables. Make a variable called something like CurrentOffset and give it the value -(Distance / 2 ), then make another variable StepSize and set it's value to be Distance / (Length - 1) then in your loop you will do something with CurrentOffset and then afterwards you set CurrentOffset to be CurrentOffset + StepSize. That way for Distance = 50, Length = 5 you would have -25 first, then -12.5 on the next loop, then 0 and so on until you hit 25 at the end

keen wedge
fair magnet
#

Note that the "Output Vector" Variable just has a Fixed X of 50... is just so the lines do not start inside the button

faint badge
fair magnet
#

uh? What exactly do you mean by set offset node?

fair magnet
#

oh

#

true

#

yea! now it's fixed :D Thanks alot really!

faint badge
#

What's happening is you're adding the stepsize to the offset before you use it. So using the Distance = 50, Length = 5 example you set the Offset to -25 and then before you use it you add 12.5 and have -12.5 so rather than -25, -12.5, 0, 12.5, 25 you get -12.5, 0, 12.5, 25, 37.5

fair magnet
#

yea sorry kind of forgot about that

faint badge
fair magnet
#

Now I need to go for the complicated part... wish me luck lol

faint badge
#

Good luck!

trim matrix
#

i feel like more people use blueprints rather than cpp

odd ember
#

almost as if the barrier to entry is much lower with blueprints

icy dragon
trim matrix
icy dragon
# trim matrix there is

Tick overhead, trap of some questionable practices? Fuck yeah, even though it's not entirely BPs fault.

#

Also your baby might speak C++ since birth, but not everyone is. BP is good for protoing gameplay quicker than writing it in C++ out of thin air. At least that could help designers and engineers to be on the same page.

trim matrix
#

people who dont want to code

odd ember
icy dragon
#

I give you that if that's actually happened

#

Though realistically your elders should speak assembler (or even Fortnite Fortran), but that's nitpicking.

static charm
#

you're doing it wrong if your not manually setting your bits with a magnet/voltage switch - directly to storage.

icy dragon
#

I'm sure vacuum tube users get VIP access to hookers and blackjacks.

#

Transistor peasants can go screw themselves.

trim matrix
#

now this is getting offtopic

icy dragon
#

It's not about superiority complex about one or the other.

dry jolt
icy dragon
#

The same crap can be said for any scripting languages or any level programming languages, if "the hardest to do always superior" is the measure.

icy dragon
dry jolt
#

and i did, and still not really working for me.

#

at least have the setup

#

or just leave it and do some design first sound good

odd ember
dry jolt
#

ok

versed zealot
#

Hey guys, is there a way to filter data tables based ona boolean in the data table?

odd ember
#

as in data table queries?

#

I don't think so

#

but you can filter them once you've loaded the data

versed zealot
#

yeah