#blueprint
1 messages · Page 375 of 1
why are you add force 0 ?
is that supposed to stop it ?
meant to
so whats the idea in the one with the line trace ?
are you trying to move to a target ?
thats the wheels making up the suspension, thats all i could find w tutorials, if i dont need it then thats great, im mostly aiming for a ps1 style kart racer,
ok i see the red is the traces
yea idk why its moving without input
thats a massive force lol
try something smaller
because in unreal when you use physics it be like that
it fkn glides
you got to add friction n stuff like this
it moves w a lower number but its rly slow
lower the force untill it barely moves
then multiply that by a factor
but i would add friction
We doing vehicles?
attempting to
in addition to the forward vector? or in place of it
keep the acceleration
but add a deceleration
like friction
What's the problem, it's a hovercraft RN and not a car?
the problem is it moves on its own, dosnt move forward w speed, once moved forward cant stop, cant turn, any colloisoin w another mesh flips it
The computer is doing exactly what you tell it to do
im aware
You had high school physics?
thats why im here
one thing is you can just add force of zero to stop it
An object in motion.... Remains in motion unless acted upon. You gotta act upon it.
Start with a unicycle. One trace
ideally, i dont care ab accurate physics, if i can just make it look ok visually n feel ok to move like thats enough, the game aesthetic is low poly
Force = (TargetVelocity - Velocity) x SomeNumber
like even if its just snaping a kart mesh to align w the ground normal
Have your inputs set TargetVelocity
when you press the button, add force in the forward direction
but add friction so it doesn't just glide
Do this
This is the sort of thinking you need for a vehicle
if its not moving to start w how do i get a velocity other than 0
Your inputs set Target velocity.
its only moving w the variable i had set w it and even then very slowly
Tune the number to taste.
can i not just, have a kart mesh in a third person bp, have it rotate to align w the ground normal to look like it has suspension, and then w controls have the mesh rotate if the player is instead of coding a whole new pawn
Third person BP is designed to be a character not a vehicle. Unreal engine even has built in projects that comes with the engine. Have you opened that?
yes you can why not ?
yea
Sure, what are you after? Are you after a cart that moves like a character or a cart that moves like a wheeled vehicle. We don't know your game.
but its too much added shit for what i need
We don’t know what you need that’s the problem
i already said aiming for a psx kart racer
will your ground always be flat ?
Then no I would not start with character movement
no but its not gonna be like massively detailed
https://youtu.be/hMjk6zj8uvo?si=GzFS4bBV8cr4BfDr
This tire model basically started with exactly what I'm telling you. Tires are the most complicated thing in games. You can make a simple raycast vehicle doing exactly what I said
Just think. The tire has a velocity. It wants to go. It has a velocity. It is currently going. The difference, subtraction, between those, is how you cook up the force that it generates.
How so? What is too much? Like everyone else has said this is not an easy task that your trying to accomplish and it’s going to take a lot of trial and error
I want to move forward but I am not moving, I should generate a force forward. Forward - 0 equals forward
i literaly just need forward backwards left and right
I want to move forward, but I am moving to the right and forward. It will generate a force opposing the rightward movement, that's your side to side friction.
Then delete what you won’t use
aligned to camera ?
yea
Do the wheels turn?
Such a perfect demo. It wasnt even gigantic nodes right?
so what i would do is get camera forward except the maybe y one of the axis
which would make it look in the camera direction except keep the cars axis that keeps it upright
i'm not sure if its two or one i would have to look at the code i can't do that
not much this is my reference
dude this is awesome! great work
only the front ones do but it seems more visual
ya i would get the camera direction not the player
and just look basically the cmaera direction but then from where the camera is looking straight
but at that location
Well this is where i bow out again lol. Ive been at this for 2 years and i would really struggle to accomplish whats in that video
so the cameras rotation but the players direction
where at, i got lost in the sea of texts
instead of actor forward vector?
so first thing you want to do is get the lookat rotation
yes exactly
here
then break the vector
break the vector on the force
just plug x and z in
try that
i'm not sure what the combo is
but i think its if you leave out y
it should be camera rotation but looking basically at its zero
also set your rotation
but try this
and the force should be applied relative to the camera
can you rotate your camera yet ?
nothing happens w the camera or the input key rn
nothing happens
oh thats because you need to multiply the vector first
you can either multiply the vector by a constant, or by anotehr vector with all three set to a variable
or even multiply the x and z by a value
but i would try to multiply the vector by a float, and output a vector
which should scale it
nope
Try to plug y in is it moving?
multiplying the vector or the floats didnt change anything
the print makes it seems like it is
pressing the button makes it slam into the ground
Yes remove the y and tone it down
y worked slightly but its slowly rotating
That might be your suspension
shutting it off dosnt let me move at all
is this not slow for being * 25000
Did you try impulse
that is impulse
100
You know what let me look at my code for this instead of guessing...
I thought it was x and z
I get axis confused easily
I need to compile shaders...
This is always a pita
1
Set the rotation as well
of the mesh or camera
The mesh
To the same thing kind of thing but use the camera rotation
Try x and z or just y
in the input or suspension
The rotation of the kart
or just in the pawn tick
Ya tick is fine
so on tick set the rotation to the x n y of the camera
for the box root or the mesh itself
Is your camera part of kart bp ?
yea
I would rotate box
Close
Get your y and plug it in
So get rotation
Break
Y plug it in
So it doesn't change
No the rotation was right
The force was wrong
It should of been y
It should be x and z I think
Ok shutt off the suspension for test
See if it's rotated correctly and force works
interestingg. i wasnt that far off but was, but how would i do this w controller in place of mouse i was planning to support both? and ty, seeing it visually made more sense, (still slightly confused but the visuals help)
totally trivial, my example is more like a BB-8 as it has ambi-movement but same idea
a car is more like "it resists left/right motion, it tries to accelerate or break in the forward/reverse directions only, steering ROTATES the car"
at the simplest level
later once you want to have drifting etc, you'd start modeling more of the friction limit and such, at the far extreme you do everything by tires with momentum and steer by orienting the tires, that's where you end up on the simulator end of the spectrum
Honestly start by making a skiier with a rocket on his back
3 main forces:
Suspension (keeps you up off the ground)
Lateral grip (resists left/right movement)
Thrust (forward acceleration)
just rotate him based on control rotation, which mouse and gamepad can trivially just update
Or is it x and z but y of the player
That's the combo like the rotation
That's what I was missing I think y of the mesh forward
@faint pasture can i have opinion on how would you tackle mountable in multiplayer?
Something like this
Should we just unpossess the human char and start posessing the mount?
mount I'd probably do with CMC
Btw 10 years ago I was doing the same thing lol
I bet Palworld mounts are done as Character, takes some tweaks to make it not able to just strafe like a human but it's doable.
I've never done it though
what collision did u give your mesh, mine keeps clipping through the map and i cant control it
can be anything, start with a hovering cube
physics turned on, constrained in rotation for now
and maybe spring math is backwards yeeting it earthward
without CMC turned on so you clip through then fall
ok i got it to stop clipping but now wont let me move
and now its clippign again
i dont think its positon bc raising it up makes it clip too
Wdym clip
this dude just told you hes been working on cars for 10 years lol
And it looks awesome too
It totally does!
I meant to say, theres no substitute for trial and error. Just mess around with stuff! talk to chat gpt, lookup on youtube etc
I see i see. Maybe custom pshyx in cmc?
even if you get that car to move forward using impulse, what are you gonna do when you get to the next step?
And cmc already got acceleration/ decelerare so we can just make it slide
i sent a video of it
cant rush the learning process or else your stuck with a project where you dont even understand how or what you did and dont know how to navigate it because there was no trial and error involved
^
why are you here just to be negative lmao
You will soon realize that what im telling you is trying to help you @trim matrix . Nothing negative about what im saying
hm
yea it happens everytime i click play, even if i raise it
Raise your player start
Open console and type show collision
i did
Show it doing with it raised
Thats not player start
i mean ive been sending videos and screenshots
no shit i replied to the message ab collison 😭
Hmm
can u not read?
like tf
😂
Is that custom UCX collision? Its not done right imo. Not saying thats the problem but wont be suprised if theres any abnormality.
That aside. You should check the collision type and channel.
Also if you using physichs then you probably need physich assets for the collision.
it did it even on a normal unreal cube
Are you adding a down force ?
Check the collision settings on both the car and the ground.
i copied the code in this node for node
i already have which is why i sent the other message asking what they should be set to bc it was falling through the ground
shows us your collision settings
^
This is showing how the car fell not the collision settings that we need to see.
Click on the car. Go to the collision settings then screen shoot. Do the same with the floor
you sure you don't have the map range float backwards?
also idk how big your mesh is
again it did it w a unreal mesh too
You can probably massage walking into horse-like movement but sure, the final product is probably a custom movement mode
my mesh was just a default sphere with physics on, inertia conditioning off, and rotation locked
you sure you have the line trace ignoring self?
Im thingking of just riding a hog or cute piggy. So a blend space with acceleration and decceleration and directional blend for leaning.
Nothing fancy, certainly not trying to do withcer horse mechanic.
show code and component layout of kart
Hopefully cmc suffice
@faint pasture when physich is turned on for static mesh, are the simple collision still used?
yes
whatever collision the mesh is using is used
you want to use simple usually
Yup
you plugged roll into yaw in the rotation stuff
you also plugged VElocityX into both x and y of Velocity
btw rename that DesiredVelocity
it it's the velocity, it's the velocity you want
you probably don't want to pull 1G per cm/sec you're moving
no wonder you're accelerating to light speed
that should be a 1
that bit is the suspension dampening
its not falling through the floor anympre but i still cant move it
Where do these come from?
those should just be your WS and AD axes
I didnt feel like hooking up anything beyond raw dog input for my quick and dirty demo
if you have inputaxis values for Forward and Right plug them there
well, like i said i just copied your thing lol 😭 ill add them
You gotta understand what the code is doing and not just cargo cult it
only way to learn
anyway gotta get up in 3 hours good luck
ik, but a working version> my busted version
and i learn much more by doing and seeing than being talked at or down to like some in here would like to do lmao
100% this. Because the mount has it's own set of abilities. It can jump different, might dash, might breathe fire, have a handbrake, etc etc. At this point your "character" is just an attached accessory which may or may not add extra buffs or abilities. But you're still controlling the mount at that point even for something like horseback archery.
We are both telling you the same thing. You have to understand what its doing and not just copy and paste. Im not sure where you think im being negative or attacking you but its the truth. Its all love, we are all here learning and we have all failed 100000's of times. Im trying to set you up for success and jumping into trying to get this car to work is not going to end well if you are lacking the basic understanding around it
Ive put more hours into trying to learn this damn engine last week then i did at my fulltime job. If you want to learn the engine theres no substitue. If you just want to make a game or make something happen there are wayyyyyy better options out there than unreal engine.
Gotcha!
Any engine would have simmiliar learning curve.
Unless you are making a game with game editor like warcraft, starcraft and arma. Expect the same challange.
Well, it wouldnt be a game engine neccesarily but a "game creator"
Theres not much difference between doing inventory in engine X or engine Y. The logic would have been the same.
i dont have the energy to respond to that lmao its not worth it💀
correct, but some game makers have a prebuilt inventory built in
for sure no worries! have a great night best of luck
but starting with somethign simple can be a great way to introduce you to programming concepts without throwing the entire book at you at once
ok now im confused lol..
why
your shipping a game?
yea
in unreal?
Unproductive chat
yup
Just build guys
oh well
sweet, hit us with the link when you drop it
Working on that mario cart mechanic isnt really a leap frog.
Im still working on shipping my first.
I do say thats a good starting point.
Meh publishing a game doesnt mean anything.
i deadass only started on it bc it seemed like a good challenge and different than the shit ive been stuck w in the other game
Ive published mine and lost tens thousands of dollars
I really should try to vertical slice some games. Atre takes up too much of my time and it's only supposed to be a dayjob. 😂
not stuck on, meant im tired of working on first person shit😭 and the codebase of the game even tho ik where most it is i jus am so ready to be done w it atp
Everyone get burnt out. Ive scrapped like 20 game ideas before pushing through with my last published game.
you have to be a masochist to be a game dev i swear
im past burnt out lmao. game development isnt even my main thing. i use unreal for vfx and animation, and then fell into this
i couldnt do it without my game dev partner.....lots and lots of weed
nah my dyslexic ass gives up at that point
I come to a point where i can start appriciate what i built.
Guess its like drawing. You start from sh*t then gradually you make something decent.
The process is hard, but giving up is harder.
Oh for sure. As a kid i never dreamed of being able to ever do the things i do today. I must have installed unreal engine 10 times and bounced off of it every time but for some reason this last time it stuck
This part. Its bigger than me. All of a sudden that problem that made you rage quit is the only thing on your mind when your eating sleepign and working. You might be taking a shit when all of a sudden the solution just clicks
such an addicting feeling
@maiden wadi do you think most modern multiplayer net code is soo bad?
I played dead islamd 2 yesterday. The proxies are not even smoothed. Rotation and movement is sooo choppy.
Also the final fantasy dungeon raid game is full of choppy movement.
Dying light was ok but not on the same level like the old game.
Makes me think left for dead is a technological marvel.
I want to go back to being dumb. I paid less for aspirin then.
I solved a lot of problem on my dream.
Thats when im relaxed and can think freely.
Just think about it then woke up with a potential solution.
Is Dead Island 2 in Unreal?
But yeah. I dunno. I think most of that is hard. I think a lot of them go for safety over niceness. Reality feels nicer than fake unless you can make fake feel real. And making fake feel real is the hardest solve in most cases. So it's easier to just.. not try.
Yes
Does the proxy look choppy on client or host?
Both lmao
Like movement or animations?
Could i get some quick advice on something? Im working on a simple rougelike game for practice. There will be items you can buy in a shop that will be really simple and will carry a passive skill boost or an ability that can be used in game. Just from a general overview - how would you approach storing these items? Ive used Structs before, but wasnt sure if that would be the best method. Its hard because I just have no frame of reference on what industry standards are for stuff like that
Movememt
Do they have super fast movement?
When they rotate, its not smoothed
Hmm i havent unlock all abilities yet.
But it doesnt do crazy parkour or anything like that.
That's odd. usually clients are fairly smooth because of interpolation. They could have disabled it. If they're using CMC.
Even just throwing some terms out for me to go and research would be much apprecaited!
Next level would be to use instanced struct. Thats whst unreal use for their benchmark example project.
Yeah like sim proxies are smoothed by default.
Haha i googled what you wrote before you fixed the typo and was so confused
I've been working on redoing my inventory system into structs. Keeping all script facting public API as UObjects though.
How are you doing your inventory now?
I dont need to store inventory, once the player buys the item from the shop it will instantly get used if its passive or if its active theres only one slot
Its more about storing the items and all the data, effects, etc
I dont. 2026 goal is to dip a toe in
Still sounds like an inventory to me unless I'm misunderstanding?
Well i guess your right because the passive abilities have to stack somewhere
Well
theres just not slots that you cna move things around or a hotbar etc
To be fair that's kind of inventory AND equipped territory.
if you already have your one non passive item you cant buy anymore or store them anywhere
Inventory and equipment component
Just use instanced struct and you can have composition.
Yeah thats how im doing it now. A component with all of the data in a enumerator map variable. then i have a base class for the item and a base class for the potential efects an item can do
Litetary add any fragment you want. A size, price, descriptiom, status effect. Your imagination is the limit.
Enum map variable?
Imo you should explore instanced struct, it will be an eye opener.
ok! I will research tonight
Im not going back to normal struct again in my life for inventory
The enum mapped to a float to reference data on the character
Not being rude but this sound weak and completly unneccesarym
In my specific case, my items never leave the inventory.
Equipped items and hotbar items are all just items in your inventory. They don't go into anything special. The hotbar and equipment just references the stuff in the inventory.
ItemID: 344134
ItemType: DA_LeatherBoots
Name: Leather Boots
If I had that item in my inventory. My quickbar would reference 344134. When I use that quickbar, it'd look up that item by ID in the inventory and use it.
Equipment is pretty much the same. My equipment is just a list of equipped ItemIDs.
Does instanced struct require cpp? I never try to make one in pure bp.
I should have explained further but it probably is weak lol. Its for all the info on my characters abilities Strength, Agility, etc. The item base class has a function that checks to make sure the item can use its ability based on the requirements for that paticular item
Yeah this should be handled with instanced strucrt. They basicallt support polymorphism and composition.
So you can have a gauntlet, that has a strength fragment. It doent need other attribute that it doest enhance.
But yeah. Specific implementation aside, you're explaining an inventory with items that have unique pickup locks. But still just an inventory.
And anytime you want to add anothrt effect or attribute to the specific item, you just add and remove fragment as needed.
Its kinds why i dont like struct based inventory. Stuck with giant mammoth info when an item probably just have a multiple things that it needs to know or contribute.
Hm, I guess i sort of understand.. Just in the sense that it can be dynamically changed at runtime vs a struct which is just read only (i think?) But i think id have to see it to fully understand some of the things your saying
Im at work atm but i can show what it looks like after work.
There should be some breakdown on the internet.
@knotty falcon If you have an array of structs.
Lets go simple with FVector.
Your array has a list of structs that all have three floats, right?
my array is structless 🥺
If you have an array of instanced structs. You can have anything there.
FVector array:
0. FVector
- FVector
- FVector
Instanced Struct array:
0. FVector
- FColor
- FSomeOtherStructThing
Yup got it. Its been a long time since ive worked with them i will have to do a refresher
ah got it
is it possible to make a "vampire survival" type game in ue5?
fps drops drasticly when i spawn actors
even if they are just empty
have you considered doing actor pooling ?
With each enemy being a separat actor - very hard. Unreal doesn't like so many actors moving all the time. Some very serious optimization would be required.
Unreal has a Mass Entity system, I heard people use it for crowds. I never used it though, so dunno what features it has
is it 2D or with 3D actors ? If it is 3D you can check Thread-Safe animation blueprint implementation for massive improvment of performances
have you done profiling ? to identify where is your bottleneck
Well, how many actors would you want to display at once ?
100-200
If you optimize agressively I think it should be possible
Definelty.
I can have about 10k moving actors visualizations with ok perf
Its easiest if you get away from cmc and make simpler representations. Abusing ISM and possibly VAMP if you need detailed movement
At such numbers (which youmprob dont need) everything starts to count
Ism = instanced static mesh
Gpu does the heavy work
Vamp is vertex animation
which also happens on the gpu
CMC = Character movement component
which comes with the Character class
vertex animation work with 3d mesh?
Yes
I'd suggest making a single 'hive mind master Actor' which does the bread and butter job for the game, controlling 99% of the enemies which tend to be brain dead moving towards the player
might be overkill if your target is 100 enemies, but who knows 😄
what's wrong with CMC ?
yeah most features are probably not going to be used at all
right
makes sense
and its usually flat maps, so any floor checks is rather useless
walk angle , swimming, flying, etc etc
im actually doing megabonk-like
fair enough
Not enough to qualify use of CMC imo
but it can be a quick and easy start, and helps to set the scope of it all when you start churnin' away
enemies would prob just nav-walk anyways
so the nav system would define the walkable slopes and whatnot
Didn't dani make some videos how the movement of megabonk came to be? He was using unity, but the general ideas could give you some insight if you want to make it feel similar
In Mobile:
while runing with virtual joystick, i using UMG button for jump.
which is not working when i'm using joystick, but when only press jump btn it works.
Hi i have this Button with an image
is there a way to "zoom" in the image without adding another texture thats already zoomed ?
(its so small)
you want to zoom at the icon?
yeah
it should be as simple as scaling the UV of the icon material.
so you will need the icon (image) to be a dynamic material instance.
and have some modifier for the UV Texture.
hmm maybe I misunderstood but that will go over the button or nah?
it will yeah
excatly
but its got alpha bg right ?
yeah
but yeah, material is the alternative
^
or just create a new texture tbh
the icon is on the button but yeah sure i can remake that witha image ontop
The icon is on the button, yes.
So you make the button hittable not the icon (image).
Hi all, how comes you can't add a timeline to a game instance but you can add a delay?
I don't know if you can't but there is a difference. Timeline is more like a component, while a delay is a simple latent node.
Pretty sure timeline is tied to a world.
Game instance exist outside any level so yeah.
Does anyone have a good starting point for me to learn UE5 (for 3d survival) based on some resources / tutorial series or maybe text guides, that explain things fast paced, but with all the necessary. Preferably based on the blueprint system (some c++ functions arent a problem)
Epics Documentation seems to be missing some pages (e.g. quick-start for landscapes) so i don't think its a good resource to learn with.
I do have ue5 basic knowledge already and am somewhat experienced with unity engine. Also doing 3d with blender and can properly programm in multiple languages.
If you already know OOP you shouldnt have issue building most of the mechanic.
so i should spawn instanced static meshes istead of characters and make them move to the player ?
That's what i'd do
damn i never learned about ism
You still have the video? I witness what you did with it in the past. Real cool.
my issue with the blueprints is rather getting to know all the blueprint functions and how they work together.
also i feel like every object has 100+ functions which then again have 100+ options which can be set.
So maybe some sort of function docs would already help to start
prob somewhere on this dusty drive
Have a goal on what you want to do. Figure out the data type and the algorithm then move on from there.
I rarely use in built function.
okay ill look into that. thanks.
Looking at some tutorial on the internet is okay starting point if you start from absolute nothing.
But be mindfup 95% of the content out there is probably not scaleable or tailored specifically for your project.
Its okay to follow them as a guide. Hell even follow along. But at some point you will find a better way to do it and the one that fits your project more.
Yeah i used to do this same exact workflows in different projects already.
Learn basic or specific mechanics from videos just to gather the knowledge, then recreate something myself with it and add onto it
everything starts costing when you go high in numbers
the edge tracing is relatively expensive , so it's currently pretty throttled , 10 units per tick
@gentle urchin can they have collision?
I need to replace my bullet as something else.
I'
I've heard niagara can be great for that
they do hame some collision but not full, and definetly dont care about each other
Yeah i dont need projectile on projectile collision
for my stuff i just use proximity logic
how many bullets are you gonna have at a single point in time?
if its < 100 i'd prob just try actor pooling
Ideally bullet hell but i will acknowledge the limit if need be.
i want ask about game instance in blueprint is it able to create subsystem instance in blueprint ?
if not what the best way to create a sub manager and implement it in bp game instance , should the manager be class object
and init it in construct then cast from get my game instance to access manager reference or what should we do ,
let's say i have a map system that should work lifetime or save game system ...etc
You only get one game instance in blueprint.
If you want more then you have to make it from cpp.
I like to create seperate sub system for each system. Imo if you want to up your game, just learn cpp for a week.
You will unlock a lot of benefit from knowing some cpp.
Sub system and non blueprint defined struct for one.
So I need to learn C++. Thank you.
Everyone have different goal and journey. If you want to unlock all the hidden power then learning cpp is the next step.
As someone who can programm but is really lazy and is sticking to BPs for most things - yes, C++ structures are a must if you want to not waste time with bugs. And subsystems are great for things that need to be accessed in many places (like a main manager of something)
If you decide to start with some cpp do know that rider is free for non commercial use.
U can buy the lisence once you are ready to publish your game.
Without intelisense your ide is just a glorified notepad. I rather work with unity than not having auto complete.
...but can reach thousands on modern hardware, with some systems even managing millions
Niagara might be worth a look 😛
hmm ... this was my experience aswell when i tried it, but it might be better today
object pooling is pretty neat tho. Can reach good numbers, and if you can further simplify the actor, you're pretty golden
https://forums.unrealengine.com/t/plugin-object-pool-component/81338 this was suggested, if you cba making your own
25$ or so ,
Anyone know if I can use Evaluation time for Morph Targets instead of relative (blender Shape Keys) ?
Can you elaborate on "evaluation time"?
Also the blender key should be converted to just keys in the anim asset isnt it.
Hoi! I am trying to pause/unpause a Level Sequence from its director Blueprint, but I cannot find any good resources on how to access the LevelSequenceActor. Is this a good approach? Or am I looking in the wrong place?
Any help would be appreciated!
-# (please ping me I have notifications off)
My Blender shape keys are related to the keyframes. When I say "evaluation time" it's an option in the shape key menu, you can set "relative" to another shape key or evaluation time. The goal here : I have like 100 shape keys for a cloth simulation animation that I want to bake to UE morph targets to reduce performance cost
I see, well no idea from me.
I made a cloth simulation, and then I exported a .mdd file and imported it again (the .mdd file) to convert my cloth simulation to shape keys / keyframes.
Ok np thank you anyway !
I wonder if Morph Target is the best way (performance) to have baked animation
Doubt it beats vertex anim, but i could be wrong
Just go try to do the thing
will i be able to export skeletal animations as vertex from blender?
That is the idea yeah
or well
the plugin does it in engine
if we're talking about VAMP specifically
you can ofcourse do the work and save the money instead
its pretty heavy on the price imo
so in theory spawner has an instanced static mesh component which adds instances to itself and then commands all of them to move to player?
Something like that yeah
on timer?
it would create a new component for every unique enemy (unless you use some VAT logic) , and spawn instances accordingly
timer is reasonable
hmm how do i make them move tho
SetTransform
must be the only way ?
Yuss
So youd want to track their transform in the manager
And push it to the ism every frame or so
z vector is a problem
How so
You can query the nav system for the z id you want
Cmc also allows this if im not mistaken
Without cmc you might need some c++ access to get it
Id suggest that either way if you aim big
well static meshes cant have cmc
It requires the Character parent class yes
this should help
idk im trying to make instanced meshes to look like theyre walking
hmm, so what are you trying to do with this trace ?
ya trace down i would create a channel for it
start at the bottom or middle and trace down
i thought you were trying to get the landscape height
im just not sure about the performance tho, having 200 instanced meshes all tracing at the same time
can you use c++ ?
nah
But loops and bp is not a great pair
gonna try
definately valid point c++ ftw
you can also do it on tick split it up into seperate loops
instanced meshes seems to kill fps the same as when i spawn regular static meshes 🤔
less than characters but the same
from 120 to 90 fps at 200instances
90 fps is still good
If you're talking about hundreds of anything doing work on tick then it's C++ time
😢
The slow part isn't whether or not you are using meshes or ISMs or what, it's the fact that you're trying to do tons of work per frame in Blueprint
I know of one way to get tons of stuff working without firing up C++, you'd have to become a Niagara wizard
its strange cus i just spawn (add) them to static mesh instance array with no subsequent logic to them
arent you should be able to have like million of instanced static meshes
i mean i think ive done it right and 400 halvens my fps
i mean its this node what else there is to it 😄
Hehe truuue
profile
hmm how?
You dont spawn an ism per actor? 😆
just realized that mobs wont be able collide with eachother if i move them with actor transform
i give up
sure they can
move with sweep
Unreal Landscape MID not updating in viewport (material changes in Details but visuals stay the same)
I’m trying to apply a Dynamic Material Instance (MID) to Landscapes in an editor script / blueprint (not runtime). I’m looping over multiple Landscape actors and trying to set material parameters (vector/scalar), then assign the MID.
What I see:
The MID appears assigned in the Landscape’s Details panel (Landscape Material shows the MID).
The MID parameters look correctly set when I inspect the MID asset.
But the landscape visuals do not change at all in the viewport.
Example: if the Landscape currently uses a “rocks” material, and I apply my MID, the landscape still looks like rocks as if nothing happened.
What I’ve tried:
Creating a MID using Create Dynamic Material Instance.
Setting parameters using Set Scalar Parameter Value and Set Vector Parameter Value.
Assigning the MID to the Landscape (Landscape Material).
Looking for a “reregister” / refresh node, but it doesn’t exist in my blueprint context.
My suspicion:
Landscapes seem to render using cached LandscapeComponent material instances, so changing the Landscape actor’s material property (or creating a MID without forcing it onto each component) doesn’t refresh the render in editor.
Question:
What is the correct way (in Blueprint/editor scripting) to:
Create/assign a MID to a Landscape so the viewport updates immediately, and
Ensure the MID is applied to all LandscapeComponents properly (not just the Landscape actor property), and
Force a refresh/rebuild if needed in-editor?
He has a lot of videos where he explains nodes
Here's my function thats applying the MID
Im using “add force” for movement controls in my game and I noticed the force seems way stronger when I play it on my Mac vs pc. I have my vector multiplied by delta world seconds but it still feels way different than on pc. Any tips?
Iirc you don't multiply by delta time with force, only for impulse.
Ohhh sheit maybe that’s the issue. Sounds like I’m probably causing the issue but multiplying it by delta time
The force is being applied on tick if that makes a difference
That's something you should use impulse for.
I think?
Or maybe I have that the wrong way around.
One of them you don't multiply by delta time...
It should be frame dependent but i am just guessing.
I think impulse is what you fire just once
Im still a little confused. so you are supposed to multiply by delta world time then?
No, i think you just assert the ammount of force on tick.
It should behave the same way regardless of fps.
https://blueprintue.com/blueprint/ve1_0h6k/ so ive gotten my kart pawn to this point, and have a trace on tick to adjust location bc it was way to high in the air and wouldnt let me adjust it in the bp details, along w aligning to the ground normal, but now im having issues w sloped surfaces, it dosnt like to play nice w them, i tried having a check to see if the slope was > 0 the adjust the pawns location to move it up to stop the collisiosn issue but that didnt work
i swapped to a box collison n still have the same issue but it slightly seems to understand the slope more idk im porlly jus seeing shit
If you use complex collision will the issue remain?
ill try that, i was just using a box collision inside the pawn
yea the issue is the same w complex collision
Is the ramp complex too?
Were the ramps made in another software? Maybe the normals are flipped?
what does the collision look like
i imported a mario kart course just to see scale w camera n shit n it just completely clips through the mesh when the pawn moves over it, like im using debug camera instead of a pawn
the mario kart course used complex collision
what about just the basic thirdperson character
i was gonna use it but couldnt figure out how to make it work w like kart controls idk how to word that
just drop in a character and see if he falls through the ramp
i feel like you might need a line trace to detect slopes and angles. The default character component has a prebuilt method for calculating things like stairs and walkable angles. To make a controllable vehicle from scratch I feel like you will have to do a lot of this calculating from scratch
the third person works fine w the meshes
I think the solution is beyond my skill level unfortunately
I think you are better off reverse engineering a prebuilt vehicle system
yea i been thinking that in thr back of my mind
my other option jus use the third person character or character component and make the racing like sonic r instead of mario kart
This is a playthrough of Sonic R for the SEGA Saturn.
Sonic notices Dr. Robotnik is taking part in the World Grand Prix, so something must be up. Let's race!
This playthrough shows off the locations of both the Sonic Tokens and Chaos Emeralds in all stages. It's worth noting Chaos Emeralds must be found separately from the Sonic Token challeng...
lol so basically just a dude running
i mean it just depends on the game you want to make. like the guys were saying last night, making a cube that moves around kinda like a car is a good beginner level thing to try to accomplish. But to make an entire game around a vehicle that actually behaves like a vehicle from scratch is gonna be hard. At least too hard for me
yea
my other thought is just use the third person template/character movement and make the karts just cosmetic n try n make the controls not feel as much like a character, the games style is meant to be psx/sega saturn era so im not going for like “accuracy” ig w the system
i cant think of the word im tired😭
bc like, even in sonic r amy uses a kart, and her movement is kinda similar to those on foot https://youtu.be/xjavlKTLt2w?si=QkBSGVnkyFyVTNEk
When you can't afford Team Sonic Racing.
It all started as a joke in a Discord vc and then it turned into this...
I don't even care about the fact that i had to two cycle every stage separately for emeralds and medals, this is fcking Amy.
ehhh i dont think that would work. the character strafes and just moves differently than a car would. Is there any rush to put this out? Why not just make this your "research project" and just take as long as it takes and slowly work on it
watch youtube videos on it everyday and talk chatGPT's ear off with questions and ideas
this is me researching
i have been
i dont rly see it as a shortcut
using a prebuilt 3rd person character and trying to fake that its a car is a bit of a shortcut
the non shortcut would be...take as long as it takes and build a car! I can tell it seems like a project your passionate about so you should give it the time it deserves
im not like. making a final product this second. im testing shit n figuring it out💀
no i know. but using the thirdperson template wouldnt be figuring it out. It would give you something goofy to mess around with if thats your goal. but if your goal is to learn the engine and learn how to build vehicles I would say keep at it
thats just my opinion though. Anyways, im back to work. Good luck!
Hey need little helper. How i can attach Level Script BP to make functions instead switching the levels and making function in level blueprint?
This sentence is confusing, could you rephrase it with some more details what are you trying to do?
Thanks, so i would like to increase some itterations but access to the level blueprint is painfull since i need to open specific level and write code inside this blueprint. There is an actor Called level script. I would like attach that to specific maps and make functions inside those bps to not have open levels itself and write code in their main bps
Never used this class, but it sounds like you can just place it inside the level - like literally, in the world.
But the general advice to your problem is to not use level blueprint for anything that you can handle elsewhere. Like making an invisible actor to manage some stuff instead of putting it in the level blueprint. Or using the game instance or game mode for larger scope features not tied to a specific level
as example i use dedicated server and would like keep save game on that specific machine that other actors have no access to that.
so calling a functiom from that level if makes sense
Any actor can be tied to only exist on the server. Or like the game instance, not be replicated and everyone has their own copy
level is an server so its doing server operation so everything there its replicated a like
I think you are confused how replication and server authority works
If you wanted something to exist only on the server, not on the clients - you just uncheck the Replicats checkbox on it. And if it is something placed in the level, you also uncheck the Net Load on Clients.
I'm honestly not sure how level blueprint relates to that since I never tried to use it in MP for anything more than visuals, I'll have to check.
did not touch even RPC
so i could use as advantage this to not doing twice the code
i know i can make my own c++ and reparent maybe i can just use that bp made on that reparented to actually get access to this specific level
Thats not true.
Game instance gets instantiated at the start of the application and destroyed at the end of application.
Everyone gets one, regardless whos gonnna host.
There can be a case of custom cpp game instance where it doesnt get instantiated if some flag get override.
But at the bare minimum, everyone get the default game instance.
A level script actor is the class that is used to create the level BP. You can define the default script actor that is used in the project settings. This effectively makes the new script actor the new parent for all newly created level blueprints. Generally, this would be for logic that would be required for all levels.
Whilst these can technically be accessed at runtime, they are extremely difficult to work with. Also note that you wouldn't be able to cast to you're specific script actor from BP.
Yeah I know, I think I shortened what I meant too much because it wasn't too relevant
Save game is local. It was never reached by anyone else but the local machine to begin with.
i know its local but i would like to write a code in actor script instead opening the level and write code on the level 😛
You can write it where ever you want. But the part where you talk about reachability is just wrong.
Like you can save a game and have a .sav in your machine. My machine will not know or can reach it.
All communication between server and client is via socket and actor channel.
where i can find this option? can you screenshot Thank You , if not i will find workaround just go to pure c++ and write code there related since its possible to just choose here
In the project settings. As a reminder, this changes the level script actor for all levels for the project. There's no way via BP only to have different level script actors (base class) for different levels/maps as it automatically creates one using the default class when the new map is created.
Personally however, I would just create an actor component and pop it on the game state (or game mode if its only needed server side). Much easier and BP friendly than trying to mess with the level BP.
hmm level does not take account even i set here bp - will try to switch in level blueprint to base class and if not propably it cannot be used as just programmable thing...
or have no idea how to override this
thanks i was able to separate GameMode for the Server that is not running in the editor as a Gamemode and its not default i can join through the network without setting game modes😉
Separate game mode for the server?
Server is the only one that has a game mode to begin with. O.o
i have a dedicated server setup running, Which not owning anything that a separate game mode clients joing with their own gamemode and get theirs game mode transfered to that server it works
Clients have no GameMode.
They have a GameMode while they still sit as standalone games in the Main Menu. But once connected they only have what the server replicates. GameMode not being one of that
Yeah I'm a little confused by this. The moment you connect to a server and travel to it, no more game mode for you as a client.
Separate to what? Clients not having a GameMode means there is nothing to run code.
here its gm from the server and i was connected from the menu map with the client that have another game mode
travel from this map in editor
that have another game mode and server runs own code itself that have nothing but only gamemode attached with default pawns controllers etc
Either way once they connect they have no GameMode anymore
Also you shouldn't connect with the Editor to an outside Server.
Either you start both as standalone, package both, or play in editor with both
But no mixing of that
okay so maybe that info is just pushed to the server game mode and switch default pawn to just posseed idk
but i can finally can simulate dedicated and being sure that code run from other sources
will try to override now pawn and see how things going
Sure
there is need to select pawn and player controller its autohorative by the server and i run without packaging stuff
finally
That's fine but PlayInEditor has the option to start DedicatedServer + multiple Clients.
And if you need to test the connection flow then you can start both in standalone.
You just shouldn't mix it
UE has lots of code and asset data that is utilized differently between PIE, standalone and the different package targets. It can literally crash if you mix them
but you must use as standalone while dedicated
I don't understand what you want to say with that
iam running server as other service and now not need to run as standalone
for a dedicated server rule
i just run icon with the background and can use as alisten one little QOL
for menu transfer to the level as example
I can only tell you that there are 3 ways of running a game/server.
- PIE (Play In Editor), while selecting Play as Server or Play as Client. Play as Client will launch a Dedicated Server in the background, optionally in a separate process.
- Standalone, usually via .bat files that open the project with -game and -server. That runs outside the Editor but still with editor data (not packaged). Iirc this can use cooked data with Zen Streaming.
- Packaged, and then either Development, Test, or Shipping.
And you shouldn't mix those. If one is packaged the other should be too.
so physicsConstraint seems very bugged when placed inside a blueprint actor? I had a ball hanging from a mesh (constraint+cable+mesh) which was working within editor, but whenever it's placed in a blueprint it will break - even when converted directly from the setup in viewport.
That's a Standalone Server
So the second option
And you should only connect with standalone clients to that if possible
Not with packaged ones and not with PIE ones
Within the editor means in the scene?
Doesn't that mean it's 3 actors in that case?
yeah
it was 4 actors: Cable, StaticMesh Cube (where its hanging from), StaticMesh Sphere, PhysicalConstraint (connected to end of cable and hanging sphere). Works fine in the viewport when just placed as independent actors
well i got transfered for that standalone that is not packed and not packed also pie and other client windows everything smoot and cool - server runs as other task a like.
Yeah I know that it can work. Just be aware that it might cause bugs
Hm. Yeah could be that it behaves differently in a single Blueprint because all the elements are attached to each other if you add them as components
yeah it's a mess. multiple threads of people struggling to make this work. ended up just rigging it in blender instead
Hello,
I have an issue that i could use some more experienced perspective on.
I have an RTT style camera actor that pans when the mouse is on the edge of the screen. Faster pan is applied when zoomed out than when zoomed in. I want to make bounds for my levels that gently push (or pull) the camera actor back to allowed ground when the camera goes out of bounds.
I have thought of two options:
1. Have BP_CameraBounds as actors with box or capsule collisions on the edges and when the camera overlaps any (or multiple) of them, then calculate the closest point on their collision edge, that is on the side of the allowed area, and apply push to the camera in that direction.
I would probably have to make them quite large, so there is no chance for the player to push the camera beyond the middle point of those bounds and then they will push them the opposite direction of the playable area. Also might be a bit finicky if i decide to place capsule bounds instead of boxes.
2. Have BP_CameraBounds the same, but also have BP_CameraAnchor inside the playable area a few units away from the bounds and not overlapping. When the camera overlaps with the bounds, a "get closest point on collision" gets activated for the nearest anchor and applies pull for the camera towards its edge, which stops as soon as the camera is out of the bounds. This seems much more safe but might require caution when overlapping with multiple bounds(?).
I would like some informed opinion on which method is best and if i am missing another method maybe or anything else. Thank you!
We did this a bit more complex for our game. Our map "infinitely" expands so we dynamically do this, but we basically define an outer convex hull via points. So basically an outline around the map with at least 3 points. Inside the movement code we check if the input would move the camera outside of this hull and if so we deny the move. We do allow moving into the hull from outside however.
Does that allow "gliding" on the hull's wall for the camera actor? It sounds very interesting
Checking if a move leaves the hull is probably relatively simple. I didn't write the code back then but since you have a list of points, preferably ordered clockwise or counter clockwise, you can find the points the player is closest to. And if you check the direction between the points and between the location and the predicted new location of the camera then you can compare them to know where the camera is and where it is going.
Sorry got interrupted while typing
It should. You can use the move vector and project it onto the current edge of the hull
And then only take the part of the move vector that faces alongside the edge (or opposite direction)
Needs a bit of vector math and some edge case handling but it's basically just manual collision detection which is usually a lot cheaper than actual collision
And you have way more control over it
Iirc C++ has some types that already are a Hull (so array of ordered points) but I don't see this being a problem with just blueprints
I will try it out for sure and come back if i have more questions, thanks a lot for the idea 🙂 !
does this have to be 1,2,3,4
i want to set the switch numbers. very strange its not in details
can only change starting index
wait I'll find you a solution
it worked when I test it
Theres probably a better way to do what ever it is you want to do.
Comparing string and switch on int is not an ideal gameplay code.
yeah i scrapped the idea entirely
struggling with the rotation of an image
making a tetris inventory system. all the items are fine when not rotated
but soon as i rotate they are offset
you could say, account for the offset. but each item is offset differently depending on the shape of it
you can also do this
im just gonan try 4 branches i think
this is the root of my problem
each blue slot is the "root" slot.
the item seems to be offset when rotated
the offset is inconsistent among different items
Whats the anchor looked like?
Can you show the item widget
im confident they are anchored correctly
the problem is in my code where the item is being placed
and the inconsistency comes from the shape of the item
the axe is too low, but the x is correct. but the book is low and to the right
other square items are consistent errors witht the book
its something in the math of how i place it
90d rotation . inconsistent
but 180d rotation the error is consistent so fixable. but only for the 180
but 90d or 270d rotations the errors are different across items
@lusty hedge that switch you wanted to do was for the 4 angles?
Cause that's probably best to just make an enum for
Then you also get a switch for those properly
If the item slots (not icons) in the inventory look correct in all rotations then it can only be a matter of wrong anchor or you are thinking about the coordinate system wrong
Maybe your inventory has 0,0 in the bottom left while the UI space has it in the top left.
That could cause all sorts or strange rotations
I'm trying to make a "battle ring" for the combat section of my game.
The blue ring in this screenshot shows an invisible wall that the player or enemy cannot pass. Is there a way I can make a translucent ring that shows up when you approach it and fades out when you are away?
basically everything is in the correct place except the axe on the 90d rotation
i think it has someting to do with the fact that it uses the items length and width to move the image
its treating it as if the axe is still 2x4 and not 4x2
seems like a simple fix but im stumped
Probably more a #materials question.
Maybe something with a sphere mask in the material based on the locations of the characters or so. And then inverted so that everything is masked that is not in range
Im trying to set the texture in my unit cards at runtime
but it always returns none
sometimes it works though
i assume its because its not loaded...
so i should load it async ?
then why does it work sometimes, or other times it doesnt?
Because the editor keeps it in it's own memory
This simple resolve works only when the asset was loaded previously somewhere. Either on an object that is already in the scene, or by calling the async/sync load node
🫡
so i should use the load async ?
there are 2 options one is load async and the other is load asset blocking
load asset blocking is working too
load async, it seemed to give me the impression that it was a little bit fuzzy at first, and then loaded in half a second
load asset blocking seemed to be instant
Blocking means it will pause the execution of the script until it is done. You shouldn't really use it unless it is something extremaly necessary to the whole game.
Otherwise it will cause hitching/stuttering
yeah will use the load sync. but i tested the load asset blocking and it didnt cause any itching 🫨
Probably either because it is small enough or because it was already loaded by the editor
is there a way to check if it is already loaded?
or it does it automatically ?
yeah it seems to be doing it automatically
no more itching
You can test with the Standalone version I believe, it partially loads it's own app so it shouldn't be using editor loaded assets, I think
But again - blocking load might not be noticeable with small assets or small projects. Still not a good idea
Hey folks, i'm lookin' to work on my save system today - but all tutorials i can find are generally just a "save player position".
I'm working on a hidden object game so that's not exactly what i need saved as i've widgets that hold bools and THAT'S the data i need saved.
Am i just misunderstanding the tutorials, will all that save without me needing to pass it on and yadda yadda?
🫡 thanks broski
the widgets shouldn't hold data like that afaik
I was wrong it's my main player that holds the data 
then save the player <-
that doesn't mean anything to me
I don't really want to explain the whole system, the tutorials should be enough. But which part do you have a problem with?
Basic save system works around the SaveGameObject. It is like a file but in a blueprint version. You can create variables inside of it, assign some data to them, and when you call save, it gets converted to a real file on the disc.
In case of a hidden object game you would probably want to save an array of bools corelared to an ID of the object that was already found.
You need to make some sort of function that will retrieve this data and put it inside the savegame object before saving. Or put it there at the moment of interaction and save after/when quitting.
Heeeaaarrrddddd, so in place of the "save player POS" like i'm seeing in the tutorials i'd need to save these bools? - not just simply create a save game slot?
Yes, you make variables in the savegameobject for whatever data you need
Yikes, so much time spent putting that data in the the playerBP
Welp, thanks non the less. guess it's time to go back and start redoing some blueprints
I mean, you probably may want this data on other actors, depending what they do, since they may need it to work. But you should copy it to the savegameobject to save it.
heard that, thanks Varael
if anyone has any ideas please help i am desperate
ill probably need to fork out some money to pay somone for 1 on 1 help
how could I async load this player menu if it returns me an object ? should I cast ?>
Is there a way to lock the normal water area and the ocean extended water to be seamless? Or do I need to increase the size of the normal water area?
Like this?
This seems a bit odd
I'm unable to get the bool to save, i'm admittedly just trying to rough it to understand before going back to make it more "profesh" - hoping i can bother you one more time
(dang screenies aren't showing one moment)
maybe like this?
Nono
Just seems odd to load the uobject itself and then get its class, implying its already created
Youd better async load the class
i've even tried forcing it in my player BP and it doesn't seem to save
I've narrowed it down to creating the save file in my player, i just.. ugh
Not sure if it is finished code, but you should continue from the Completed pin of the Async node when you want to use the loaded asset, not from the top pin.
Also it seem pointless to use a soft reference to cast to the same class right away. What using soft class there is supposed to achieve?
Honestly seems like you have no idea what you are doing and are just slapping nodes together. Maybe try to find a more comprehensive tutorial about the save system, not a 5 minut one
Friggen' facts.
I fixed it like this
I guess im trying to reduce lag
and through async loading im trying to make it more seamless
so instead of waiting for the menu to generate
if the inventory has too many things its gonna take time
so i wanna continue playing the game, instead of waiting paused
while the inventory menu generates
In all fairness. Five minutes is plenty of time to cover the savegame system from a BP and POD perspective.
A SaveGame object is just a helper that holds data that you'll write to a file on disk at the Saved folder in your game under the same filename as the Slot you use when saving.
It writes all data in it to that file.
You can check if a slot exists using DoesSaveGameExist
You can write it to disk using SaveGameToSlot
You can load it from disk using LoadGameFromSlot.
I don't disagree but depending on their skill level some people may need more, since the save system requires some specific setup and interactions between different objects
there is enum to string ^
but no string to enum
what can i do to convert the string to enum?
or am i cooked?
Use gameplay tag instead
Hello, does anyone know if I there is a way for me that I can drag only a part of a skeleton rig like live as in a interaction? I wanna make an airflow/wind effect that I am able to drag with my mouse to make the user adjust the position in which direction the wind goes and wanted to create a plane with material settings to make it kinda seem like wind. And then the user kinda "controls" drags the front of the wind/airflow so the user can see in which direction it goes. Like can I access it somehow through blueprints so the player can interact with it?
heard those are super useful, but never got to use them
Today is the day.
🫡 it is
Tldr, they are FName on steroid.
You have the power of hierachy, so you can filter.
But most importantly, no more typing manually to check a name. You define once in the editor setting and you can use it anywhere.
I was trying to define bounds for my blocking vollume and i wanted to calculate distance of actor from the edge of the vollume. Well when i had the vollume unscaled in the editor it all worked but when i scaled it inside the editor, everything was wrong and eventually i changed the "get scaled box extent" with "Get unscaled..." and i don't understand what happened and everything works.
can anyone explain it please?
I don't have the engine open right now, but box extent is not scale. If you were using the box extent unscaled, but changed the size of the volume by scaling it - it would cause what you are describing
Box extent is mostly on some basic shapes though, like the box collision
The huge advantage for using a box extent instead of scale is that it doesn't affect elements attached to it. Similar to the capsule - changing the radius and height of the capsule doesn't change the attached meshes scale, but you can scale it separately to scale the attached components too
I still don't get whats the difference between the nodes "get unscaled box extent" and "get scaled box extent" 🫤 . I just know that when i use the unscaled version, the formula (distance from box center to edge)-(location of actor inside box) works normally whether the box is scaled or not (albeit not absolute like i would like, but relative to the extent)
Well first, did you read their tooltips?
It do be like that sometimes 
i'll tinker with it a few more hours and if i don't have anything fixed, i'll post again with details and pictures of the code
I'm not super clear on how event delegates work. Is there a way to wire the play function into that delegate without creating a custom event that just calls play? That feels like needless encapsulation.
As far as I know, there is no way to do it without another Event/Function. At least in blueprints.
But personally I never really thought about it as a problem, to me it seems natural enough.
The nodes themselves (like a Play) are not tied to this specific blueprint so for me it makes sense that you can't use them without a custom block inbetween tying it to this class.
There is AddLambda in cpp, basically a nameless function which can be added to the delegate.
No such thing in blueprint.
I need highly precise timing for a metronome I'm trying to make, and this has enough variance to be noticeable. Is there some kind of more precise timing feature I should use?
Also tried this. Still not perfect.
how much variance
15ms give or take?
Hard to say. I have it going against a real metronome, and it's ALMOST perfect, but it will gradually sync and desync.
Not in that each beat is a few ms off. More like occasionally one note will be a few ms off and that fricks it all up.
the timer should average out to be dead on, that is, a 120 bpm timer will fire 120 times in a minute
but, it only can fire on the frame interval
so you have a 1 frame wiggle room that it can be early or late
I think it does, but what it does not do is have each beat perfectly on. Which I need it to be.
It's a metronome. It shouldn't mess up, ever. Or at least, not for a realistic program duration. Is there a time function that isn't attached to the framerate?
is it flamming or very much out of sync?
are you playing the same sound every time or a new one?
Heyya 🙂 this might be a dummy question but how can I hack my way around nested Structs in Unreal?
I've created a hand-written JSON file that gives an idea of what I want to make in Unreal.
Basically I want to define a Loadout Struct that points to an array of Item Classes. Each Item in the array can contain their own array of Items. I'd then have a function that takes the Struct and and recurses through it to populate the Inventory of its parent Item. E.g Player spawns with a body. Body inventory owns the Armour. Armour owns the backpack, backpack inventory owns the weapon, and the weapon inventory owns the Sniper and Canted Scopes.
It makes sense to me that I can nest the same Struct inside itself as XML or JSON because it's super easy to recurse through it with a function, but Structs internally in Unreal don't seem to let you do this? What is the workaround, other than having to store my game db as JSON / XML? 😅
FWIW I'm trying to recreate the loadout system of an existing game which stores this exact struct as XML, but it's a none-UE game so I guess they don't have the same limitation that I am facing.
this is probably Metasounds territory
Like I said, it's not that the whole thing is out of sync. It's that occasionally, one note will be out of sync and then the subsequent notes will be spaced correctly relative to that until the next mistake.
Same sound.
by how many milliseconds?
A very small amount, but it happens often enough that it will fully desync and resync with a proper metronome roughly every 10 seconds.
Does it appear to be around +- 15 ms, give or take? That's the difference between 100 bpm and 101
if so, it's the fact that timers only can fire on frames
That sounds about right, yeah.
you need to do this with Metasounds, it can probably do it sample accurate
I'm assuming the delta time from the event tick suffers the same fate.
yes that's all from the same root source, things only happen every frame, pretty much
so if you get 59 fps for a bit then back to 60 you'r drifting. It'll average out to be exact but the inter-beat timing can vary by +- your delta time
Can you notice it without a reference metronome? I used to play drums professionally and I'll tell you I can't tell a 1 bpm difference
You can definitely notice when it happens. If it was consistently off by 1bpm I doubt I could tell either, but when you hear it, it's sort of like a random eighth rest in a sequence of quarter rests.
I'll look into metasounds.
thats way more than 15ms then, unless you're at like 1000 bpm.
there's 2 things it can be, frame aliasing, or random loads/microstutters starting up the sound
either way, Metasounds is the ticket here
Maybe? It's really hard to track exactly how much the error is. The fact that it seems to be the same whether I use timers or delta time suggests you're correct about the frames being the issue.
do a sanity check
run it counting beats and printing beats / time / 60
see if you're getting the bpm out you expect
hell average them for the last 4 beats or whatever to see what the variance is
https://dev.epicgames.com/documentation/en-us/unreal-engine/quartz-quick-start
Couldn't Quartz help with this issue?
That name is mentioned in a lot of metasounds articles.
ya i think quartz is the bridge between metasounds and gameplay
say you wanted a mario style "whole world dances to the beat" you'd use that, or guitar hero
our ears are way more sensitive to timing than eyes so you'll still want the actual audio to never rely on an event on the game thread, it should live in the 0.02ms realm of audio instead of the 15ms realm of game logic
Average variance is about 5ms but occasionally goes as high as 15.
Hey, could someone help me? I'm trying to make it so that if the player touches a mob, it kills it and adds points to their score...
Oh this is perfect.
There's also this post, in case you didn't read it
https://dev.epicgames.com/documentation/en-us/unreal-engine/overview-of-quartz-in-unreal-engine
If you already have the mob and the player, you can use the OnComponentHit event to trigger the points
Actually, I want to make it so that when the player left-clicks on the mob, it kills it and the corresponding score is added.
But when I do it, it doesn't remove the mob, it removes the walls of my map.
Check the collisions settings
I checked, but I don't think it's a collision issue... but when I click on the walls, they break, but if I click on my mobs, it doesn't kill them.
Maybe I should make a branch, right?
Well... are you on a top down game? I would just do a line trace, that also gives you a HitResult
and get the HitActor and Cast it to your mob so you make sure you are not deleting any other Actor
if that's all you want, then it should suffice - if you later want to expand on this and be able to destroy more things than just a mob, I would suggest you look into Interfaces
At the interfaces? To add points to the scores?
Blueprint Interfaces
This code will kill any WorldStatic object. Which includes the wall and the floor.
Think about the logic.
The solution is simple, do a type check of the actor that you hit
From your hit actor, cast to your Mob actor. Then destroy the actor.
ive made this controller to move a pointer mesh in world along where the mouse is, im trying to make a system where u can click on items in the level and move them w the mouse but im not thre yet rn im having the issue of the pointer not being able to follow the mouse cursor when i move the mouse up, which yea im setting the location of the trace thats firing downward. but im trying to recreate essentially this
isn't there a node for that ?
get hit result under cursor or some variant of this ?
theres a node that gets a trace under mouse but it dosnt run every frame it runs once
ya you run it on tick
