#blueprint

1 messages · Page 246 of 1

faint pasture
#

so the response is ignore

#

Tree and axe need to at least overlap each other

lost hemlock
#

tree is world static

#

it's not world dynamic

#

only axe is world dynamic

faint pasture
#

axe and tree will ignore

hardy merlin
#

Thanks. I'll take a look.

lost hemlock
#

But the problem is, begin play string never gets fired

faint pasture
#

are BP_Trees even being spawned?

#

You've put the cart about 100 miles before the horse lol

lost hemlock
#

Also I see all these errors but never had any problem with actually spawning of the trees and stuff

#

or the axe

#

works just fine

#

i can see my tree static meshes just fine

faint pasture
#

can you see BP_Tree actors

#

not static meshes with the same mesh as your BP_Tree actor class

lost hemlock
lost hemlock
unborn lichen
#

Does anyone have any experience assigning and referencing/getting references to individual instances of a dynamic material assigned to several components? I'm trying to do something potentially dumb; I have prefabs that I get the components of, and assign a dynamic material instance to. These prefabs, and the material assignment, happen on a different blueprint from the blueprint I use to modify the parameters of the material. I want to modify the material instance of a particular prefab's components separately from other prefabs. But I'm having trouble finding a suitable way to getting the material instances assigned to components of specific prefabs and setting their parameters from a different BP. The closest I've got so far was setting a single instance and sending it through a BP interface, to the BP that requires the reference, but obviously it ends up assigning all prefabs (and their components) with the same material instance. I suppose perhaps using a map would work best in this case (pairing the prefab as a key with a material instance.. instance.. as a value)?

unborn lichen
#

currently just a bunch of static mesh actors (a group of primitive components). in other words, basic level geometry.

#

More specifically, what I'm trying to do is modify material parameters for individual prefabs, through the player controller. Ideally I don't think I want to assign dynamic materials through the controller.

#

I think my best bet is pairing a dynamic material instance with a prefab, since the amount of prefabs and instances of a material will never change throughout the course of a play session

maiden wadi
primal hare
#

I'm making my character follow a circular spline. But at half way point the controller direction reverses.
How to fix this?

#

Spline BP and CHaracter BP

unborn lichen
#

I have a blueprint which does some stuff after the prefab spawns, and I have the player controller. those are the two chances I get to create and modify the material instance parameters

maiden wadi
unborn lichen
#

you cannot get a dynamic material from a primitive component

#

you can get a material, but you can't get a dynamic material instance reference

#

and the set scalar parameter (and other variants of the parameter modification nodes) only appear for the dynamic instance material node

#

basically, there's no good/easy/lazy way to get a reference to a dynamic material applied to a primitive component (as far as I know), even if a MID is clearly applied to it, because you can't get the material applied to the primitive component as a material instance dynamic reference

#

from what I can tell, I'm forced to pair the material reference with the prefab in some way in first blueprint, so that I can later reference that prefab-material pair in the player controller blueprint and apply the material to the primitive components of the prefab. If I'm missing an obvious alternative, I'd be glad to know it.

lunar sleet
#

Just create one

#

CreateDynamicMaterialInstance node and there’s your ref

unborn lichen
#

you did't read my previous messages

#

but anyway, I guess Set Scalar Parameter from Custom Primitive Data might actually work?

lunar sleet
#

How far up do I need to read

unborn lichen
#

forget it, I may have found a solution

lunar sleet
unborn lichen
#

Care to elaborate?

lunar sleet
#

Yeah sec gotta find Vik’s message in here

unborn lichen
#

Alright. The obvious way would be to drag off a component reference and search for "get dynamic material instance" or some form related to that but I had no luck. I'm looking forward to being wrong here 🤣

lunar sleet
#

As for the way I did it before I learned that from him: I would just use the Create Dynamic Mat Instance on the mesh, then modify its params. Iirc, If the original material is already an MI, the changes are instantaneous, and if it’s a regular mat, you just need to also change the mesh material to the new instance when done

unborn lichen
lunar sleet
#

It’s not a mesh component ?

unborn lichen
#

no, it's a primitive component

#

it's not an actor

lunar sleet
#

I mean a mesh component is also a primitive component but wdym like an arrow?

lunar sleet
#

Or do you mean an actor component ?

unborn lichen
#

the components in a prefab actor exist as primitive components

#

hm..

#

actually

#

give me a moment, I might be able to adjust this

#

nope nvm, I'm SOL

lunar sleet
#

I haven’t worked with prefabs tbh, so there’s that. Idk exactly what you’re looking at

unborn lichen
#

I can get all attached actors but that's a faux node that Prefabricator comes with that doesn't really help

lunar sleet
#

If this component gets attached to a parent actor you can prly get parent (attach) or smtg

unborn lichen
#

ultimately, I'm just trying to procedurally spawn level geometry and do some dynamic material shenanigans to fade/unfade stuff based on some player location logic

#

but prefabs have proven to be somewhat of a pain in the ass in some cases and a godsend in others

lunar sleet
#

Or is it not good for your use case?

unborn lichen
#

I'm not too sure, it doesn't look too related to what I want to do. but in any case, I think this https://youtu.be/QQ-VzeGjLMo may actually be the solution

Hey hey! Today we're talking about Custom Data, or Custom Primitive Data which is an extremely awesome way to create variation in your assets, as well as a very effective way of optimizing your scene. Draw calls can be a huge performance bottleneck if left unchecked, but Custom Data allows us to have control over colours and other parameters in ...

▶ Play video
lunar sleet
unborn lichen
#

seems like it might! it's late here but I'll report back if I've succeeded

lunar sleet
#

That looks like a good channel to learn more about mats from so I’m saving that. Only thing that didn’t age well is “go read the documentation” 😀

unborn lichen
#

hahah indeed

lunar sleet
#

Good luck

unborn lichen
#

It worked!

#

and surprisingly too. required even less setup than when I was screwing around with dynamic material references (I still need the prefab's components to have the material instance dynamic assigned to them in the initial BP, but that's easy). glorious.

maiden wadi
# unborn lichen you cannot get a dynamic material from a primitive component

Yes you can. CreateDynamicMaterial is actually badly named. It should be named GetOrCreateDynamicMaterialInstance. Because that's what it does. It first gets the material. If it is a dynamic material instance it'll just return it. Else it'll create a new dynamic instance and set it.

You can do the same thing yourself if you know that there is a dynamic material instance on the component. You simple GetMaterial with the right, or every slot, and cast it to a dynamic material instance. If it succeeds you had a dynamic material instance there. If not then you can choose to silently let it fail or create one for the slot. But if you want to create one, then just use the CreateDynamic material instead of all of this because it'll do all of this in a single node.

unborn lichen
#

That's interesting to know, thanks! damn shame it's poorly named.

unborn lichen
lunar sleet
unborn lichen
#

yep

maiden wadi
#

CPD is pretty good. Definitely use when you can. But it does have limitations in that you quickly hit the limit of properties you can alter on a material. Not a big deal early on, but larger projects with complex shaders hits that limit pretty quick.

unborn lichen
unborn lichen
#

Thanks for all the help and leading me to the right direction, everyone 🙏

karmic barn
wise ravine
#

So casting is looking for a more specific type at the cost of performance

thin panther
hushed fjord
#

Hold on casting eats performance?

#

If it's implemented the same way as dynamic_cast it could

wide schooner
#

Does this mean that you communicate your durability from your item to the inventory ?

#

Or the inventory directly holds the AActor ?

dawn gazelle
# wise ravine So casting is looking for a more specific type at the cost of performance

Casting is literally attempting to convert a reference to a specific type. If it succeeds then you can access the variables and functions of that type. If it fails, you get a null pointer reference out.
A comparison of a reference is checking if that reference is a specific reference. It has nothing to do with its type at all.

Performance really has nothing to do with it, they are both different tools for different jobs and you'd use the one for whichever of these scenarios you need.

dawn gazelle
# wide schooner Does this mean that you communicate your durability from your item to the invent...

It depends on what your definition of what an item is and what an inventory is.
Your base definition of an item can be an actor class, it could be a row in a data table, it could be a data asset. There needs to be some single thing that says what the base definition of what that item is with default attributes, like your durability.
if you're using an AActor to represent your item at run time, then that AActor would be spawned with the base data about the attributes and you manipulate them as needed.
The Inventory would provide you with a means of keeping track of what items you have (for example, an array of AActor items) and manipulating the items within your inventory, moving them around, etc.

prisma iron
#

maybe someone can help me?
i have a grab function to just grab an object but my problem is:
with "Grab Component at Location with Rotation" the object will rotate ones while grabbing..
and with "Grab Component at Location" the object doesnt rotate but swings around on the point where i grab the object...
but i want it stiff while grabbing, doesnt matter which "node" i use
what can i do?
(changing values at the physics handle like linear or angular doesnt help)

wide schooner
#

What are your thoughts about this setup ?

obtuse oriole
#

is there a way I can prevent the box extent from increasing when rotated?

#

Get Box Bounds is just a simple pure function that returns the coordinate of all the 8 points, nothing of a mystery

#

okay this method only works when it rotates on yaw, the points completely offsets when it pitched or rolled

junior quail
#

only z rotation gonna be adjusted, try this

copper chasm
#

For a tabletop roleplaying game simulator thing I could put dice rolls in a BFL right? Calling them from everywhere, they literally just generate a number and output

dawn gazelle
#

You could, but Is it really necessary?
If you want to have 3D dice in the simulator, you may want to just have the 3D meshes and then determine what the value is after physically rolling the dice in the game world.
If you're just wanting rolls as calculations, Random Integer in Range would cover all possible types of rolls, you'd just need to give it the min and max value of the dice.

dark drum
obtuse oriole
#

I see

copper chasm
dawn gazelle
dark drum
copper chasm
#

I just don’t have a good place to give a satisfying visual of a mesh rolling around, or I’d just do it with physics

deft wasp
dark drum
copper chasm
#

I got an offer to help on my game if “you wanted to switch to unity” I said no thank you I would rather ask questions and learn through people telling me roundabout ways to do what I wanted plus a little bit more 😂

marsh pilot
#

Anyone have ideas or examples on how you could achieve a building cutaway mechanic for a top-down tycoon-style game?

#

Oh actually it's called a clipping plane. That helps

violet bison
#

is there a more straight forward way to get 4 textures (based on number generated) and put them on 4 respective buttons?

#

because I'm currently setting button 60 times per class(in the future) while remembering the order of them

dawn gazelle
dark drum
violet bison
#

4 textures from 30 possible ones, based on random number generated

dark drum
violet bison
#

yes

dark drum
# violet bison yes

I would have them as an array. Then you can get random element. You might need some additional logic to prevent duplicates but it should be more manageable than a switch on int.

wise ravine
#

I was following a tutorial, are nodes like Mouse X and RMB supposed to work? Because they don't for me... I tried experimenting with adding a Mapping context so my IA_E node might work... It doesnt. I'm sure I'm doing a handful of things wrong

copper chasm
#

i have no idea lol, i'm just not switching engines atp

stoic narwhal
radiant dove
dark drum
radiant dove
#

Or player char but then your casting to the control to set it anyway

dark drum
#

With the BP name being Inspect Item, I can assume it's an item the player would interact with and it's the interaction that would most likely enable the input. If it's an inspect triggered from an inventory when the item doesn't exist, it can be done when the item is spawned. Input Mapping Context can be added at the same time. Personally, I'd handle it in the item itself as I normally pass who is interacting so getting the relevant controller is simple enough. It would only require casting to the base player controller class.

radiant dove
#

Would you add separate contexts or make rules for one? I always assumed it was better to handle all control mapping on the player controller and then cast to it when needed. I'm still a noob though

dark drum
radiant dove
#

Very true lol. I try to comment the hell out of everything to save myself time later

lunar sleet
round grove
#

Hey guys im trying to make a tiered event system where x happens at level 1, y happens at level 2 and z happens at level 3. What is the best way to approach this?

kind estuary
#

What is the GameMode for if we cant store other level actor references there?

#

Im trying the eye drop thingie doesnt work bruh

#

it only works with the node Get Actor of Class

#

i thought i could use this class as some kind of master class manager of the level. you know... where you store all the references and some generalistic stuff

thin panther
steady night
#

how would i make this spawn in a random direction not the forward vector ?

dark drum
severe tendon
#

What is the difference between "Line-Trace by channel" and "Multi-Line Trace by channel?

radiant dove
severe tendon
#

Can I select how many lines I want to send?

radiant dove
#

What's the purpose of it? Maybe better off with sphere trace

#

If you are just trying to cover more area

severe tendon
#

For example, I have a sniper that has a lot of perforation, so it can hit 2 enemies at the same time

#

Or a shotgun that shots different lines in different directions

fading sail
#

I dont get how to collide a BP (or rather its child collision-capsule) which is moved by its own script from in-the-air into the ground. see the 8-sec-video how it slides right through the ground and my collision=explosion logic wont trigger, neither for On Component Begin Overlap (Capsule) nor for On Component Hit (Capsule). Collision settings are in the 1st screenshot. Also the movement code shown in there only ever prints false/false as it glides through the ground.

The "ground" being a World Partition Landscape set up like 2nd screenshot.

How can I ever move something programmatically that'll also trigger the builtin collision mechanisms? Is there some update method I need to call?

radiant dove
#

Shotgun would be good use for mult line. The bullet penetration might be better off adding parameters to the projectile

severe tendon
#

You can set it so that the lines go in different dirrections?

radiant dove
#

I believe that's the purpose of it

#

There's some YouTube tutorials called "wtf? is _____" they have one for all the traces

severe tendon
#

Oh yeah, I know those

#

I will search it then

#

Thanks 👍

kind estuary
#

it doesnt allow to get references from the level

#

i mean

#

where would you store stuff about map generation, references to other classes

#

the array of current players alive

#

the array of rooms and buildings you can enter and stuff

#

i was thinking i could store this in the GameMode

#

but its not good because it doesnt allow to get references from the map directly. only with Get Actor of Class

pulsar osprey
#

you could make a subsystem that actors register themselves to

red pike
lost hemlock
#

hi

mild galleon
#

hello. i am intending to swap the cursor.
What would i cast to to get the cursors owner,
and, would you say it works like that?
Hello, Christopher! 🙂

#

i guess this could work, although i only have defined software cursors....

gentle urchin
#

For a shotgun youd ForLoop traces from the same origin but with different angles

zealous moth
#

Or use dot product

#

Just saying

vast bone
#

Enemy Ai is stuck in circle loop walking around it instead of attacking me, I couldn't figure out why to debug it

There are like 50 enemies of the same bp all act normal but then one or two of them gets stuck like that and doesnt attack

Anyone have an idea why?

plain cypress
#

If I have two Actors like that with Collisions that enable Interaction with them,
But since they are placed together, the Collisions overlap – so the End Overlap event is not always triggered, since it's seeing it as the same collision

Any idea how could I avoid something like this?

woven lark
#

i feel so dumb right now... i want to spawn particle system component on component hit, and destroy it when the actor doesn't hit anything. how do i do that?

timid yoke
vast bone
timid yoke
timid yoke
woven lark
timid yoke
plain cypress
timid yoke
dawn gazelle
plain cypress
timid yoke
plain cypress
dawn gazelle
#

The colliders have profiles that can detect specific other colliders.

plain cypress
#

Ok I'll look into it thanks

dawn gazelle
#

It's this whole bit. This is what the capsule collider is of a character by default. Because it's object type is "Pawn" that may be a good profile to overlap with on your sphere but ignore everything else.

plain cypress
#

The issue is since it's the same Blueprint for both NPCs, and as you can see on the picture, if two NPCs are close to each other, the Colliders (red) are overlapping, so it does not trigger the End Overlap event if you move from one to another

#

I'm not sure if its possible

dawn gazelle
#

right now what is happening is your collision setting is still detecting the sphere being overlapped. What I'm saying is if you change it so the sphere's don't overlap with eachother and instead only overlap with capsule, then it will work as you expect.

plain cypress
#

oh ok I see

dawn gazelle
#

It doesn't matter about being the same bluerpint, just that the colliders themselves are detecting one another.

plain cypress
#

I will try that thanks

tepid willow
#

Hello, does anyone know what's the difference between the two? When should I use one or another? I saw that the left is used in the construction script, and the second one on game time, but I don't know why

tepid willow
#

Are you talking about materials? Game mode is not replicated, so it doesn't make any sense to have a multicast or any code that has to run on a client in the first place

#

You have to move that multicast else where. Most likely it should be a RepNotify property, as you most likely want players that will join the game later to have the same scalar parameter on whatever you're changing it on

#

Clients cannot communicate with GM directly in any way

#

Also there's more in #multiplayer pins in case you want to read more

frosty heron
#

read the #multiplayer pins like suggested 12 times , practice, fail , repeat then ask question if stuck

#

for a start using Multicast here is already the INCORRECT step

#

you don't use multicast 95% of the time, it's a beginner trap.

Anything stateful shouldn't be in multicast

#

even saying is a node not replicated already indicate that you don't know basic replication

#

Same thing

#

Use Rep_notify

#

Multicast can be dropped and will not run on players outside relevancy

#

so people join your lobby and they go wtf, why is my color different with yours? since the function invoked by the multicast never RUN on their machine

#

and stop watching Youtube tutorial ESPECIALLY for multiplayer.
On top of being garbage, they always make the wrong move all together. Like using multicast when they shouldn't

#

Your lack of simple multiplayer concept is apparent

#

it is not fine

#

your only way to go forward is to read the pinned material

#

there's no other more helpful source sadly

#

In your actor blueprint you are likely don't have ownership, hence your RPC gets dropped.
Again MULTICAST is wrong here,
Again, read the pinned material regarding ownership

#

I already did, don't use multicast and use repnotify instead

#

Also read ownerships in the pinned material

#

nothing else I can do to help you

#

if you gonna fight the advice, then I don't know

#

you can try reading the compendium 12 times, that's not my advice but the common advice from #multiplayer

#

takes a while to sink in. It took me more than that actually

#

multiplayer is a beast, replication is only the tip of the ice berg

copper chasm
#

the system works fine, except for the stuff that doesn't

#

i want that on a tshirt

timid yoke
pulsar osprey
#

can confirm that basically every time i tried to use a multicast when starting out it was for the wrong thing

frosty heron
#

@somber torrent Freebie

Ideally, you only want to care about the collision that happend on server, but I am just giving example so you have the idea how to call as client too.

If Server -> Just change the Color variable, this will trigger on Rep that changes the material color
If Client -> Route to Controller (Because client doesn't own the cube, it needs to route to something it owns) -> Call Server Rpc
-> (Now we are running on the server), Run Change Color on the cube that get passed by client -> Set The color variable which trigger OnRep

zealous moth
frosty heron
#

this is just to address the initial issue where they are already placed together in editor

zealous moth
tepid willow
zealous moth
#

I think so but also they call this a tunnel node on the website. Does it show a tooltip?

#

Ah no I mistook it @tepid willow I was thinking latent but that's a clock.

#

I know the f is a function. Not sure what box means

tepid willow
#

It's usually used for auto generated nodes

#

You never can open them by double clicking it

zealous moth
#

@tepid willow according to ai that box or window icon means construction script

#

I would guess you can use one for construction but not the other

tepid willow
#

Doesn't look like something I would use in a construction script

lunar sleet
#

Well idk what the box icon means but the main diff between those previous 2 nodes is one had a class wildcard

#

First one doesn’t even give you the option so it probably just adds an empty one ig? What did the tooltips say

zealous moth
#

This is gonna drive me nuts...

undone bluff
#

Added a new AddComponentByClass node that allows a class to be selected or passed in. Unlike existing Add Component nodes, this node may be used any place functions can be called on an Actor, however, you cannot customize the component template beyond any properties that are exposed on spawn.

tepid willow
#

oooh, yeah, that's true, I forgot about that difference

#

So they can be used in the same context, but they have different use cases, right? If I know the exact class I want to spawn, it's better to use the first one since it allows to change all the properties with no code

undone bluff
#

pretty much, yea

#

if it's not a one off you might prefer making a subclass of uSkeletalMeshComponent, make the adjustments you need and then spawn the subclass instead with the generic node

tepid willow
#

It was just an example component, I was not going to add it like that

edgy current
#

Hello! Baby programmer here. I want to create a very simple puzzle game in 2.5d perspective but I can't figure out how to get a camera detached from a character. Every tutorial that I look up is focused on making a third or first person character but I want to split the 2, any help would be appreciated. thanks!

copper chasm
edgy current
copper chasm
#

Anyone have any tips for merging skeletal meshes on a modular character

neat stream
#

I don't know why I can't get this to work, can anyone offer some insight?
I'm trying to get buttons in a UMG widget to change the index of the widget switcher it's nested in.
Image 1 = main menu, nested in a widget switcher on the "WBP_StartSequence"
Image 2 = "Start Sequence" UMG Widget.

I want the buttons in the "main menu" widget to control the widget switcher in the start sequence widget.
I've tried casting and making hard refs in both, but neither seem to work. I've even tried it as an event. Still didn't work. Any ideas?

copper chasm
neat stream
#

I've also tried casting instead of creating the widget.

#

I've also tried it like this, in the start sequence.

copper chasm
#

One sec sorry

#

It looks like it should work? Can you get the buttons to fire a printstring?

neat stream
#

I'll try one sec

copper chasm
#

slap it in before the branch

neat stream
#

Nothin

copper chasm
#

so your button isn't being pressed

neat stream
#

Let me run some break points

copper chasm
#

make sure the widget is set to visible or whatever too

neat stream
#

The on click custom event isn't being fired. Even though it's bound to the button in the WBP MainMenu 01

#

If I try to call it in WBP Main menu I get an error.

#

It's set up like this in the WBP_Main_Menu_01 which is in the widget switcher.

copper chasm
#

set your widget switcher index as a variable maybe

neat stream
#

Is there a way to cast from one widget to another? It seems to be some sort of casting issue

copper chasm
#

uhhh, so i have my buttons

#

it passes an int to a event dispatcher

#

which then when fired, sets the widget index of the widget switcher on my widget

#

I mean, the "none" is implying it's not finding the thing you're pointing it at, which is a communication issue between the blueprints, tbh I'm not 100% sure WHAT it's missing

frosty heron
#

The start sequence ref is null, what ever type it is

spring echo
#

i dont even know what im looking at with this, and apparently something somewhere doesnt work. brain hurts

frosty heron
#

oof

spring echo
#

what a brother gotta do to make a progress bar that goes down when i dash

frosty heron
#

what progress bar, stamina?

spring echo
#

theres also this

#

thats the bar itself

#

and unreal really doesnt like that part

frosty heron
#

wdym

#

it's totally possible to make a bar that can go down over time

#

anything wrong would be the logic

spring echo
#

yea i do be kinda just winging it

frosty heron
#

Yeah, you never set the reference

#

trying to access null object

#

In your blueprint, you implement code that says, Change the Percent in Dash meter

#

but you never set the dash meter

#

so it's changing no dash meter in existance since you never point to one

spring echo
#

so waht just add a "set, dash meter, 100%"?

#

wait i might be stuipid but isnt aht what is already happening?

frosty heron
#

this variable is never set

#

hence the error

#

you might want to watch blueprint communication video to better understand object reference

#

This is what I mean by setting

#

now that As Char Bp is the player character that you passed which is the player's 0 character

spring echo
#

monkey brain tells me that this should work

#

nvm

frosty heron
spring echo
#

HAHA my monkey brain has solved the puzzle

#

but now i can still dash even with no stam, but that is progress.

#

i got it to fully work, huge.

iron idol
#

do you need to upgrade UE5 to the latest version to get the fab plugin?

maiden wadi
iron idol
maiden wadi
# iron idol 5.4.4

Check out your Epic Launcher / Unreal Engine/ Library. You should have a Fab UE Plugin there. Pick Install To Engine, pick 5.4.

iron idol
maiden wadi
iron idol
#

yea i just found it. I appreciate the help. thank you!

maiden wadi
#

Once you install it you can access it here.

tiny tundra
#

If I have a component variable, how can I get the actor(or gameobject, whatever) that it's attached to?

orchid raven
#

Morning everyone! This is the default camera input that comes with UE5's FPS template. I was wondering if it's possible to unlock the pitch, that is limiting the up/down 90 degrees look? Or do I have to create my own custom camera input system?

grave crow
#

it is limited elsewhere not here, controller rotation input just adds to rotation raw values

orchid raven
#

@grave crow thanks! any ideas where I can tweak the limiting values?

undone bluff
orchid raven
undone bluff
#

that's gimbal lock

#

gotta use quaternions for rotation if you want full rotation freedom

orchid raven
#

sounds complicated lol, can you recommend a tutorial to follow?

undone bluff
#

oh yea blueprint channel

#

but quaternions are not exposed to BP

#

wait I just looked at it and it's not even using quat

maiden wadi
#

You can make an easy enough function yourself if you're setting rotation directly. It's as simple as inverting Roll and Yaw if pitch goes above 90 or below -90.

undone bluff
#

okay I think I figured it out, add local rotation uses quats internally

#

so just use that instead of control rotation

grave crow
#

all default rotation operation internally converted to quats

obtuse oriole
#

how do I offset a transform with another? The "Grabbed Object WTrans Offset" is a relative transform to the Pivot World Transform so I want to get the world location and rotation of the offset

maiden wadi
obtuse oriole
#

I see

frosty heron
#

Authaer, are you familiar with back-end?

little prism
#

Hi All,

I am trying to simulate an orbital movement. I've plotted all formulas (G constant is value of 1 in my example to boost the values).
I have a mass of my "sun" of 33200 and planet 100.
Gravity force kinda works (M*m/r2) but planet velocity is too small (sqrt(M/r) ) and planet is eaten by sun anyway...

#

did anyone make some simple examples and can point me in the directions?

#

thankjs

#

I am using "Add force" to make planet move

fiery crescent
#

I'd like to add a cooldown bar in the HUD to show when the dash ability is available again. I'm currently a bit stuck since I've only just started with Unreal.
I wanted to check if the player dashes, if so, set the value to 100 and the percentage, otherwise 0.
Could anyone help me out?

maiden wadi
frosty heron
#

Database yeah, my struggle is knowing what kind of service I can use to track if the user is "connected"

#

from my mind, I am thingking websocket, but trying to find other alternative since I am totally new to the field

#

I used AWS, for the login system, which generate credential with JWT token, but then I relaised, multiple person can just "log in"
and now they will overwrite each other's save file to the dynamoDB

#

oh well, I am looking at a chat app tutorial atm, trying to see what I can steal for the connection part, but I think they use websocket.

maiden wadi
#

I'm only surface familiar with them. Kaos handles most implementations like that for us.

frosty heron
#

👀 Oh you guys work together, that sounds nice.

#

thanks anyway, I think I will end up using websocket anyway.

#

just praying the bill didn't go up astronomically.

#

reading chats from AWS discord is kinda scary, people get unexpected bills

maiden wadi
#

Yeah, seen a few complaints about that floating around. We don't have anything that scales to a degree that we can't just use our own hosted server in the office, yet.

near wolf
#

Hi guys. I'm trying to spawn an actor from widget using the mouse to drag and drop. It works, but the actor spawns at the world origin and not at the mouse position. What am I doing wrong?

frosty heron
#

you should break the transform too...

#

and only plug the location

#

A Transform contain location, rotation and scale

maiden wadi
near wolf
frosty heron
#

start with the debug, make sure it impact the right location, then move on with the spawning

#

I don't know much but it's strange to me why you multiply the direction by 2000, what's the actual math behind it?

#

do you even need the trace at all? Shouldn't deproject mouse to world gives you the location already?

near wolf
#

The tracing seems fine. It draws a red line to mouse location

#

but the actor spawns at origin

#

ok I think I found the problem

#

the 2000 distance was too small. I increased it to 200 000 and now it does spawn at mouse location

frosty heron
#

I see, it's getting the direction vector then multiplied by distance

near wolf
#

One more question. How can I get the scale of the spawned actor, and then multiply that scale with the scale of the Niagara System.
So for example, if a new actor is 2x bigger, the spawned niagara system will also be 2x bigger

frosty heron
#

I know nothing about niagara but if you want to get the actor scale, you can drag from the return value of the spawn node and type get scale

spice sequoia
#

I wondered what is the best way to achieve this - I have a lot of static meshes in a BP and I want to be able to pick a handful at random and trigger the same animated transform on them - for example, rotate 75 degrees using a timeline over a few seconds. All at different/varying times. Of course a function or macro would be great for this containing the animation timeline and pass the mesh to it, apart from you can't run a timeline within a function. Is there another way without having to create a timeline for every possible simulataneous animation that might occur?

cold shore
#

Hi, I can't figure out why after adjusting font size on my text block in widget the size resets to 0. Please see the blueprint - the size passed is 48 and I'm sure, I observed this using those two debug variables visible. Am I missing something? I'm about to go crazy... Other text properties (like font family) remain intact and are the same on both variables

cold shore
thorn tapir
#

I just learned UE doesn't support composition which is one of the basics of OOP, which is honestly mind-boggling to me

maiden wadi
# spice sequoia I wondered what is the best way to achieve this - I have a lot of static meshes ...

In general I would say a simple ticked function, and an array of structs.

Make a struct with a few variables like the Mesh pointer, StartTransform, EndTransform, MovementDuration, StartingTime.

Make an array of said struct on your actor.

Make a function that takes in this struct and iterates over the array to remove any structs with the same mesh pointer before adding the new struct.

On tick just iterate the structs backwards and move all of the meshes using a simple Lerp. Remove any entries that are past their move time and set them to the end location.

thorn tapir
#

I can't create a scene component which has subcomponents and instead I have to copy paste singular components inside an actor bp

maiden wadi
thorn tapir
# maiden wadi Components can use UObject as subobjects. Components are managed by actors, not ...

Consider a vehicle with headlights, a headlight is a static mesh with an attached spotlight.

Instead of essentially copy-pasting components with only difference between them being the socket from the parent mesh to which the headlight is attached, I tried creating a HeadlightComponent which would be a static mesh with a spotlight, but SceneComponent doesn't have a hierarchy and can't have subcomponents.

So I can create a HeadlightActor which does have a hierarchy and I can put static mesh and spotlight inside it (along with logic to handle turning the light on and off), but to then put it inside the vehicle actor, I have to use ChildActorComponent, which loses information on the type of the Actor being referenced and I have to use Cast to call a function on that HeadlightActor, which isn't an elegant way to do this.

proud bridge
#

hey all how can i play a music that runs on async thread? also how can I control it once i have played it. I initially though of playing it from GameInstance but it seems not to work on level change

maiden wadi
# thorn tapir Consider a vehicle with headlights, a headlight is a static mesh with an attache...

It would be nice to have bundled components like that. I personally do things like this with a data oriented approach. I have an ActorComponent that is a customizer. I feed it a data asset that has a hierarchy of components with tags and data and the customizer creates all of the components for it's owning actor. So in my case for a car I would first specify the main car mesh. Then under that I'd have entries for the meshes which would attach to sockets on the main mesh, then under the mesh entries they would have the spotlights.

But yeah it would be much nicer to have a bundled component that would make it easier at designer time.

regal fulcrum
#

Is it possible to make a character where other characters can walk in them? To avoid needing to handroll my own movement component, I was thinking of making a "Spaceship" character.

#

But when trying that, it seems I can never have other characters walk in the ship. They just bounce around, even when setting the "Character can step on" to yes.

#

Making the spaceship a pawn makes the problem go away

viscid python
#

I have a mount which moves with WASD and a hero that can only look around. The hero is controlled with my controller and sits on top of the mount. I would like to leave the hero controlled by the player but move the mount at the same time. I already set Autoreceive Input to Player0 but the mount does not register any input. I also tried the "Enable Input" node in the Begin Play of the mount, but to no avail. Any idea how to move the mount/register input at the same time?

thorn tapir
regal fulcrum
#

I couldn't stand Unity. I'm sure it has its merits, but I am a professional software developer, having programmed in C# since .NET 1.1, and I couldn't stand it.

#

I'd rather struggle with unreal's C++ / weirdness than mess with Unity, and programming in C# is my daytime job lol.

maiden wadi
#

I haven't used anything except Unreal. But there are a lot of Unity people in here lately. More than normal.

regal fulcrum
#

Probably a lot more due to the hype of recent releases and the fact that unity screwed over so many developers less than a year ago

#

Or tried to screw them over real bad. It backfired to the point of them appointing a new CEO and walking back the changes.

#

Authear, you have been around a long time, do you know the answer to my question? I have limited time during weekends and was hoping to avoid rolling my own basic CMC.

#

Is there a way to make a spaceship character and allow other characters to walk inside of the mesh or is that impossible to do with the engine?

maiden wadi
#

I haven't made anything like that myself. But I would say it's possible simply from playing ARK:SE. They do it with things like platform saddles and whatnot. Unsure what it would take though.

regal fulcrum
#

Fair enough. Well I guess worst case all I need the spaceship to do is lift up in the air while leaving the level and land when loading into the level. That probably wouldn't be too hateful to implement.

#

It won't be player controlled

thorn tapir
regal fulcrum
#

Each engine has their strongpoints

maiden wadi
#

Unreal has started to take a really heavy data oriented design approach in the last few years. ECS has also become pretty prominent with things like Mass.

#

One thing about Unreal is that it's more often used by larger studios. In game customization is usually a large factor with a lot of things, and that means designer stuff tends to be left to things like static map design. A vehicle or character that can change skins and the like don't tend to be created by hand in editor, so the tools to do so tend to not encourage it.

regal fulcrum
#

That makes sense

thorn tapir
#

I hope they'll start addressing the needs of indie developers, with Unity being what it is there's a niche that can be filled

thin panther
#

They probably won't.
Most of us indie's don't earn the engine any money. There's little incentive for them to do things for us. The engine gets what it needs for fortnite, and what AAA can use

regal fulcrum
#

I feel like the biggest void is for intermediate developers

thin panther
#

For them to make money off us, we need to be pulling in over $1m per title, which just isn't happening except for an incredibly small amount of us

#

Even indie's that can live off their work don't tend to make that much :P

modest gulch
#

is there any way to ensure BeginPlay of level blueprint is called before any other BeginPlay? (I would be fine with BeginPlay of gameinstance and similar special classes run before, it is about normal actors in level)

regal fulcrum
#

I wouldn't think so

#

You'd be better off firing off an event and having the necessary components / actors listen for that event and then run their logic.

thin panther
#

The need to ensure this initialization order tells me you may not be using it well

modest gulch
# thin panther No, but what are you using the level blueprint for?

My situation is this: I have certain param on GameInstance informing if we are in main menu or in game level itself. I set it both in UI (before I change level from main menu to some game level and vice versa) and in BeginPlay of all levels. By default its value is MainMenu.
It works fine in actual game, but if I run PIE or similar, I get MainMenu when level starts (to be specific, in character's animation blueprint, EventBlueprintInitializeAnimation) in level that is gameplay, presumably because level blueprint's BeginPlay was not called yet.
It impacts game, since I have character model in main menu (for character creation preview) and it has different idle animation than in actual gameplay.

It is not big issue. But I would really, really like to have exactly same state of game when running in UE editor as in actual packaged game.

thin panther
#

Why not just use a different character for the different levels?
Have a specific pawn for the main menu and one for the game level

modest gulch
#

I would like to avoid that, as it increases amount of assets. Maybe I will do that, if initializing vars is impossible in level blueprint (there is no construction script for level blueprint or C++ class for levels to inherit for some forsaken reason)...

#

hmm maybe it is enough to set different animation blueprint

open furnace
#

wtf is this

#

length of 0 items is 9?

#

is not empty also not working

surreal steppe
#

Am I really supposed to do it like this? Why cant I just have a SceneComponent and attach a box to it and handle it from there and fire events like any other component?

dusky meadow
#

Hi im trying to make a view sway but i have three issues one sometimes it flickers when swaying two the right sway is quicker than the left despite them being the same and three i cant figure out how to change the time of the timeline so i can make it shorter or longer

shrewd sorrel
#

hey there idk what to hook up to the object node i am casting from one widget to another widget to set text based on a input from a editable text box in another widget

obtuse mulch
shrewd sorrel
#

i created a variable with the reference in it but it wont let me get that refernece

obtuse mulch
#

wp_namecompany spawns this widget?

shrewd sorrel
#

that is the widget

obtuse mulch
#

what is wp_namecpmany?

shrewd sorrel
#

the widget im casting too

obtuse mulch
#

so they both widgets

shrewd sorrel
#

yeah

#

im gonna be setting something in one widget which transfers across all scenes ui

#

i just promoted the cast to to a varible and that seems to do somethinbg

obtuse mulch
#

the widget that is casting to wp namecompany needs to know what widget that is

#

so you need to pass the reference

#

example of how you do it

#

WP_namecompany must spawn this widget

#

and in it you create an exposed on spawn variable

shrewd sorrel
#

im using different scenes does that change how i set it up

obtuse mulch
#

what do you mean scenes

shrewd sorrel
#

basically you set the company name in one level and then press play it puts it to the game level

#

where the text will be set based on what was set in the previous level

#

should i just combine the levels instead

obtuse mulch
#

widget can persist through all levels

dark drum
obtuse mulch
#

oh

#

i was only useing level streaming

shrewd sorrel
#

should i just do it on one scene isntead of two then

dark drum
shrewd sorrel
#

mine has to be on a widget as its the only way u can do a editable text box to set up names

obtuse mulch
dark drum
# shrewd sorrel basically you set the company name in one level and then press play it puts it t...

When you set the company name, you should update it somewhere else. An easy place would be the game instance but personally, I would save it to disc using save game objects instead.

Then when you transition to another level, the widget would load the data and display it.

Adding to this, you could store it on the game mode and have the game mode handle saving and loading the data. The game mode is pretty easy to get from most places.

dark drum
dark drum
dusky meadow
dark drum
dusky meadow
#

the numbers were the wrong way round but it still does the same thing

dark drum
# dusky meadow

Ok, so change the curve to start from 0.5, goes up to 1, then down to 0 and then backup to 0.5

Edit: Actually, one minute.

dusky meadow
#

essentially I'm taking the value of 0 to 1 from the timeline then times that by either 10 so the maximum is 10 degrees or if the value is on the other side of the curve by -10 so the maximum is -10 so the angle returns to 0

dark drum
dusky meadow
#

is the tilt right checking if it is on the second half of the curve

dark drum
dusky meadow
dark drum
dusky meadow
regal fulcrum
#

I don't understand

#

Here is the mesh. I can see it. everyone can see it.

#

Here it is in the level

#

No one can see it

#

Wth

#

I even deleted the actor and re-created it

obtuse mulch
#

inside out uvs?

sturdy thistle
#

@regal fulcrum Did you by chance toggle it to Hidden in Game? 😃

obtuse mulch
#

idk lol

#

does it show up when you fly inside it

regal fulcrum
#

Nope, I didn't check hidden

#

and I deleted the BP entirely and re-created it

#

I swapped it out with a box model I created with the modeling tools in-editor

#

still, the same result

obtuse mulch
#

you can see it at any point when you fly around in editor?

regal fulcrum
#

If I create a new static mesh component and move it to be a child of the ItemOverlapBox, then I can see that static mehs

#

*mesh

#

and no, I can't see it anywhere

#

If I move it to be a child of the original static mesh

#

Then we are back to not being able to see it

obtuse mulch
#

its a child of some actor?

regal fulcrum
#

Nope. I edited the C++. I am now making the static mesh (original) a child of the box component. I'll see if that makes any difference.

#

For whatever reason, that fixed it

severe tendon
#

How could I instatiate a Projectile from an enemy and give it a direction?

#

As if the enemy was shooting me

obtuse mulch
#

basically just spawn a projectile actor from enemy bp that has your characters location

#

hardest thing is to pass the location to the projectile

#

but it isnt too hard

dark drum
dusky meadow
#

how do i do that ?

obtuse mulch
dusky meadow
#

that fixes the filcking issue howver it means it never stop moving

obtuse mulch
#

make a custom event that stops it

dusky meadow
#

but the releasing of the key already should stop it

obtuse mulch
#

looping timeline only stops when you force it

dusky meadow
#

how do i make a custom event that stops it ?

obtuse mulch
#

call it when you want

#

then start it again with another custom even when you need

#

idk i wasnt following your problem

regal fulcrum
#

That might also help

thin umbra
dusky meadow
#

ive done that but now it just stops the camera at a bad angle and then starts awkwardly

obtuse mulch
#

reset the angle to 0 when you stop?

#

and start from start when you start

#

like reset here

#

i dont rly know what are you trying to do cus i wasnt following but theres not alot more you can do with the timeline 😄

regal fulcrum
#

What is the highest component you can attach to an actor and move it / position it within an actor? Would it be PrimitiveComponent?

#

nvm, it's USceneComponent

grave crow
#

it is the RootComponent

stray lark
#

Is it unreasonable to do ~100 lines traces per tick? It seems to cost me ~20ms in the editor, which seems like a lot for just one gameplay feature.

obtuse mulch
#

how about sphere trace

lunar sleet
#

Are you profiling in standalone ?

stray lark
lunar sleet
obtuse mulch
#

well 100 lines traces per tick

#

🤔

thin panther
#

should honestly be easily done. Again, debug visualisation will kill you though

stray lark
#

Yeah looks like it's about the same in standalone, with or without the debug lines. I think the cost is to CPU whereas debug line drawing is GPU, right?

lunar sleet
#

Should be yeah. Are you certain it’s the actual line traces causing the 20ms drop?

stray lark
#

It is something in this loop, I'm assuming it's the line trace:

obtuse mulch
#

add unique first of all

#

if its on tick like you said

#

altho idk its a vector

thin panther
#

yeah make sure you're actually clearing those arrays at some point

#

also on tick, print the size

stray lark
#

It's cleared just one block to the left of the screenshot

#

I swapped to add unique, no difference

obtuse mulch
#

just unplug trace entirely to check if its rly whats causing ms drop

stray lark
#

It is. When this loop is disconnected, I get 120fps

#

Also, I did have a timer thing measuring this loop

lunar sleet
#

Time to remake it in cpp ? 😀

stray lark
#

I am considering that, but I'm wondering if it's the physics that's taking a while or what

thin panther
#

It's probably the number of nodes honestly

#

It's a lot to execute on tick so often

#

On it's own it wouldn't be awful, but x100 it's a lot

obtuse mulch
#

sphere trace might be better but its harder to implement

tiny tundra
#

I want to get the Actor that this component is attached to, so that I can affect it's transforms. I cannot use getAttachParent or something like that..

thin panther
#

there is no actor that is attached to

thin panther
#

It's a class reference, it's just taking class default information

#

It's not actually a scene component in the world

lunar sleet
#

And what Cuppa said

tiny tundra
#

right. I cannot use getParent either

lunar sleet
#

You found leaf in the dictionary and you’re trying to ask which tree does it belong to

#

It is not an instance

#

Get an instance of it

tiny tundra
#

Sorry. I am coming at this from a Unity way of thinking

lunar sleet
#

You need a ref to the actual component

stray lark
obtuse mulch
#

once i needed a semi- homing projectile so i made it by attaching a sphere trace to a forward going projectile so the further it went the more area the sphere trace covered, like just by making the sphere bigger every tick

lunar sleet
#

But also I believe people make “cone” traces using multi-sphere traces

tiny tundra
#

Ok so here is what I am trying to do. I have this SceneCapture2D_ISO element in my scene. I want to be able to affect the transform of the object itself, and I want to be able to also change it's Field of View value. What is the best way to refer to these in a Blueprint?

dark drum
kind willow
#

I'm having an issue with my project after compiling. Levels load in "chunks" which will cause actors to pop in sequentially after a level is opened. This causes issue with my saving system as the save will try to load actor data before the actors are loaded, making it effectively useless.
I already tried using async load assets and load stream level both at the start of the game and right before opening the level, but it din't change anything about the load times.
Here's a comparison between in-editor loading and compiled loading times

storm obsidian
#

hi have a question
if i'll add array with MIDs (Material Instance Dynamic) into Set Texture Parameter Value or any other Set for MID it will be applied for every MID in array or only for first?

lunar sleet
thin umbra
rugged bison
#

i'm working on my character's animation blueprint but got myself stuck on landing animation after jump. i want to block character movement while the landing animation is being played, so i hooked up functions for the landing state (onstate entry and onstate exit) but sadly it turns out i can't do it this way because function calls inside those need to be thread safe. is there any other clean way to do this?

storm obsidian
#

thanks

orchid raven
#

anyone free to jump in channel and share screen real quick, help setup an unclamped pitch camera? :>

atomic walrus
#

Having a little struggle getting some characters to spawn and then move around. When I place them in the world in the editor and start things up they move around just fine but when I spawn them at runtime they just stand there (or hover there). Any ideas would be very appreciated.

rugged bison
#

or rather true because you check for false*, check your defaults in the organism blueprint anyway 😄

atomic walrus
#

The weird thing is the characters don't fall to the ground plane the way I would expect like its not just the move to that isn't working they aren't simulating

rugged bison
#

you could expose on spawn this variable to be able to set it during spawn

atomic walrus
#

just in case

rugged bison
#

hmm, you are picking them up and placing down, why spawning new one?

atomic walrus
#

I want the functionality of the player spawning and removing the pigs during runtime. The ones running around the level were just to test

rugged bison
#

so it's not just picking them up and placing down?

atomic walrus
#

heres the difference between spawned pig and a pig placed before runtime

lunar sleet
#

Falling requires simulate physics being checked, is it checked for both?

rugged bison
lunar sleet
#

As for what seems like a possession issue, you need to go to the details and make sure AI Controller is set to both Spawned and Placed in World

atomic walrus
atomic walrus
hearty rain
#

Hi there UE Guru's, do you know if it is possible to force the loading of texture mipmap, like with a flush for the level streaming, so that I can have a slightly longer loading screen but with fully ready textures ?

#

something that I can change at runtime

hearty rain
#

hmmm I'd rather avoid having to load every asset individually, any way to do some "force loading all at once" ?

#

I dont mind if it blocks

hearty rain
#

I guess I will sooner or later have to plunge deep into cpp programming 😄

lunar sleet
#

This is the way

hearty rain
#

It is definitely in my pipeline for the next game, the one I am working on right now is already way too advanced to move to cpp

lunar sleet
regal fulcrum
#

I would say most things you can convert to C++ no matter how far along you are.

#

Now whether you would gain much from it based upon your experience / functionality, that would be a whole other thing

hearty rain
#

honestly, it's a game that does not feature complex mechanics that would benefits from conversion to c++ performance wise

#

and I have joined the ship after 5 years of dev, and the original dev is a graphic artist so the code is basically a spaghetti fest that I am combing

lunar sleet
#

this isn't about performance necessarily, but rather things that you can't do in bp

#

you asked, we answered. you don't have to follow the advice

#

I have very little cpp in my game rn, just what I couldn't do in bp. Like exposing gameplay tags, or pausing on tab out, etc

#

each of these those took very little time and effort to implement, despite being a year into this project

hearty rain
#

ok thanks for your feedback, I'll check about this for texture streaming purposes

#

I didn't mean to sound like I wasn't paying attention to what you were saying by the way, sorry if it felt this way

rugged bison
lunar sleet
hearty rain
#

Good luck, I've been fiddling with Async Loading Screen plugin. I actually have worked with c++ a lot in my job but within the context of UE it requires to adapt and I'm just not into it now haha

zenith jungle
#

hi guys i want to reuse CancelDialog delegate in other places as well, how can i reuse it without having all these red lines across my event graph?

frosty heron
hearty rain
#

Create the CancelDialog as an individual event, that gets called by the custom events attached to the delegate

#

a bit gross but should work just fine

frosty heron
#

You will have to create a matching event signature

zenith jungle
#

ah i see, thanks guys!!

frosty heron
lunar sleet
hearty rain
#

good idea but I'm still on 4.27 for the current project, will definitely look into Lyra for the next one, gameplay tags and all

lunar sleet
frosty heron
#

But yea, kinda have to go through some detours just to get the function that I want

#

Lyra is overenginered according to lots of people. Their advice normally is to just take what you need.

zenith jungle
#

@frosty heron @hearty rain i might have found a better way to do it, you can give an event dispatcher and make the logic into a function and feed it to the delegate:

hearty rain
#

I found some of their solutions to be a bit overkill indeed, like the "root yaw offset" stuff

#

Interesting, looks very clean this way

zenith jungle
frosty heron
lunar sleet
#

@frosty heron how do I debug Standalone, I'm losing my mind here with these magical issues only appearing outside of PIE

frosty heron
#

Tbf I don't know how people attach debugger to instances too

hearty rain
#

what's your issues ?

frosty heron
#

Ask around in cpp, they should know.

lunar sleet
#

I've read you can use -game -debug in the command line but didn't seem to do much

thin panther
frosty heron
#

Cuppa to the rescue

thin panther
#

Otherwise you should be able to launch one of the game configs

frosty heron
lunar sleet
# hearty rain what's your issues ?

well for one, a SKM refuses to show up. Also, a weird camera panning issue that causes it to slow down for no reason until restarting the level or tabbing out and back in

lunar sleet
thin panther
lunar sleet
thin panther
# lunar sleet PDBs?

Program Debug Database. Maps an address in the executing program to code from the source.

lunar sleet
#

or troubleshoot missing SKMs

thin panther
#

Debugging standlone consists of CPP breakpoints and Unreal Insights pretty much

#

You won't be able to properly debug a BP graph

lunar sleet
#

fun times

thin panther
#

Not as far as I know, at least

lunar sleet
#

any way to debug a missing SKM? or just scour the output log hoping I missed some needle?

frosty heron
#

I don't suppose you can see callstacks either in bp

#

Quiet important imo when debugging

frosty heron
lunar sleet
#

Perfectly fine in PIE

frosty heron
#

Ohhhh

#

I heard of this

lunar sleet
#

and I know the bp is there because I have code that prints the instance

frosty heron
#

But not sure what exactly happend sorry I never debug in standalone

#

Have you tried packaging tho?

lunar sleet
#

yeah, they're identical

frosty heron
#

So in package the skm is missing?

lunar sleet
#

tried running packed game with -game -debug but idk what that's supposed to do

frosty heron
#

Maybe something to do with cooking?

lunar sleet
# frosty heron So in package the skm is missing?

far as I can tell, I'll do it again and go through the log line by line. I get warnings for missing stuff each time but it's common styles and whatnot - old refs which I can't remove for some reason even with update redirectors

#

there's also a weird lighting issue. New layer of problems that only exist after cooking. Who'd have thought you unlock a new level of difficulty lol

mild jacinth
#

after i moved the folder to another location in unreal engine i am unable to "fix up" redirectors as the option doesnt exist

#

the redirector files exist and the "find target" but no "fix"...

lunar sleet
mild jacinth
#

i tried once the red button and it would corrupt lots of files

lunar sleet
#

Hit the red button

mild jacinth
#

you sure?

lunar sleet
mild jacinth
#

it was a long time ago but

#

i have yeah

#

actually

#

im on plastic scm

lunar sleet
mild jacinth
#

i moved the folders to another folder and havent pushed yet

#

should i?

lunar sleet
#

I’m saying worst case scenario you revert from source control

#

But I haven’t had any issues using UpdateRedirectors

#

The only time you need to worry is when it says referencing assets

mild jacinth
#

I wish they kept the old approach that 4.27.2 had

#

fixing up redirs was a lot better back then.

lunar sleet
#

Long as you don’t force delete when assets are referenced it’s fine

#

But even then with the new one it’s ok

solid needle
#

this is inside the player controller

lunar sleet
solid needle
#

my bad, wasnt sure if it belonged in this channel

narrow sentinel
#

Anyone know if this is right

#

the current speed is in MPH and I obvs need to convert this down to CM/s to feed into the spline movement code

#

I've altered it do this as doing the first screenshot resulted in a mph of 45 was about 0.6 which obvs isn't right

#

doing whats in second screenshot though I find it's still doesn't seem to move right as I get a really big value

pulsar osprey
#

if you're changing position, you need to add your calculated value to your old distance

prisma iron
#

i have a function to grab an object and now i want to that i can move the grabbed object back and forth with mousewheel up and down, can someone help me with that?

narrow sentinel
#

thats the full code I'm doing

narrow sentinel
#

Reason I get the speed as well is cause it could change and obvs i need that to be in the movement spline stuff

prisma iron
narrow sentinel
#

not without implementing it myself and at moment I'm tackling something I need to get out the way as been on it for like multiple days

#

sorry

prisma iron
#

i see

narrow sentinel
#

maybe tommorow I can throw something together 🙂

narrow sentinel
pulsar osprey
#

i see you calculate the distance, and the next point which which seems to check

narrow sentinel
#

so i use a timer to loop call the function that does the stuff

#

and it loop by delta seconds

pulsar osprey
#

right, but you're never actually changing the position of the actor in this script

#

unless theres more?

narrow sentinel
#

i also altered this as I remeber someone saying within another channel to divide the CM/s by delta time to get it down to CM

#

I do it there

#

I have a function that grabs the new location from the spline based on the distance along spline value

pulsar osprey
#

dividing is wrong i think

pulsar osprey
#

CM/s * s would give you CM

narrow sentinel
#

however that didn't have right results the actor shot through the spline super quick

pulsar osprey
#

whats your MPH?

narrow sentinel
#

45.0 for example

pulsar osprey
#

how long is the spline?

narrow sentinel
#

I'm doing it where thats not relevant

#

it's more based on speed

pulsar osprey
#

it might make total sense for it to be that fast. you're travelling at over 2000 cm per second

#

if you set your speed to something slower, like 1 MPH, does it look normal?

fervent zenith
#

How can i remove the dof effetc from my character

narrow sentinel
#

with speed being at 1

#

seems reasonable but also bit jerky movement which I wouldn't expect tbf if something else is going on

pulsar osprey
#

could be caused by variable tickrate

narrow sentinel
#

so it seems the issue might be when the speed of the vehicle is sufficent enough and a tick may be skipped over it ends up jumped along the spline

pulsar osprey
#

also, why use a timer?

narrow sentinel
pulsar osprey
#

any reason to do that?

narrow sentinel
#

also without using the tick event, apart from not calling the code unless I need to I don't think so

pulsar osprey
#

ticking the max once part per frame box in the timer might fix it?

#

using tick for things that should be in tick is fine

narrow sentinel
pulsar osprey
#

sure. also, i'm curious if setting max once per frame would fix it

pulsar osprey
narrow sentinel
narrow sentinel
#

don't even know how i'd solve that tbf

pulsar osprey
#

did you put it in tick?

narrow sentinel
#

yeah so on tick I think it may run smoother slightly

#

I'm gonna work on it bit more tommorow but tbf It's decent for now where I can work on it some more

#

Gonna go to bed I thinks, thank you for the help not sure what we changed to have it not stupidly speed off haha

pulsar osprey
#

changed from divide to multiply made the math right.
lowering the speed from something really high made it look normal
moving to tick made the deltaTime accurate

narrow sentinel
narrow sentinel
narrow sentinel
lunar sleet
frosty heron
lunar sleet
#

now to figure out the missing SKM and the lighting issue 😅

#

I wonder why this is suddenly named CharacterMesh0 in 5.4, I feel like it didn't have that 0 before. Noticed it in other people's screenshots too

dark drum
# lunar sleet <@1050954229902213150> how do I debug Standalone, I'm losing my mind here with t...

I know the feeling. For a project I was working on, we had an issue where NPC's would just randomly be destroyed. I never found the actual cause. The only way I knew they were being destroyed was because of logs.

I figured they must be clipping through the floor (not sure why) and falling passed the Z kill limit.

I ended up creating a special box that I move NPC's too when not needed and if they fall through, there was a trigger box that caught them and moved them back up. The issues never happened again.

lunar sleet
#

TBD but an async load before spawning should cover it (though that comes with its own set of ramifications)

dark drum
lunar sleet
#

well async load doesn't seem to fix it. I'm gonna have to test for bp corruption 😬

hidden fossil
#

With respect to both keyboard and gamepad input, I was wondering if there's anything that's quick and dirty for implementing a cursor tick (read: selection sound effect when navigating the menu system). This is with respect to a widget blueprint, in case it helps.

#

also, I want to disable the mouse inputs since I'm thinking multiplatform for this.

olive yarrow
#

How do you all handle weapons in an FPS? currently i've my main hud which holds all the data about health ammo and magazines, then a base player unarmed. I've fiddled with the idea of every gun being it's own character but i don't quiet like that. I tried making guns Pawns instead and placing them in the primary player blueprint but i can't really interact with it :/

I'm tryna NOT use pre made examples to learn but ya bois head is stuc

thin panther
# olive yarrow How do you all handle weapons in an FPS? currently i've my main hud which holds ...

Why would you make a gun a pawn?

Break down what you want. For example, you want a gun, which is an object held by a character, not something you could possess and manipulate. That makes not a character or a pawn. It needs to be in the world which leads you with two options. An actor or a child actor component on the player.

Unfortunately the latter is broken as hell. So it's going to be the former. As for making it so a player can equip it, fortunately your player has components which you can attach actors to.

If your character has a skeletal mesh, you can even attach it to a specific bone on that component.

The only issue remains is interaction, which is a problem as an actor as it doesn't receive input. But let's go back to the requirements for a second. A gun is something controlled by a player character, not the player character itself, so we could handle the input in the player character, or it's controller, and use that to do certain things with the gun, like on mouse press, call a shoot function on the equipped gun. (Think, I move my finger back on the trigger causing the gun to shoot, rather than it shooting by itself)

olive yarrow
#

(also thanks for help)

thin panther
#

By throw it in the player BP, do you mean by way of the ChildActorComponent? That is the method I described as being broken as hell. It's really sad because it sounds so useful.

The way I'd approach it is this. You have your pickup actor. Once interacted with, the player spawns the actual test gun actor. It then uses the AttachActor node to attach it to your players skeletal mesh, probably on a hand bone. Once this is attached it then sets an EquippedWeapon variable to the reference of the spawned gun.

Then when you fire of your click event, grab the reference to the gun, and call shoot on it. If you use a base class for your weapons, and make the EquippedWeapon variable of that type, you won't need to cast or message an interface or anything like that

olive yarrow
thin panther
#

Interfaces are mainly useful on implementing functionality across unrelated actors, think interacting with chests, people, guns, etc. That's the only common behaviour they share, so an interface makes sense.

When things are closely linked, or apply only to one thing, inheritance is often preferred. Only weapons are going to shoot and reload, and such, so a common base class that has a shoot event, which other weapon classes can subclass and override makes more sense. If you've got some game where tons of things could shoot. Like you could pick up a gun and shoot bullets, or grab a window out of a house and shoot glass panes at people, then an interface would make more sense.

thorny kestrel
thin panther
#

with the reference

#

you have a reference to the gun actor by spawning and attaching it

#

you just call functions on the reference

thorny kestrel
#

but you need to cast it first right?
otherwise you will not get the shoot event

thin panther
#

no

#

It's already of the correct type

thorny kestrel
#

oh you make the variable the parent actor of the gun,

#

okey I got you

thin panther
#

EquippedWeapon is only ever going to be of the base type of the weapon.
You can just call the stuff on it

#

It's worth noting though, an interface is not a cast replacement, nor is it more performant, nor is a cast expensive, if you've heard any of those myths

maiden wadi
#

Generally speaking, if you're following tutorials or reading blogs and they use the words "always avoid casting", "Casting is slow", or "Casting is bad and you should use interfaces." Close that shit and find something better, because whoever said/wrote that does not understand what they are even trying to talk about.

thin panther
#

Interfaces are for applying logic to otherwise unrelated things.

Perhaps you want to see what faction an item or an enemy belongs to. They share no similarity other than that data, so it doesn't make sense to use a base class. Instead you could use an interface to take any object, and retrieve the faction information from it. The "cost" of a cast is from the hard reference it makes. This can be bad if you're casting to a class with tons of assets, it's gonna load a copy into memory for the duration of the play session. That cost can be mitigated with code only base classes, or accepted with sufficiently small games.

Casting is for behaviour with a well defined hierarchy, My food items are only ever going to do food things. I can cast to my base class and use the functionality. Nothing else is going to do food things so an interface is meaningless.

You can even hit the "casting cost" with an interface. If you use your interface to return a reference of the proper type. E.g. you use an interface to take an actor and return a "Weapon_Pistol" reference, you've hit the casting cost accidentally by way of that hard reference to a class with assets.

Remember: casting is just a type check. You're asking if this generic reference is a more specific type. E.g. is this piece of furniture a chair? If so I want to sit on it

olive yarrow
#

Thank you!!

thin panther
#

No worries!

thorny kestrel
thin panther
# thorny kestrel so if you cast to the gun to shoot, is it fine to cast over and over when pressi...

absolutely, but in this case it isn't necessary, as we just store a reference to the base class directly.
And no, if the gun is destroyed the reference gets invalidated. Which is a good point, you normally want to check validity (A cast node does this for you if you're casting each time).

The "Loading" I talk about refers to the class default object. Every class has a default object so that you can instantiate new ones and clones and whatnot. This does not strictly apply to blueprints, because that's where assets are handled. The first gun will always be loaded, no matter what after a cast. You just choose what to load. It's not loaded in the sense of "I can still see it on the ground", it's just still in memory

This is an obvious heavy memory penalty if your gun references lots of assets or classes with assets, because then you're also loading said assets into memory, it could be many megabytes of memory for a single gun.

For a code only base class, it's an order of kilobytes, which is negligable. To show you how negligable it is, all I will say is that the engine already does that loading for every single C++ class. It's a lot, but it's negligable. (It's also why you don't want to reference assets directly in C++)

#

The cost is also negligable for classes with assets if they're going to be loaded anyway

#

Something like the player character, it doesn't matter as much

#

But something which isn't always going to be there, like a gun, or an enemy, can be a bit of a bad move sometimes

#

Frontloading it all can be perfectly valid for really small games though, you'll not encounter any loading hitches in doing so

#

At the end of the day, it's all design, you choose the method that makes sense for the thing you're doing

#

I'm not going to make a base class for my character unless I have multiple different player characters.
Weapons and other things I am because of the memory issue, and because I'm going to have multiple variants, so it streamlines creation.

Unrelated things? I'm going to use an interface. The engine uses interfaces for getting an ability system component reference from an actor for example.

zealous moth
#

is there a way to get components of class somehow?

#

I wanna get all point lights

#

point light components* in 1 actor

maiden wadi
thin panther
#

Yes, funnily enough it's the node "Get Components By Class" :P

#

Just drag from any actor reference

zealous moth
#

ahhhhh

#

by class!

#

I kept typing variants but it was "of class" like authaer said

thin panther
#

Hm, odd 🤔

maiden wadi
#

I think he meant the class/variant part more than the by/of. 😄

zealous moth
#

well you can spawn actor from class, get all actors of class and now get components by class

#

i'd use "of" but when you look for it, you get a ton of different functions

thorny kestrel
pulsar osprey
#

not really

#

it loops through the components of an actor

thorny kestrel
#

okey what about get all class of actor

pulsar osprey
#

the one that loops through every actor in the level? likely much more expensive

thorny kestrel
thin panther
#

no, again, following proper etiquette, there's no reason to

thin panther
thin panther
#

(try not to though, treat it with care and respect)

thorny kestrel
#

I never use these things 😂 before

thorny kestrel
#

I have asked a question in the multiplayer channel

thin panther
#

not an awful lot no, certainly not comfortable enough in my multiplayer knowledge to give advice in good conscience

thorny kestrel
#

do you think I can make it all blueprints? or I need C++?

thin panther
#

generally speaking with multiplayer comes C++

#

especially for things like prediction

thorny kestrel
#

I am struggling with client prediction...

thin panther
#

that's why i mentioned it :P

pulsar osprey
#

always both bp and c++!

#

just bp is limiting, just c++ is basically impossible

thorny kestrel
#

its not smooth I don't know why, maybe Its because of the bp?

pulsar osprey
#

doubtful

thin panther
#

It's quite possible actually

#

Blueprints are pretty slow for network logic

#

Bespoke network logic that is

#

Stutter is common

thorny kestrel
#

is there a way I can debug to see where is bottle neck

thin panther
#

Unless you're going extremely simple using only built in things, like movement

thorny kestrel
thin panther
#

Oh then no worries, you can expose things to bp and just make functions to use in bp

thorny kestrel
#

there is one 100 hours multiplayer c++ course I made before, only to know how to do the lag compensation, but I want a solution in the bps

thin panther
#

But to find bottlenecks, profile using UnrealInsights

thin panther
thorny kestrel
thin panther
#

it won't

#

your core logic is in C++ where the speedup is

thorny kestrel
#

the core logic is just a line trace, is that will still make a difference?

thin panther
#

the main cost you get from bp is transitioning node to node.
A Bp function to calculate a fibbonacci sequence is much slower than a c++ one because of all the nodes

thin panther
#

making your lag compensation in C++ will

thorny kestrel
thin panther
#

Well should at least :P

thorny kestrel
#

but still I don't understand why a bp cant be transformed to a C++ code ?

thin panther
#

Again, no expert here.

pulsar osprey
thorny kestrel
thorny kestrel
#

after build or something

thin panther
# thorny kestrel but still I don't understand why a bp cant be transformed to a C++ code ?

It's an arduous process. Certain things are allowed in BP that aren't in C++.
They used to let you, but it didn't work too well. The community has successfully made an automatic converter that isn't public yet though.

Essentially because of the "illegal moves", Bp sets up a stack frame before moving to each node. Doing this over and over again for each node in the BPVM is slow. But the BP bytecode that is generated when you compile is translatable. You just need to know how, and it wasn't worth Epic persuing

#

When you use blueprints as intended, there is no reason to do that conversion because there is no slowdown

#

Blueprints are intended to be an easy to use interface for designers to make gameplay logic.
C++ is meant for the core systems

#

Of course, you don't have to do things that way. It just means sometimes you compromise and hit negatives

pulsar osprey
#

also, everytime something was converted to c++, everything part of that class would always be loaded. every asset. it bloated memory requirements for games iirc

thin panther
#

ugh i can definitely see it turning all actor refs into constructor helpers :P

thorny kestrel
pulsar osprey
#

i wouldn't rely on it

#

i feel like a big part of why epic stopped supporting it was because it encourages a bad practice. you're basically making single use c++ classes, whereas they should usually be your framework where everything else is built on

#

i also can't imagine the performance gain was that significant in most cases?

thin panther
#

It depends, it can be very significant

#

For average gameplay code, no, unless you're targetting some platforms in which case, yes

For something like fluid flux, that has a ton of large blueprints, yes

#

It will always be less performant than hand written C++ though

#

It will also always be uglier, you won't be able to understand or maintain it

#

It's literally translated bytecode with autogenerated names and a mess of includes etc.

thorny kestrel
#

I still think replication can be good in blueprints, maybe there is an issue with my code.

#

or I just make my game offline 😂

lunar sleet
#

Yes, you should prly not attempt multiplayer with bp only

olive yarrow
thin panther
#

Unfortunately I have to shoot, try plugging a reference to self in the parent actor

olive yarrow
#

solid, it attatched! not anywhere near the socket but hey.... small victories

#

nvm fixed that to

#

o

thorny kestrel
#

get the skl mesh and connect it to parent actor

thorny kestrel
zealous moth
#

it's not costly at all

gaunt stirrup
#

Cant download from quixel bridge anymore- showing Asset not available in Uasset Format

#

any solution ? 😮

lunar sleet
#

Little late to the party eh?

gaunt stirrup
#

LMAO

#

what happened

#

im using 5.1

#

😦

#

what do i do

maiden wadi
olive yarrow
#

this is in my playerBP, after attatching the gunactor to my socketcomponent. it's reading None, though my smg is referenced in my variables.

I've tried running this through a shared interface and via casting - which failed. I thought this was whaat Cuppa meant but iiiiiii'm thinking i didn't interpret it smoothly

#

should i be using actor components or somethin?

orchid raven
#

Morning!
Is there an easy way to remove the innate "cant jump while crouched" setting?

dawn gazelle
orchid raven
still swallow
#

and remove the crouched check

surreal steppe
#

Hi guys. I am fiddeling with blueprints for a few weeks now. Currently I am experimenting with scene components. Basically I would like to create one with a collision box and handle ground states with it (GroundHandlerComponent, check ground collision and set true or false) so I can add this ground handler to any pawn and fire events for ground checks. Problem is -> I really cant find any way to add a bounding box to a scene component blueprint. Am I missing anything?

dark drum
surreal steppe
#

ok, I tried inheriting from Box Collider Component (which is usueally the root of a CharacterActor I think) to have the box collision but I cant find that in the selection list

dark drum
surreal steppe
#

ok that would have been my second guess. Problem is that I need to do some casting on begin play with this approach. (component -> childActor -> castToGroundHandler -> bind events)

surreal steppe
#

So scene components are not really meant to be used with colliders if I get that right

dark drum
tacit bloom
#

Hi, i’m developing my game and I have a a problem which i can not solve. When I hit the play button my ThirdPersonCharacter spawns in the middle of nowhere. First it falls and after 3 seconds it disappears

proud mauve
#

Hey, guys.
I want to play a video file on a plane in my level. It works well with the media player and the media texture and the material. However, the video is darker than the original and also the resolution seems smaller. How can I ensure it looks on the plane just like the original?
Another question, I am working with the "SuperGridStarterPack" right now, If I add some assets in a part of the level that I created some materials on the assets are going black. Even after building light... Why is that?
I'm using UE 4.27^^

maiden wadi
restive radish
#

hey,
I have a bug.
when a grenade explodes while the player is facing away and in the air, he doesn't get registered as a hit from the line trace.. any idea why that happens?

frosty heron
#

maybe he dodged it?

#

you can play in slow motion, go closer

#

and show collisions

restive radish
#

ok i will

frosty heron
#

to slow mo, use global time dilation

#

to show collision, open console and type, show Collision

#

to eject from controller, hit that triangle next to the stop button

#

btw, i tried to pause when the line trace happend, it does look like the trace happend just right below his foot

restive radish
#

you're right

frosty heron
restive radish
#

how can i make it target the collision instead of the mesh?

dark drum
frosty heron
#

you can just set the capsule component collision settings to overlap the line trace channel

#

or if you want to be more accurate and use the skeletal mesh collision, then you have to setup physic assets.

#

but I think default Unreal mannequin already comes with one

restive radish
#

i can also maybe make the line trace go to the spine 3 bone instead of the center of the character

restive radish
frosty heron
#

not using radial instead?

#

it's a grenade

#

use a sphere component to detect hit instead?

restive radish
#

i want a line trace to detect an object between the grenade and the player

#

if an object blocks it first, the player will not get damaged

frosty heron
#

that's fine, personally I would use both

restive radish
#

i do use sphere overlap actors

jovial steeple
#

He is essentialy using both already

#

The sphere overlap actors function may as well be a sphere componet

restive radish
#

i guess i can make it so that if the line trace does not hit anything, the player gets exploded anyways because it is opened directly to the grenade's explosion

frosty heron
#

at the top of my head, I was thingking to just use the line trace as an additional check if there is like a wall inbetween the player and the grenade

#

you don't want your player to die, when the grenade is at the otherside of the wall

restive radish
#

that currently happens

jovial steeple
#

Im wondering what you colliding with exactly, what component? Your line trace is tracing the visibility channel, you may be colliding with the players mesh, and not the capsule component.

#

It looks as if the linetrace is going through his legs

#

Can you print the name of the Hit compnet

restive radish
#

yea it does

jovial steeple
#

for your second linetrace?

restive radish
#

it hits the mesh

jovial steeple
#

Yea thats the issue