#blueprint

402296 messages Β· Page 426 of 403

odd ember
#

I'd probably do them as splines

#

that way you handle all the cases, even in the case of off grid

#

you'll get something along the lines of cities skylines

#

you'll have to couple that with collision detection etc., and ideally you'll have that be a small part of your road builder blueprint, after which you'd want to put down logic as soon as the spline meshes have spawned

snow geyser
#

Ill have to read up on splines then, dont know much about them atm lol. Ty it at least gives me a heading

arctic rune
#

Quick question, how do you group variables, I can see there are already preset groups, for "My Character" and "Components", can I make my own?

dim lily
#

CranzEstebogen thanks for info on custom events not taking timers, I gues an event for the timer that fires up the actual event I want to repeat? lul

odd ember
#

depends on what you want to do

distant sedge
#

@arctic rune Select the variable and there's a Category field. Can have sub groups with | like Food|Breakfast or Food|Dinner

arctic rune
#

@distant sedge Yeah, but how do I make a new category? It only has 3 options, default, my character and Components?

distant sedge
#

Type in the text box

arctic rune
#

Nevermind I was being stupid, thank you xD

prisma sundial
#

TYSM

rough wing
#

Hi

#

I'm trying to add all my velocity into one plane

#

This is my code

#

But it's only working in one way

split wasp
#

you take your velocity, and project it on a plane

#

and plane normal is wall normal

#

bonus: calculate the projected velocity and lerp it with original velocity to control how sticky the wall is

rough wing
#

But the wall normal is looking outwards

#

The yellow line is the wall normal

split wasp
#

yea

#

project vector on a plane, will yield a vector that is zero on yellow axis

rough wing
#

Isn't that what I did ?

#

I don't really understand

split wasp
#

well not really, you just added some arbitrary +90 yaw axis to something

#

when you can actually get the normal_vector with simple trace

rough wing
#

Oh I see

#

so the plane normal is not the direction of the restriction

#

but the normal of the plane were walking on

split wasp
#

is along the same axis as the wall

#

if you do the planar projection from ground normal, that would mean you can't jump

rough wing
#

Ok solved it

#

Thank you very much

arctic rune
#

Just wondering, any of you have any experience with moving where the player spawns. For example I want the player to enter a room, when they do this opens a new level, if you exit that room you go back to the previous level, but I cant seem to get the player to start where they were before entering the new level rather than at the player start? if that makes any sense πŸ˜„

odd ember
#

so you want a loading screen level change and keep the player in position of where they were?

fair estuary
#

@arctic rune you need to store the last known position of the player when they are entering the door. Then when you spawn your character in, you can set the location according to the last known then hand control over to the player.

#

You can also set the rotation to look away from the door as part of setting the player position

zealous moth
#

Why not have level entries and exits instead of recording data... on level spawn move or teleport pawn to loading point

odd ember
#

@fair estuary and how do you propose to do this when the last known position will be based on the previous level's pivot?

upbeat sinew
#

@arctic rune you need to store the last known position of the player when they are entering the door. Then when you spawn your character in, you can set the location according to the last known then hand control over to the player.
@fair estuary You can store data (Player Rotation, Location) in player Instances, they transfer between level changes

odd ember
#

the problem is still you're on the new level's pivot, so unless the pivots match up you're not going to spawn in the correct place

#

older games used a landmark system which was a standin for level pivot changes

fair estuary
#

The location of a point in the level is always the same right?

odd ember
#

nope

#

not if you transition between levels

#

like yes, if you use a position of (0, 100, 100) that is still equal to (0, 100, 100) in the new level, but at that position in the new level there might not be anything

#

unless you line everything up flawlessly for every level

fair estuary
#

Wouldn't that depend on level streaming though? If you're not level streaming then 0,100,100 as the last point in the previous level will still be 0,100,100 in the previous level.

maiden wadi
#

You wouldn't need the previous level's pivot. Presumably there's a door in both levels next to where the character is starting at after "Walking through the door". Just know where the door is and face the character away from it.

odd ember
#

@fair estuary this isn't streaming though, first, and second the location doesn't matter. what matters is the level carries the player over to the new level in the exact spot required, not absolute position

#

you don't need the previous level's pivot

#

the way old games went around it was by using relative location to an actor

#

so in the example of a door, on triggering the level, you save the relative location from the door, and when the new level pops in, you transfer to the same relative location from the door

#

the door essentially becomes a working pivot

karmic pebble
#

I think he meant to save the location of a point near the door that is rotated properly facing away.

#

which is what we do for our game.

odd ember
#

well yeah but that's not the same

#

that's just spawning the player in a new location in a new level

karmic pebble
#

Correct. using a direct last known location wouldnt be possible because the last location triggered the change level screen

#

so you really have to use a point to spawn at based on last known door you went through

odd ember
#

@karmic pebble not true, since relative location stays relative. if you have an actor that propagates to the new level or put a stand in actor for this exact purpose you can get the exact transform the player had in the previous level, in the new level

karmic pebble
#

i think we are on 2 different pages here.

#

lol

odd ember
#

I don't think so

#

but it's a question of how much manual work you want to put in

#

and what you're expecting in terms of level transition

#

but your suggestion isn't so much changing levels as just spawning a new level with a new starting point

#

is all I'm saying

#

anyway with origin rebasing in the engine, that is also a solution, perhaps one that is easier

fathom spindle
#

Hi all,
I've got values along the extents of a box in y and z that are remapped to zero at the far extents and 1 at the centre and i'm looking for the maths to combine them into a circular falloff where the centre of the plane described by y and z is a value of 1 and then the values scale smoothly to 0 in all directions outwards. Hope this makes sense πŸ™‚

fallen glade
#

I've got a technical question about blueprint order of execution.

Let's say in a blueprint I cast to another to get some data back for the next node. Does the engine finish whatever the cast told it to do or just proceeds to the next node straight away ?

manic cradle
#

Is there a way to cast a line trace to a widget actor from scene, and debug detect buttons?

fallen glade
#

yeah @manic cradle

#

look at widget interaction component

elfin hazel
#

@fallen glade You need to grab the Actor that the Child Actor Component holds with Get Actor.

wooden jasper
#

Anyone got any idea as to why only part of my blueprint execution flow is being diaplyed in the editor ?

  • It executes all the code, but it never actually displays which route it goes, which is immensly frustrating D:
fallen glade
#

@elfin hazel thank you very much ! πŸ™‚

#

@wooden jasper if it's in game you have to select which actor to inspect by a dropdown on the top right

wooden jasper
#

I already got it selected in the debug info - and it does show parts of it being executed - like at the end of a chain it will show like this: the execution starts at the event to the left :S

fallen glade
#

I've had the same problem before, sorry, can't help

wooden jasper
#

There's a get function from the component you can use

fallen glade
odd ember
#

@fallen glade child actors aren't a good way of doing things. they're buggy and highly expensive for almost no gain

#

there are probably other, better ways of doing what you want to do

fallen glade
#

I was just trying to crate a debug level for my debris... the plan was to spawn the required debris from a list

#

@odd ember i'll find some other way

wooden jasper
#

I think its called Get Child or something like that @fallen glade

fallen glade
#

@wooden jasper thank you, problem is variables are not exposed. I need to find another way

elfin hazel
#

Think your best bet is to set all the variables after its created and then making an event that is called, instead of begin play, when that is done. probably easiest to make a function that takes all the data you want to set.

odd ember
#

@fallen glade so why don't you use the SpawnActorFromClass node?

fallen glade
#

I need the variables to be exposed on spawn :/ I think I found another way

odd ember
#

@fallen glade if you tick the expose on spawn tickbox they will be exposed on the SpawnActorFromClass node

#

that is the correct way to have anything spawn an actor in the world

elfin hazel
fallen glade
#

Another requirement is to spawn before begin play .... thank yopu for letting me know of the correct way @odd ember but this i'm making is just for testing purposes

odd ember
#

@fallen glade begin play of what?

fallen glade
#

in construction script

odd ember
#

so you're doing it while in editor?

fallen glade
#

yeah

odd ember
#

shouldn't make a difference

#

the actor will still spawn, but no logic apart from its construction script will be executed

fallen glade
#

SpawnActorFromClass can't be called from construction script

odd ember
#

I see

fallen glade
#

sad

#

😦

#

oh well

odd ember
#

so can you talk me through what you are actually trying to do?

elfin hazel
#

You can use an utility actor.

odd ember
#

a debug level for your debris doesn't exactly tell me anything

fallen glade
#

and

odd ember
#

so like a preview scene

fallen glade
#

I was just trying to swap the debris from a list

odd ember
#

that seems like functionality that already exists for destructible actors

fallen glade
#

while keeping the ability to toggle variables

odd ember
#

you're doing an editor extension in either case, so you'd need to use utility blueprints, not regular ones

fallen glade
#

I didn't think about that

#

Never touched them, are they similar ?

odd ember
#

yeah, the workflow is different but the idea is the same

#

you'll have to think about UI as well etc.

fallen glade
#

mmm, i'll look into it ! thank you

odd ember
#

might be better for you instead of attempting to shoehorn functionality in where it can't or won't go

fallen glade
#

I guess

odd ember
odd ember
#

this isn't the general unreal channel

terse harness
#

hey, when I have an instance editable object reference var in the gamemode bp, where can I set it in the editor?

severe iris
#

Will False && B evaluate pure function B?

#

Pretty sure it will, but need confirmation as this looks a bit weird and unusual to me

tulip iris
#

Should actors construction scripts be running in editor if their the streams they are on are not visible/hidden? I have actors that are all running construction scripts even though they are on a hidden stream.

odd ember
#

@terse harness you... can't really

#

game mode isn't an actor, it's an object

#

its instantiation is concealed from the editor

#

@severe iris shouldn't no

#

true || and false && don't evaluate secondary conditions due to optimization

#

at least in code

#

but I doubt the wrapper is different

severe iris
#

Well I'm talking about BP

#

I definitely have errors popping through that shouldn't

odd ember
#

by wrapper I meant the BP wrapper

#

but there could be some edge cases wherein for instance a select node would evaluate regardless

severe iris
#

For example try length(array) == 1 && array[0]==something

#

This throw an error in console for me

odd ember
#

so if it throws an error then it probably evaluates both, depending on the error message

severe iris
#

Yes, that's what I'm saying, it complains on illegal access on empty array

odd ember
#

you can debug it to see what the actual evaluation is

#

but it might be that the BP VM can't not evaluate

terse harness
#

@odd ember ok thanks, what is the best way to call an event in another bp from the gamemode bp then?

odd ember
#

entirely depends on what you want to call

#

generally though the game mode shouldn't call anything, but rather listen in on calls made by others

terse harness
#

ah ok, I should probably just call it from somewhere else then

odd ember
#

what are you trying to do?

terse harness
#

call an event in a specific actor in the level that sets the visibility of the actors widget component

odd ember
#

can you be more explicit? like a UI for a player let's say?

thorny cedar
#

is there a way to check if a device is plugged via USB?

terse harness
#

ok, there are 2 power switches in the level, when both switches are flipped within 2secs of eachother, the power turns on, activating a display on a keypad

#

i was using the gamemode bp to check if the switches were flipped close enough to eachother

odd ember
#

use the level blueprint

#

is it multiplayer?

terse harness
#

yeah

thorny cedar
#

2 Problems.

  1. When my window isn't active my vehiclepawn is moving. Shall i simply pause the game, when the window isnt active?
  2. When my Joystick isn't attached unreal still recognise a joystick input
odd ember
#

ah right the display on a keypad is in world as well, right?

#

in that case just use the level blueprint

terse harness
#

yeah the keypad is an actor with a widget component

#

ok thank you πŸ™‚

odd ember
#

@thorny cedar 1: yes. 2: this one is a bit harder, are you cpp familiar

thorny cedar
#

my project is cpp based, but im glad if you can help me to dig deeper into cpp, if its not that hard

odd ember
#

@terse harness so widget components generally need to go on actors that use them, unless they are placed arbitrarily in world. e.g. a 3d "screen" with widget choices

thorny cedar
#

have to use cpp files for some config file for a 6DoF simulator

odd ember
#

@thorny cedar I don't know it on top of my head, but I suggest you look through stuff like PlayerInput.h/cpp to see if that links out to some USB connection. from there you should also be able to look for links to hardware delegates

thorny cedar
#

how can i check, if my user has the current UE4 instance active?

#

any variable of player classes?

tropic tide
#

It says this is an infinite loop. Why? It has limited amount of overlapping components, so how?

odd ember
#

@thorny cedar probably somwhere in GameInstance

tropic tide
#

ok, so I want to make explosive barrels that make other barrels explode, but it seems the barrel also targets the barrel that made it explode which creates infinite loop, how can i prevent it?

#

I think I fixed it, but now it errors so hard, it sends me to to standard macros blueprint

still nexus
#

how do i triger an event in widget BP that is defined in actorBP and this actor is casting to a pawn BP.

odd ember
#

how is it defined in actorBP

still nexus
odd ember
#

where is the widget

little nacelle
#

for enemies that drop loot, is it better to use a BP interface or just a custom event within the master enemy class?

still nexus
odd ember
#

where is the connection between widget and actor?

#

@little nacelle depends, are enemies the only type of interaction that drop loot?

still nexus
#

i added an object reference to the actor

#

the print string is working but the event isn't

little nacelle
#

they are not, however if i was to use a BPI wouldnt the "killer" need to be the caller?

#

like there will be enemies and destructible objects

#

both can drop loot, with varying logic on rolls

odd ember
#

so what's the issue?

#

@still nexus can you show me the object reference in the actor?

#

and the logic

little nacelle
#

well the logic flow seems weird no? On the enemy's Event Any Damage, when it is killed, it has to tell the killer it has been killed, who then talks back to the enemy to tell it to drop loot, seems like unnecessary steps no?

odd ember
#

why would the killer need to be involved?

little nacelle
#

isnt the killer the caller?

odd ember
#

no?

#

every object is responsible for its own behavior

little nacelle
#

then whats the point of using BPIs?

still nexus
#

@odd ember i didn't make a widget reference in the actor i only made an event and then call it in the widget on button press

odd ember
#

@still nexus then how do you expect it to know the widget?

#

@little nacelle the point is to have the same structure of functions for multiple hierarchies. e.g. you can Interact() with both a door and an NPC, but they each have their own implementation

little nacelle
#

right, so the one that interacts with them is the caller

odd ember
#

in that case yes

still nexus
#

do i have to reference it as a variable type object or cast it in the event

little nacelle
#

so in my situation wouldnt the player need to be the caller?

odd ember
#

in your case the player killing them just kills them

#

the player doesn't cause them to spawn loot

#

THEY have behavior that causes them to drop loot or not

#

but the player doesn't know or care about that

little nacelle
#

defined by the BPI's event?

odd ember
#

for instance

#

@still nexus look up event dispatchers

little nacelle
#

im just a bit confused because im trying to see why i wouldnt just make two custom events

still nexus
#

ok thank you sir

little nacelle
#

seems like implementing a BPI for 2 master classes is more work than that

odd ember
#

technically you should only start implementing interfaces when it is required, and your structure should be setup beforehand to make them work

#

so it'd just be a hook in

little nacelle
#

and how do i differentiate when its required? something like your example?

odd ember
#

what you're probably looking for really is a loot manager

#

which is tied to a spawn manager

little nacelle
#

yeah i should really make a loot manager

odd ember
#

so when you spawn an enemy, the enemy has certain gear that you probably want to consider dropping on death

#

because once the enemy dies, its cycle of responsibilities die with it

little nacelle
#

well my current project is a diablo-clone, so its just RNG loot, but the rarities and quantities will vary by enemy

odd ember
#

diablo 2 still had an approximation of this

#

where if an enemy was carrying e.g. a spear they would have a higher chance of dropping a spear

little nacelle
#

yeah i used to think diablo randomly generated items from base ingredients, but then learned they had base classes for each item with a layer of randomization instead

#

oh thats good to know

#

TIL

odd ember
#

do you know cpp

little nacelle
#

so would i use data tables as loot tables?

#

i know very basic cpp

odd ember
#

no bueno

little nacelle
#

as in, took 1 class lol

odd ember
#

this would be a perfect candidate for a subsystem

little nacelle
#

is a manager class the BP alternate?

odd ember
#

there is no manager class

#

it's a concept

little nacelle
#

yeah i know

#

just wondering what you meant by subsystem in reference to cpp

odd ember
#

it's a UE4 specific cpp implementation that works as a manager class

#

it's just set up to work like that

little nacelle
#

oh thats convenient

#

so what would the BP alternate be? a custom one?

odd ember
#

there is no BP alternative

little nacelle
#

so a custom BP it is lol

odd ember
#

yea essentially an object that runs in the background and receives calls to do certain things when necessary

little nacelle
#

yup yup

odd ember
#

don't think you can do an object even in BP though

#

so you'll probably have to make it an actor

#

which is just extra faff

little nacelle
#

i mean you can create a BP of class Object

odd ember
#

yeah but you have no way of calling that in every object

#

since it doesn't exist in the world, it isn't known by the level either

little nacelle
#

oh, yeah. could make it an actor component and attach it to the player i guess too

#

but yeah thats how my inventory manager works. its a BP Actor attached to the player

odd ember
#

why would you attach it to the player?

#

and hopefully not a child actor

#

inventory you can do with components

#

child actors should be deprecated already smh

little nacelle
#

let me check

#

so on begin play my controller spawns the inventory actor object and attaches it to the player

#

the player isnt a child actor btw

odd ember
#

well no of course not

#

but that kind of setup is fine

#

or well

#

it could just as well be a component

#

but if it works it's fine

little nacelle
#

yeah idk why it was actor

#

yeah it works lol

odd ember
#

it just precludes you from making it modular without extra work

little nacelle
#

will have to test its persistence between levels

#

in terms of what?

odd ember
#

yeah there's a lot of issues

little nacelle
#

so whats the "proper" way of handling inventory in BPs?

odd ember
#

it's not part of the actor itself so you'll have to make manual hookups every time you use it

#

there is no direct reference between them, that is something the controller has to handle

little nacelle
#

oh, yeah i know, ive got InventoryRefs all over lol

odd ember
#

where the controller shouldn't be involved in this case save for inputs

#

in the background the technical debt is already accruing

little nacelle
#

oh i know, ive actually been meaning to do a whole project cleanup, because i know i have unnecessary refs and casts that could be improved upon

odd ember
#

the sooner the better

little nacelle
#

i wonder if GameInstance could be an inventory handler?

odd ember
#

technical debt has a tendency to spiral out of control

#

and will prevent good design and architecture down the line

little nacelle
#

yeah its already become exponential for me, and i have a barebones project

odd ember
#

really it just needs to be a component on the player character

little nacelle
#

my biggest issue with my technical debt is i dont know the "right" way of BP communication yet

#

because tutorials always show the basic logic, but dont inform you that its not how youd want to actually do it in a whole project

#

would it need to be something else if there was a global inventory?

#

like a shared stash couldnt be character specific, so im guessing that would be stored elsewhere?

odd ember
#

yeah

#

but individual inventory needs to be local

#

i.e. a component

little nacelle
#

yeah ill convert the inventory logic to an AC

#

so what you said earlier, in this kind of game, id have a spawn manager, that then uses a loot manager?

#

im guessing when it spawns actors, it decides the loot tables then?

odd ember
#

you want the loot table to be decided at the end, not at start

#

because gameplay can influence loot

#

if you follow the concept of diablo's loot system

little nacelle
#

oh right

#

like % Magic Find

odd ember
#

yeah or anything else

little nacelle
#

yea lol

odd ember
#

like a normal enemy turned into an elite enemy by shrine etc.

#

or by other enemies

little nacelle
#

thats a good point

tulip iris
#

Here's a dumb question. Print strings are showing the editor log but not on screen (in editor). Why? My gizmo keeps disappearing as well, and I keep having to turn it back on.

fleet sandal
#

Open your level bp>>> begin play>>> console command>>> EnableAllScreenMessages

vivid plinth
#

is there a way to use ForEachLoop in reverse?

#

ah yes, probably the ReverseForEachLoop.

#

never noticed it

arctic rune
#

So I know instances can be kind of hard to use with blueprints, but are player instances and game instances pretty much the same, as in I can use them the same way?

odd ember
#

game instance is a class

#

player instance is an instance of a class

arctic rune
#

Hmm, can I save values to a player instance like a normal actor or does it require a bit more work and complexity

odd ember
#

I don't see anything called player instance

#

I assume you mean the player character

arctic rune
#

Hmmm no, I was told to save the player location in player instance so that it keeps the values between level changing

odd ember
#

no such thing

arctic rune
#

Im basically trying to get it so if you go through a door a new level loads, if you go back through it you start at the same place you left, but I cant seem to get the location to save or teleport there and Idk what the issue is

odd ember
#

you need a class that is persistent between levels

#

such as game instance

arctic rune
#

So i could save the player location and rotation in a game instance then cast to that and use that to teleport the player?

odd ember
#

you could

#

but

#

consider that saving the location and rotation and transferring that to the new level will have you teleport into those exact coordinates of the new level

#

not necessarily where you want it to teleport

arctic rune
#

So basically I have this so far, Im not sure why this dosnt work, Im pretty new to Unreal Engine so apologies if this is something really basic

odd ember
#

which blueprint is taht

#

and what happens

arctic rune
#

Thats in the FirstPersonCharacter - And you spawn in level one (First person example map) if you go through the door - The top code - It loads the new level and starts at the player start. If you go back through that door - Back to the first level - You spawn at the player start and dont teleport to where you were last in that level

#

If that makes sense xD

odd ember
#

first things first

#

never link up something that isn't coming off the same execution

arctic rune
#

Your refering to the set locatation and rotation?

odd ember
#

yes

arctic rune
#

Okay I fixed that

odd ember
#

second

#

try to see what happens when the delay is removed

arctic rune
#

Nothing changes

odd ember
#

k

#

move the logic over to game instance

#

and see what happens there

arctic rune
#

Stupid question, i have to create a new blueprint for that right? Or is there a preset one?

odd ember
#

the game instance exists, but only as a cpp base

arctic rune
#

Also in game instance the keyboard E wouldnt work would it? Because its not being controller by the player?

odd ember
#

it would work eventually, probably even before pawn

#

but I can't remember the input hierarchy

arctic rune
#

It dosnt let me add the event in the instance

odd ember
#

then no

#

use a custom event that you trigger by proxy

arctic rune
#

Uhmm, Idk what that means xD

odd ember
#

it means you trigger the custom event by putting a volume trigger or what have you in the level

arctic rune
#

Im not sure what triggereing by proxy is

odd ember
#

or just have it trigger off begin play after a delay

#

whatever you want really

#

we're just testing

arctic rune
#

Im not sure how I set this up or how to use the volume trigger

#

Surely that is only in the level blueprint

odd ember
#

well yeah

arctic rune
#

Im so confused

odd ember
#

I mean what's confusing about setting up a volume trigger?

#

just.. do it?

arctic rune
#

Yeah I can place it in the level, no idea what to do now....

odd ember
#

is it placed?

arctic rune
#

It is

odd ember
#

so on component overlap event in the level blueprint, cast to player character

#

the get game instance, cast to your new game instance class

#

then call your event

arctic rune
#

When calling the custom event what would the target be?

odd ember
#

game instance

#

your custom game instance

arctic rune
#

Nevermind I accidently casted to the class rather than just the instance

fathom spindle
#

Hi, does anyone know a good way to set a boolean based on if an actor is in the player camera frustrum? I'm working with an HMD and thought there would be a way to get the view pyramid of each eye and just do an event overlap but i cant seem to figure out how to do it. The actor will be hidden in game/have an invisible material on it.

odd ember
#

@fathom spindle check out the WasRecentlyRendered node

#

otherwise do it mathwise

#

there is no trace

#

for a frustum

fathom spindle
#

Thanks @odd ember would that work with an object that has an invisible material on it?

odd ember
#

good question

#

test it

fathom spindle
#

ok on it

sand solar
#

Hey everyone! Can anyone point me in the right direction on how to create a system that will switch between audio cues in relation to the player entering combat?

tulip iris
#

Print strings are showing up in the log but not in editor. Is there a disable messages in editor option im not seeing???

fathom portal
#

@tulip iris did you unselect this?

tulip iris
#

Its not that

#

My gizmo keeps auto hiding every few minutes as well....

odd ember
#

@sand solar look up event dispatchers

fathom portal
#

Sorry @lapis obsidian, I'm not sure how else to hide/show those messages

tulip iris
#

Same here lol

#

Thanks though

fathom spindle
#

Thanks @odd ember works perfectly with an invisible material! πŸ™‚

sand solar
#

One more thought? Is there a way that I can have the player press start and begin in a already loaded level? (like a live main menu)

fathom portal
#

Do you have a pause menu setup @sand solar?

sand solar
#

Not at the minute, just a pause functionality.

pallid vector
#

i have tried all stuff i know but nothing update my values at variables i have created a game instance and 2 functions per value 1 for set other to get the value but when i call the instance and i increase the value it doesnt update the value

trim matrix
#

why is it not possible to set and get single values from structs in bp?

fathom portal
#

@trim matrix it's possible, lemme get the code

pallid vector
#

why is it not possible to set and get single values from structs in bp?
@trim matrix cuz i need to pass the values between levels

fathom portal
#

When you select the "Set Members" node, it allows you to pick which variables you're trying to set

trim matrix
#

yeah

#

but you cant refer to single members

#

or set them easily

fathom portal
#

What do you mean single members? I thought you were trying to set a single variable inside a struct

true yew
#

split struct pin? (or "break" to a new node, whichever suits your organizational fancies)

fathom portal
#

@pallid vector scroll to the far right on your message log and click the farthest right white magnifying class

#

That will tell you the exact node that's bugging, then screenshot that and post it here

pallid vector
fathom portal
#

That's the output log

#

we need screenshots of your Blueprint, where the magnifying glass takes you

#

@sand solar sounds like you should just start the game, then immediately call your pause functionality

pallid vector
#

this is the game instance

fathom portal
#

What is to the left of "Get Consumo" and the branch?

#

Looks like you're calling the "Get Consumo" after you try to use it, which means the value will never be set, but need to see the code before to be certain

pallid vector
fathom portal
#

Which "then" number is the branch and the "Get consumo"?

#

Make sure the "Get consumo" is before that branch where you use it

pallid vector
#

what branch

#

sequence ?

fathom portal
pallid vector
#

there is a sequence to event tick

sand solar
#

@fathom portal Thanks for the assist! I'll give it a try πŸ‘

odd ember
#

christ

#

sequence node on tick

#

big yikes

fathom portal
#

Right, yeah, so you're setting the value at the "then 9", but using it before that at the "then 2", when it won't be set and will always break

#

And yes, agreed, that's... jumbled to say the least lmao

odd ember
#

not to mention the performance hog it must be

pallid vector
#

Right, yeah, so you're setting the value at the "then 9", but using it before that at the "then 2", when it won't be set and will always break
@fathom portal

#

so this is the solution?

fathom portal
#

I mean, that's one way to do it

#

Yeah

#

Depending on what's after the "set consumo", you might just be able to use the branches afterwards

pallid vector
#

ok i ll try it

#

so now my output log is clear

#

jajaja

fathom portal
#

Glad I could help

#

I recommend organizing a bit

#

Might help fixing stuff in the future

#

@sand solar hows it looking?

sand solar
#

That did the trick! Not sure why I didn't think of that earlier haha πŸ˜…

fathom portal
#

Sure man, everyone needs a little push once and a while

#

Little nudge in the right direction. You already had all the ingredients

pallid vector
#

@fathom portal now only doesnt update the values at the event overlapping sequence

frigid anvil
#

Is there a way to generate or edit sound assets in UE4 with blueprints? F.ex. making a piano

pallid vector
#

Is there a way to generate or edit sound assets in UE4 with blueprints? F.ex. making a piano
@frigid anvil spawn a 2d sound

#

import as mp3

frigid anvil
#

I know how to spawn sounds, but I am wandering if there is a way to edit or mix that sound to create other sounds with it

pallid vector
#

a*

#

bind the button with a spawn 2d if you press a bunch of them you will create a sound like piano

#

edit like equalizer

#

run time

#

i dont know but it might be in audio components

frigid anvil
#

Is there a way to generate sounds though?

#

So think I got it now

gaunt mantle
#

is it possible to use compute shaders with blueprints?

pallid vector
#

is it possible to use compute shaders with blueprints?
@gaunt mantle someone post something related in #ue4-general

odd ember
#

@gaunt mantle through a plugin, yes

#

BP is just cpp behind the scenes

gaunt mantle
#

oh sweet

odd ember
#

whether or not it would have any net performance gain is anyone's guess

latent shadow
odd ember
#

@latent shadow are you setting default values for the map?

latent shadow
#

No, all assigned at runtime

odd ember
#

have you tried debugging to see what <k,v> are stored inside the map?

latent shadow
#

Yeah, It seems to be assigning correctly. Im trying to do it with an array right now, and it doesnt allow me to get a reference when accessing it in a function

#

only get(copy)

odd ember
#

try ignoring context sensitive and get (ref)

#

see what happens

latent shadow
#

I get a popup saying "array get node modified: now returning a copy"

odd ember
#

idk, might be something about particular data types only being gettable as copy

latent shadow
#

Weird, Ive indexed widgets and then retrieved references to them before

odd ember
#

maybe it's this particular widget type?

latent shadow
#

Unless theres some class setting that allows it, it shouldnt be. This widget is just parented to the base class and doesnt have anything very advanced going on in it

odd ember
#

strange

spark robin
odd ember
#

@spark robin just... expose variables in the widget on spawn? also it's not a MP question

spark robin
#

Since there are multiple players, I need to have the player index of each, so it kinda is a mp question

#

But wdym by expose variables then exactly? I think I need an example

zealous moth
#

Set local vars in your player controllers and define them through casting from the player's widget

spark robin
#

But how do I identify each player inside of the widget?

#

(Thats essentially my question)

zealous moth
#

Get the controller or owning player

spark robin
#

Yeah but like, how :l

manic maple
#

Hey all... How can I get two players to both view the same camera by default?

zealous moth
#

When you spawn a widget it is assigned an owner's viewport. Get player xontroller or get viewport owner.

manic maple
#

Posted in Multiplayer chat but doesn't look too active. Some questions gone unanswered there.

zealous moth
#

Set active camera to a same actor

spark robin
#

But its supposed to be fetching info from multiple players

manic maple
#

How do I do that? @zealous moth

#

Tried just calling set view target on begin play

#

Works for Server but not client

spark robin
#

(Ping me on further replies)

manic maple
#

Client for some reason just snaps camera view to his transform

#

Server view^ [correct]

#

Client view^ [wtf]

#

Any ideas vastly appreciated @zealous moth

#

Feels like this should be simple to do πŸ˜…

spark robin
#

You have to multicast it

manic maple
#

Sorry for being a noob. Replication and multiplayer is something that's difficult for me to grasp

zealous moth
#

I would say more but i am babysotting

manic maple
#

Setting it to multicast does the same thing Daniel

spark robin
#

For the clients to be able to recieve the data, it must be casted to them. And multicasting can only be done from the server.

So try placing a second custom event after your current custom event, which you set to multicast

#

So by your first custom event, you make sure the code is running on the server (as clients can not multicast), and by the second custom event, you tell the server to multicast it (cast it to all clients)

zealous moth
#

@spark robin you can also send data via event dispatchers and have players subscribe it

spark robin
#

You mean by custom events basically?

zealous moth
#

Ans event dispatchers yes

manic maple
#

Yeah I don't get it... Sorry. This is pretty tough for me to wrap my head around πŸ€”

zealous moth
#

Casting implies finding owners and define their vars. Dispatching simply sends out var signals and whatever 8s listening or subscribed uses it

spark robin
#

Fletch Im not that certain that its gonna work if you do what I said tbh, I really dont know if the code you sent in the screenie works in your caseπŸ€·πŸ»β€β™€οΈ

manic maple
#

Strangely now I've set it to this, it works for the first couple of frames and then snaps the camera back to the actor transform on client:

#

Spawns, loads in correct camera, then puts camera back to actor transform

#

πŸ˜’

#

No ideas?

#

😒

zealous moth
#

Because no camera is assigned to that player

#

Assign a camera

manic maple
#

What do you mean 'assign a camera'? Can you please elaborate?

#

That's exactly what I'm trying to do with the view target

spark robin
#

@manic maple I believe your switch on authority's outputs are supposed to be the other way around, if the device running the code has authority, its the server, and should then multicast, if its a client, it has remote access and should send to server

#

I've never used the switch on auth myself tho, so I might not get it right (You dont need the switch on auth, its a unnecessary step in situations like this)

manic maple
#

Switching them makes no difference unfortunately

#

Just sets correct camera for a few frames, then switches back to default camera if there is a camera component in the player Blueprint, or to Actor location if there isn't one

spark robin
#

Lol, just a cheap idea

#

But if you like, Try removing the camera that belongs to the other character if you can (The one its switching to unwillingly)

manic maple
#

I have tried with and without camera components.

spark robin
#

?

#

What happens if you dont have a cam comp then?

#

Oh, right

manic maple
#

It snaps the view to the actor location

#

If it does have a camera component, it uses that instead

#

Either way, it shows correctly for a few frames, then switches to one of the above

#

Only for the client though

#

Server works fine

spark robin
#

Thats weird, I've never played around with separate cameras yet, so Im the wrong guy to help with this

#

Actually

#

I have an idea

manic maple
#

I'm all ears if you can help me out right now because I'm at a loss, haha.

#

Really would like to get this working πŸ€”

spark robin
#

So then the code will first run on the server, and then on the clients

#

This can be due to some checks the server does to make sure the client has the same config as the server kinda (I discovered this myself like a week ago when I first started working on multiplayer stuff)

manic maple
#

Like that you mean?

#

Same outcome

spark robin
#

I think youre missing the node calling the Event_SetCameraMulti rn

#

no?

manic maple
#

Huh?

spark robin
manic maple
#

Same thing, unfortunately :c

spark robin
#

Aw okay

manic maple
#

You can see it cycle through on the client when I run

#

It sets it correctly for a moment, then decides 'nah, that's too easy' and fekkin' changes its mind..

#

Apologies for the frustration..

#

Would love for @zealous moth to explain what he meant exactly, he seems to know what's up :l

zealous moth
#

Babysitting. No computer around :(

manic maple
#

Any ideas I can try based on what you've seen at all?

spark robin
manic maple
#

No, just one.

#

Hence getting 0 in that array should get the only one present in level

spark robin
#

If it executes more than once, maybe its picking up on some camera you dont want it to (Tho Ik you said you only have one, just to make sure)

manic maple
#

That should execute twice.

spark robin
#

Then I think its picking up on another camera

manic maple
#

No, that's the loop to check for player controllers

#

It's not looping through cameras

#

Unless I'm missing something

spark robin
#

No, Im not familiar with loops, you might be right, its just a thought

manic maple
#

Getting all actors of the camera class isn't on a loop

#

It's getting all instances of player controller

#

Which I'm guessing is right at it printing two? Since there's two players spawned in?

spark robin
#

Ah right

#

Yeah okay

#

Thanks for explaining that to me lol πŸ˜„

true yew
#

are you sure you really want to do exactly this? there are basically 0 real life circumstances where it seems like a good idea to force-update a camera position from the server to clients. what are you really trying to achieve?

manic maple
#

I'm just wanting all players that spawn in to have the same camera view

#

How can I achieve it otherwise? Can't find any solutions anywhere πŸ˜•

odd ember
#

but... why?

true yew
#

well how does the server calculate where the camera goes, very generally (I haven't back-read)

manic maple
#

Because that's how my game is intending to work... This camera view needs to be fixed and not parented to the player.

#

Multiplayer replicated, one top-down view.

#

That's all I'm tryin' to do

true yew
#

like Gauntlet?

manic maple
#

Yep, looks right.

#

Never played it, but yeah, any multiplayer game with just one camera...

true yew
#

take the code that the "server" uses to calculate where the camera goes, and run it on every client instead?

manic maple
#

Alrighty... How do I do that?

#

Because that's pretty much exactly what I'm trying to do?

spark robin
#

Do you guys know how to destroy widgets btw (To avoid memory leak)? (Please ping on reply ❀️ )

odd ember
#

remove from parent

manic maple
#

Remove from parent should destroy it no?

#

Or at least garbage collection will if it's no longer attached.

surreal peak
#

Yes and no. The GC will destroy it.

manic maple
#

^

surreal peak
#

You have to also clear references to it if you have any.

manic maple
#

Hey Exi, do you have any idea how to fix my issue at all?

#

Hojo rolled up seeming to know what's up but hasn't followed through. All I'm looking to do is run a multiplayer game with one fixed overhead camera view, just like street fighter, say. Would very much appreciate any input and advice @surreal peak

surreal peak
#

The ViewTarget stuff?

manic maple
#

Sorry Hojo, didn't mean any disrespect there. That sounded way too passive aggressive

#

Think I'm just frustrated with this.

#

Mean no disrespect brother, I'm grateful for your input ❀️

#

Yes, that's what I'm talking about Exi

#

One camera. Multiple players.

surreal peak
#

Is the camera in the scene?

manic maple
#

Currently the camera is a separate Blueprint actor.

#

Hovering above the scene. The only way I could think to do it is by setting view target.

#

This works perfectly on the Server, but not on Clients.

surreal peak
#

Yeah, set the ViewTarget in BeginPlay of the level, or BeginPlay of the PlayerController, limited to the owning client.

#

And turn off the AutoManageCamera stuff in the PlayerController settings

#

The stuff you posted at the start, for what i saw, is total garbage :P

manic maple
#

I have no idea how replication works, I'm just now trying to figure it out. Could you please direct me on how you'd do it then? On the Level BP? Wouldn't that cause issues when it comes to dying/respawning?

true yew
#

the camera (your camera blueprint actor) should know how to position itself, e.g. by calculating the average position of your players or whatever you're doing. there is no replication involved in this

surreal peak
#

That's why you turn off autoManageCamera shizzle in the PC

manic maple
#

I can't see any auto manage camera options in the class defaults?

surreal peak
#

Could also be on the camera manager

manic maple
#

How would you achieve what I'm trying to, Hojo?

odd ember
#

(player1.position + player2.position) / 2

manic maple
#

I'm not calculating anything @true yew all I want is just to have one view for multiple players. Default view seems to set based on the character having a camera component, and if it doesn't have one, it'll just snap the view to the actor's location. If there's another way to set the the default on this I'd love to know

surreal peak
#

bAutoManageActiveCameraTarget

true yew
#

well back up a bit. what "sets" the view you want to have? is it hard-coded into your level? is there code on your server that runs to set the camera position?

surreal peak
#

That's the boolean

manic maple
#

I'm using a default 3rd person template? Whatever sets the view by default. I don't know? It uses a camera component if the player BP has one

surreal peak
#

Turn that boolean off in your PlayerController and it will stop automatically giving the pawn the camera view

#

Then you can just set the ViewTarget in the levelBP or on BeginPlay of the PlayerController itself, limited to IsLocalPlayerController

true yew
#

i'm trying to figure out how to ask this. this isn't supposed to be a trick question or anything. what causes your camera to be 100 feet high up in the air and pointing downward? did you place it by hand, does code move it there, what?

manic maple
#

I placed it by hand

#

In a separate blueprint with nothing but a camera

surreal peak
#

I answered the question...

#

Just try this and come back if it doesn't work

true yew
#

ok, if the camera doesn't have to move, you put it there, you just need everyone to use it - listen to eXi

manic maple
#

Exi, having done this now it worked. Thank you x1,000,000. You are a legend. Thank you so much.

[I am still kind of confused as to why exactly. Why did it continually override? I'm not complaining I just want to try to further my understanding]

surreal peak
#

The PC and the PlayerCameraManager usually take care of the ViewTarget. Which is an Actor. Camera components only offset the view. If that boolean is true, then the PC will set the ViewTarget to the possessed pawn/character. And what you did earlier with BeginPlay and rpcs and what not is just doomed. You can't just hope for all players to be connected at the same time.

#

Man, i hate typing on phones sometimes..

#

Anyway, glad it helped. I'm off now, catching some sleep.

manic maple
#

Thanks Exi, appreciate it

true valve
#

Is there a way to keep the physics volumes visible during gameplay?

tulip iris
#

Can an actor know what level stream its on? I could manually do this but it would be a pain. I just want an actor to do a check to see what level stream its on, and then return that value.

fathom portal
#

@true valve I think you need this:

forest basin
#

Any Eye Deer why a box collision would not trigger the first time you enter it? Player walks up to a chair, it allows them then to sit, but just not working the first time I enter the space for sitting in the chair

spark robin
#

Hey everyone, so for some reason, the branch in the screenie always outputs already hit for some reason.

Im trying to get around on component begin overlap getting triggered multiple times as my mesh overlaps a players mesh, if you have any other solutions for this, feel free to suggest (The entire thing is inside of a bullet/projectile blueprint, so I always want the bullet to only run the code after the branch once for each actor it overlaps, the reason to that I dont just destroy it first time the code runs is that I want the bullet to be able to hit multiple targets before it gets destroyed)

Im going to bed now and will be reviewing any responses tomorrow, so please ping me if you have any ideas/knowledge about this ❀️

forest basin
#

and sometimes it ignores the rest of the event for sitting IE stopping character movment

#

Why is something as simple as sitting in a dang chair being so complicated.

true valve
#

@fathom portal I don't see it for physics volume.

forest basin
#

Hmm could it be that its a problem with the collisions between static and skeletal meshes?

#

Its setup so the chair is not part of the BP, its just a blank sit down location BP so anywhere I drop it the player can sit. Since Static and Skeletal meshes do not like each other, Should I just add the mesh to the BP and just change the mesh based on the situation in the map?

fathom portal
#

@true valve have you tried the show collision command?

#

And I tried the command for myself, and figured out why my collisions were only running when walking right.... Because my right flipbook was apparently set to collisions every frame!

twilit lily
#

Here is my BP for changing the color via sliders on a material. I am storing the values however when trying to change the same material on another pawn it wont work, the rgb values transfer over fine, its the Set vector param that is not working.

odd ember
#

what's the error?

twilit lily
#

no error

#

Just doesn't change the color on the 2nd pawn

odd ember
#

my guess is that you're still targeting the first pawn

twilit lily
#

They share the same material tho?

odd ember
#

no such thing as sharing

twilit lily
#

Well I mean both are set to the same material

#

I'm not changing anything about the pawn but more so on the material side.

odd ember
#

what's the code for the get player controller?

twilit lily
#

I don't think I reference the pc

#

only the game instance

#

Wait

#

Yeah no I don't

#

I'm just storing the rgb info to the GI

#

Which works fine

odd ember
#

what I meant was what is the code above with the player controller

twilit lily
#

Just a widget, not really related much

odd ember
#

well if that widget is where you change colors

#

you're only changing colors for player 0

#

so the first player

twilit lily
#

Yes

#

Thats correct, thats why I'm storing the info in the game instance

#

So I can pull it later for the real character

odd ember
#

well there's your answer for why it doesn't work

twilit lily
#

It's not supposed to change the real characters color until its created

#

hence why I pull the stored rgb info out of the GI

odd ember
#

I mean you asked about why it doesn't color the second pawn

twilit lily
#

and try to set vector param

odd ember
#

I understand what you're trying to do

twilit lily
#

Okay

odd ember
#

it's not really relevant for what I'm saying is wrong

twilit lily
#

Is there a better way to go about this?

#

This was the only way I could think to do it

odd ember
#

where do you hook up your pawns

twilit lily
#

Well I have a color changing level

odd ember
#

there are of course better ways to do this

twilit lily
#

Huh yeah, always a better way xD

odd ember
#

but honestly at your level it's going to be hard to suggest something that I would be able to give to you to build

twilit lily
#

color changing level is for what I call displayball

odd ember
#

like a lot of this is complex behavior

twilit lily
#

Ahh

#

Yeah haven't done much of that stuff, if at all

odd ember
#

so of course it's not easy to get right

#

anyway show me your pawn setup

#

maybe I can at least make the second pawn work out

twilit lily
#

This is the fake pawn

#

essentially just for show

#

the real pawn

#

Has a lot going on

#

Movement and timers

#

So it can't be used to display color changing

#

The gamemode info for the display ball

odd ember
#

Let's go back to this

Just doesn't change the color on the 2nd pawn
@twilit lily

twilit lily
#

Okay

odd ember
#

so you can't change the 2nd pawn

twilit lily
odd ember
#

what is the first pawn? your display ball?

twilit lily
#

yes

#

Which changes easily

odd ember
#

where is this logic setup?

twilit lily
#

The sliders?

#

They are what changes the first values

#

Thats one example

odd ember
#

you're casting to display ball instead of ball

twilit lily
#

Well yeah

#

Because Ball isn't a thing at that time

odd ember
#

I see

#

so your setup is

#

you do the color change, click ok, then spawn the level expecting the color to be on the pawn

twilit lily
#

kind of yeah

#

So since those are just float numbers

#

Easy to store across levels

trim matrix
#

Did you assign the dynamic material instance to a material slot on the ball on beginplay or in the construction script?

twilit lily
#

I stored it in the Game instance

#

A copy of it from display ball

odd ember
#

probably the ball pawn doesn't have a dynamic material instance

twilit lily
trim matrix
#

not sure if that works

twilit lily
#

Mat BGIInst is a copy of the dynamic instance from display ball

trim matrix
#

like if it's saved

odd ember
#

where is your ball pawn blueprint?

twilit lily
#

thats apart of it

#

thats the only color related part on the Ball

odd ember
#

yeah that won't work

#

create a new dynamic instance on the pawn

twilit lily
#

Ok

odd ember
#

and THEN set the color by the stored values

twilit lily
odd ember
#

might not work in construction script but give it a go

twilit lily
#

yeah it was a no go

#

begin play?

odd ember
#

yea

#

construction script is really just if you want to do something with the actor at editor time

twilit lily
#

oh

#

erm

#

Still not working

#

Im going to triple check the rgb values with print

#

Yup they are stored correctly

trim matrix
#

are you sure the parameter is called Color?

twilit lily
#

100%

#

It works with my other pawn

#

All im doing is storing those values that get set and sending them to this pawn

odd ember
#

put a breakpoint and see if those values are actually saved

twilit lily
#

breakpoint? uh let me try, never used it before

#

So its not values

#

This doesn't even work

#

Which should just be red

#

I did confirm that the Ball is taking this mat by manually changing it to a different color

#

Here is the Material

odd ember
#

@twilit lily I think I know

#

set the material AFTER you set the parameters

twilit lily
#

Good idea

#

ill try it

#

Awesome

#

Its working now

#

Got it all plugged in

#

Man those small things can really get ya xD

odd ember
#

@twilit lily so the set material is something you'll need to do every time you want the material values committed

twilit lily
#

nice to know

trim matrix
#

@twilit lily btw if your mesh only has 1 occurence of that parameter name amongst all of the materials you could also not use a material instance dynamic

twilit lily
#

oh

#

I did not know

#

This side of things is still far off for me lol

trim matrix
twilit lily
#

I see

trim matrix
#

this is the construction script

twilit lily
#

Whats the big dif between a construction script and begin play?

odd ember
#

construction script is for editor use

#

begin play happens on runtime

trim matrix
odd ember
#

it's a bit more complex than this but that's the gist

cobalt ferry
#

Is there a built in way to draw things in the viewport of blueprint editor on a generic and shared basis?

#

Say I have an interface that defines some stuff that I'd like to visually show in blueprint editor's viewport. Is there some way to add in some lines based on a selectable view or something? -- as in the show menu or broadly

odd ember
#

not entire sure how you would draw something like this. for sure there's nothing selectable. there might be a console command, but it also kind of sounds like it could be solved with a print string?

gaunt mantle
#

how do you convert world points and to points relative to an actor including rotation?

tidal jacinth
#

So, why my character still 'collides' even if I set it to NoCollision?

cobalt ferry
#

Yeah mostly curious because i'd like to avoid a base class implication for only needing to write some debug lines for this interface

trim matrix
#

nvm did it but still moves when i move my character

gloomy nexus
#

Hey there, im trying to construct an object from a class (Actor). I am calling this in my blueprint which is a child of Actor Component.
However, i'm getting an error saying 'Cannot construct objects of type ...'

Does someone maybe know why this is happening?

maiden wadi
#

@gloomy nexus I'm not an expert, but I don't believe you can construct objects deriving from UObject starting from Actor and beyond. You should be able to use the SpawnActorFromClass node instead though.

gloomy nexus
#

Thanks for your reply, going to try that πŸ™‚

rough wing
#

How would I make my character slide? this is what I came up with but my character gets stuck in increasing sloped

#

slopes

bleak vector
#

I'm trying to make a fairly simple enemy behavior tree. Right now, when it starts, it gets all of the "exit" actors and finds a path to them then tells the pawn to move towards the nearest one. Unfortunately if the path is still completely obstructed it still thinks it's a valid path πŸ€”

gilded pebble
#

Hey, what would be the best way to cut a grid mesh to a circle or some other amorph shape insead of the square/rectangle it is at the start?

fathom spindle
#

Hi all, I'm using an HMD and need to get the GetDotProductTo of my Camera component and an Object referenced in my scene. The node only accepts actors, does anyone know how i could get the 'self' to update with the camera ie HMD movement?

odd ember
#

@fathom spindle .... why don't you just use vectors for the dot product?

#

I'm not sure if HMD has the same setup, but you can try with SetControlRotation

fathom spindle
#

i thought there was a difference between regular dotproduct and getDotProductTo

odd ember
#

what would that difference be?

#

like you get a dot product either way

fathom spindle
#

i guess none!

#

thanks πŸ™‚

#

Hi @odd ember the regular dotproduct doesn't seem to work for me, am i doing something wrong?

#

just prints as zero

odd ember
#

if the dot product is 0 then one of your vectors is 0

#

use breakpoints to debug

#

also!

#

keep in mind if you're looking for directional overlap with the dot product you will need to normalize vectors

fathom spindle
#

ah ok so i should offset my player location a little and normalize both incoming vectors?

odd ember
#

well it depends on what you're looking to do

#

the dot product is literally just a product of both vectors multiplied by each other

#

so if one vector is 0, the dot product is 0

fathom spindle
#

im looking to get a value for how much my HMD is looking at this actor

odd ember
#

that's directional overlap

#

so yes, normalized vectors

#

normalizing a vector generally means you get a direction instead of a distance

fathom spindle
#

ive done that and now it does update with the HMD view rotation but the values are strange. -0.05 when its facing dead on, -0.1 when its 90 degrees away

odd ember
#

ah it's not that bad

fathom spindle
#

i can just remap

#

curious why though if you know

odd ember
#

no need

#

well most likely no need

#

normalized dot product spans a range from 1..-1

#

1 is dead on, -1 is the view directly opposite

#

0 is at either 90 deg angle

fathom spindle
odd ember
#

the tolerance isn't something you need to touch

fathom spindle
#

0 is at either 90 deg angle
@odd ember thats what i was expecting but im getting these strange small values

odd ember
#

breakpoint and cehck the vectors

#

well actually

#

for the camera

#

use the forward vector instead of normalizing location

#

for the secondary vector, use (camera.location - otheractor.location).normalized

#

that's going to give you the direction directly from the camera to the other actor

#

versus where the camera is pointing

fathom spindle
#

ok hang on

#

sorry new to this stuff, really appreciate your help

odd ember
#

well try it

fathom spindle
#

gives -40 facing, zero at 90degrees in x and 180/-180 in y

odd ember
#

you normalized one before subtracting

fathom spindle
#

so its cameraWorldLocation - otherActorLocation

#

then normalize that before dot?

odd ember
#

I wrote it previously my dude

fathom spindle
#

yes thats what you said sorry

#

works perfectly thanks so much!

cinder relic
#

What's the difference between UMaterialInstance and UMaterialInstanceDynamic?

odd ember
#

@cinder relic don't think you're in the right channel, but dynamic instances can be changed on the fly and reapplied. instances are just cheaper versions of actual materials

#

(with baked in data ranges)

spark robin
#

So for some reason, the branch in the screenie always outputs already hit for some reason.

Im trying to get around on component begin overlap getting triggered multiple times as my mesh overlaps a players mesh, so Im trying to make it so that the branch checks if the actor its overlapping has already been overlapped once, if it has been overlapped, I dont want it to do anything, if it hasn't, I want the code after the branch to continue to run (The entire thing is inside of a bullet/projectile blueprint, so I always want the bullet to only run the code after the branch once for each actor it overlaps, and why I dont just destroy it first time the code runs is that I want the bullet to be able to hit multiple targets before it gets destroyed, so I were planning to set up some sort of a health system for the bullet that would then run directly after the code in the screenie to have the bullet get destroyed after that it have hit enough obstacles to fully drain its health)

#

Is this what Event Hit is for? I tried using a Event hit event node earlier, but I didnt get it to pick up on anything, despite having "Genererate event hits" set to true. Physics for the bullet is however disabled (As I simply dont need that), is event hit only for physics sims or should I be able to use it for stuff like this? Or is there another event node for this (A event node that will only trigger once per overlap for each actor it overlaps with)?

#

(Please ping on reply ❀️ )

#

I dont event get why my code doesnt work in the first place :l I feel like it should

trim matrix
#

I'm realising my character has no velocity... :/

#

When I Print Player Character's velocity in debug mode all X Y and Z stay at 0.

#

Am I missing something ?

atomic salmon
#

@trim matrix you need to get it from the CMC

#

Get Last Update Velocity

trim matrix
#

Character Movement ?

atomic salmon
#

yes

spark robin
#

vr_marco can you troubleshoot my code?

#

By any chance? ❀️

atomic salmon
#

The generic Get Velocity only works for Primitive Components

trim matrix
#

It stills displays 0s...

#

Same result with Get Last Update Velocity

hollow cape
#

@trim matrix ....it looks like you're printing velocity 1 time? Are you getting it on tick or something?

atomic salmon
#

@trim matrix are you printing it on Begin Play?

hollow cape
#

looks like it's being printed once, on what I'm assuming is begin play

#

so yes, it being 0 makes sense

atomic salmon
#

@hollow cape yeah looks like so

#

of course

trim matrix
#

Oh yes it's on BeginPlay

atomic salmon
#

Begin Play is executed only once

hollow cape
#

yeah it's not going to show anything other than 0 since it's 0 at beginplay

atomic salmon
#

so you have been showing the initial value for 1000 seconds

#

and the initial value is obviously 0

#

@spark robin the best way to do that is to use a boolean flag for the overlap as a gate

#

on the initial overlap you set it

#

then you use it to prevent any reaction to any other overlap

#

finally on End Overlap you set it to false so the next overlap can be detected

#

another way to tackle this is to use a DoOnce after the first overlap and reset it only on End Overlap

trim matrix
#

Ok, it displays the Velocity but according to World axis, so there's minuses values.

hollow cape
#

vector length

#

velocity -> vector length -> print

#

if you want to ignore Z velocities (ie falling/jumping), do vectorlengthXY instead

trim matrix
#

Oh yes I forgot.

#

Thanks.

atomic salmon
#

@trim matrix in general, all physics quantities are in world coordinates

#

you can transform them in local space if needed

#

Feed in the the world transform of your character and the velocity vector

#

with that you have your velocity in local space

trim matrix
#

I'm using this value to affect something else in fact.

spark robin
#

@atomic salmon Oh, I didnt know about End overlap! Is there any chance it might bug tho? Im thinking if it overlaps 2 actors at once

I will try it non the less, thanks ✨

atomic salmon
#

@spark robin if you want to detect a specific actor to Begin or End Overlap, you need to cast Other Actor to the actor you want to detect

#

Other Actor is one of the outputs of the Overlap events

#

Say you have a BP_Sphere and a BP_Cube overlapping a trigger volume. If you want to detect only the BP_Sphere at a given time, just cast Other Actor to BP_Sphere. In this case the cast will fail if BP_Cube overlaps the trigger and you only do something if the sphere has overlapped.

trim matrix
#

I would like to make the Velocity equal to another Value if that makes sense...

#

For example, my Max Velocity is 900, and I would like to make it so that it equals to the maximum of another Speed value at 14.

#

I tried to Divide the Velocity by about 90 but it messes up things when I move too fast.

#

@trim matrix what exactly are you trying to do? maybe MapRange can help?

#

I try to make 2 ranges following one another simply said.

#

yeah maprange or divide value by max value to get alphas

#

Oh I forgot about Alphas.

#

Maybe that's the solution.

#

can also use that for a lerp

#

Ok so it seems to work well, but I have to Interpolate because it still create jerks.

#

Certainy because the Velocity goes too fast.

#

This is with Divided but I have the same result with Map Range Clamped.

karmic hornet
#

Is there a way to override PostEditMove in blueprint?

trim matrix
#

@trim matrix possibly because you are directly influencing velocity instead of using AddMovementInput but not sure

#

This is how it's calculated.

#

Should I use Finterp To somewhere?

karmic hornet
#

Or at least where's the best place to bind an event? Don't really want to rebind it on construction script πŸ˜„

#

but it's for an editor function

#

so 🀷

trim matrix
#

@trim matrix I don't think I should use the movement's Axis and such.

#

So I tried with my joystick's axis, it's the same, I have the jerks between speed change.

tulip iris
#

Can actors see what stream / map they are on?

#

I can manually get the streaming level but I want to know if an actor can see what stream its on without having to manually type it in

zealous moth
#

@trim matrix use movement states and transition between them instead of forcing the velocity

trim matrix
#

I don't really understand what you mean. I obviously can't use fixed variables for what I aim for.

#

Like Max Walk Speed itself.

zealous moth
#

Movement states dictate limits. I am not sure what you are trying to do but based on your bp and vid you want to shift your speed. No? States do that for you.

trim matrix
#

I'm using velocity to influence other values.

#

It's the same when I used joysticks axis as I said (which means a simple range from 0 to 1)

#

So the problem doesn't come from Velocity itself I suppose.

ruby flare
#

Anyone have any tips for using the search box in Blueprints? The documentation at https://docs.unrealengine.com/en-US/Engine/Blueprints/Search/index.html is pretty sparse and doesn't cover, for example, all the syntax I get when I do a normal search and press "Find in all Blueprints":

  1. There are names in brackets, e.g. "(MyBlueprint)"
  2. There are =+ signs, e.g. MemberName=+"Something"
  3. You seem to be able to search by MemberGuid and other properties of, say, a VariableReference but not others?

Ideally I'd like to search for all BPs that have been deprecated so that I can get a picture of how much work there is to do replacing them across the whole project.

Also, is there any way to export the search results as plain text so that I can keep track of them outside the editor (like on a todo list etc.)?

Getting the most out of searching in Blueprints, from indexing all Blueprints to advanced search syntax

odd ember
#

@tulip iris that would go against the OOP paradigm, so no

#

what are you trying to do?

tulip iris
#

What's the "OOP paradigm"? I just wanted certain Utility blue prints to be active if their given stream was active. I can do it manually via the stream name but I was hoping actors might be able to know the stream they reside on.

#

For convenience mostly

odd ember
#

it's a violation of how the system architecture works

#

like you should query actors of a level through the level itself

tulip iris
#

I gotcha

atomic salmon
#

@tulip iris you can do it but not with Blueprints afaik. Basically you need to get the bounds of all streaming levels and check within which one your actor is.

odd ember
#

yeah blueprints as well do not allow access to ULevel which holds the level actor list

tulip iris
#

Alrighty