#blueprint
402296 messages ยท Page 745 of 403
Either way can work. It just depends on what is easiest for you in that situation.
Also, the delays are there so that each light can start at a slightly later time than the other, looks a bit more natural
What doesn't work is Combine Rotator. This function is fucking screwed. :/
is that on tick?
i mean, you even have the hours apparently
so you can just make a select node for the daytime enum with int as selector and values of 0-23
Hm. Yea, because each button and text is apart of a row that has values relating to a certain struct, ie: name, price, quantity, and amount. So it would just be a long line of the same code unless I could somehow create an array function to create as many rows as there are items in the map variable.
in which class would you put that get game time function? Sun?
Get keys -> create custom subwidget, save in a subwidget array?
well I mean I am just using Current Seconds to determine what time it is and just checking if it's in a range, so isn't that the same as what the function is doing
yea, your current "logic" is confusing as hell
it started off pretty good I swear
yea, until you started adding nodes ๐
essentially I just need to check against current time variable to know whether I want to do x or y or whatever
no
you have to take the time of the last tick into account
that way you can get onetime events
if hourLastTick != hourThisTick => hourChanged()
and so on
I think I tried doing that with the boolean earlier, because the boolean would remain the same until flipped, no?
or does tick still claim a 'new' state for the boolean even if it is the same value
yea, but a boolen isMorning is stupid
if you can have a enum which actually represents the daytime
unless you want to end up with 20 bools
it's fine if it's stupid, earlier I was told I should just make it work and optimise later
no thats not fine
you should try to understand this
otherwise all your future blueprints get bloated
and at some point you lose it
I'm trying but I can't get to the part where I can confidently put the nodes in
for now at least
I was looking for enum tutorials but they;re too simple
in my case I have all the other things to balance so it's more constraints/conditions
well, get it working first is not a bad advice to understand it
but you shouldn't keep it like that before moving on
yea so I'm still at understanding it phase :p
of course I will change it to something better, I've done that to nearly everything before this
as I understood better etc.
often doing something else helps reorganise the earlier problem ... I literally have dreams about making blueprints and sometimes they give me better answers lol
anyway, where are you calling 'get game time'? As in, you 've shown the inside of the function, but how is it logically tied outside the function?
UpdateSun is the previous node -> right now I have the Branch checking for the Audio playing conditions -> if true, Call Event Dispatch
somehow like this
while i grabbed the first best event dispatcher that i had in that class ๐ (^^ that would be for the sunbp)
do this check to figure out the threshold for each time of day. if you have 4 times of day (dawn, noon, dusk, night), then define the time when those happen, and send an event dispatcher only then. at least, that is how I would approach it
Wouldn't this be it? I'm only firing the event when it's time for the audio conditions
you also whittle away points that are redundant that way. for instance, you know the end of dawn is the same as the beginning of noon
you fire it continuously between two times
well he is catching it with the do once
which is a hacky workaround imho (and still doesn't have a reset condition which would add more logic on top of that)
Wait you have a current daytime variable, what is that storing? A full date like Tuesday x y z?
okay right
colour blind so it didn't register for me
I need a break before I make this function ๐
i know that feel ๐
If I have a Structure full of Integers, how do I put that data into a text in a widget?
The below returns 0 always.
And yes, the Structure is receiving data from other sources which update correctly, but never in widgets. (Pressing E to add Raw Iron in this example)
Even going direct to ToText node without setting a new var still gives this issue.
Ping me with any comments please, thanks.
try with the FormatText node
the method looks fine, only thing i can imagine is that it's not correct bound to your UI or that Inventory doesn't get updated (even if you say so)
Done lots of checks to ensure its updating, certainly is, hence the confusion here,
will check
Okay, so, some more checking.
If I manually set the number inside the Structure, outside play mode, it still returns 0.
However, when running prints of the inventory structure, its returning the correct number.
So everything besides the Widget is able to read the data of the structure, and I have no idea how to fix it...
sounds like BP structs are at it again
where are you parsing the struct to the widget?
?
how does the struct get passed onto the widget?
I create the Structure as a variable of itself
inside the widget?
currently, spamming a button via my player
but it also didnt work when I set the value inside the structure to something other than 0
but the other reference inside the player, knew the new value
I mean you'll have to show me your code
yes but the one inside the widget
I use the same Inventory var, made the exact same way
so... you're not setting it inside of the widget graph?
if you're not parsing values into the widget, how is the widget supposed to know your values?
can you show me where you spawn the widget?
I thought it pulled them from the structure, and when I pressed Q from my last image, it updated the structure.
is this inside the controller or player?
player right now,
alright try exposing the struct in the widget on spawn
then refresh the widget spawn node
then parse the struct variable from your player (where I assume it is) to the widget on spawn
let me give it a go,
@spark steppe sorry to ask again but do you still have this drawn up, or could you elaborate on what you're doing with hour? It cuts off at the bottom
Are they conditions you check?
This works.
If I reference it from my player it updates. Not ideal, so now Ill set the new var in the widget to update from this. Will probably work.
Thanks for the help btw, just seemed to get confused where the data should be coming from
right but why didn't you try what I said? that way you don't need the cast or player node
going to try it, but your thoughts gave me a thought as well
so I tried it
it's just a select node which takes the hour as input
and has the enum as output
it does? But you haven't plugged anything into it
does anyone know how to make player keep jumping when we keep pressing the jump button Thanks ๐
unless you mean some sort of auto jump where you'll jump again as soon as you hit the ground
That would be different, yeah
would that require an inputbuffer?
yes i want this
I am sorta confused.
I made a function named StartLevel and it takes a input of LevelName being a string, I want this to create a widget then set a variable inside that widget(the text) to be LevelName
is this possible? if yes, how
ยฏ_(ใ)_/ยฏ
thanks but i already found easier way Thanks though
if anyone wanna make auto jump here is an easy code
I'm assuming this is possible? what's the actual goal of this feature?
ALS (V4) uses an entirely different setup for the camera, unlike the normal Third Person BP.
Yea, I know.
let me explain it in a different way, I would have a notification system. there could be a function named CreateNotification and it takes a input of title and text. when you call that function it creates a widget, adds it to the viewport and sets the text and title of widget to = the input you provided. there might be a better way of making this but it's the only way i can think of
Good, then go for the camera system BP.
and then? I need something helpful and a line. Not just a word or a component.
Is there a way to SpawnActor node to have options avaialble in the linked class if Select is used as Class input?
I'm a little new but could use some help on where to start:
- I want to start out with a galaxy, and when you click with the mouse it zooms into a solar system. I'd like about 10 different solar systems. Anyone know how I would/could start this?
make a new unreal project
that's a good start
Probably think about how you will structure things
- have an array called Galaxies
- Galaxies will hold the number of solar systems, which themselves could be arrays too
- pressed/released events for the mouse (on clicked e.g.) would fire off events for zooming in or zooming out
Thanks @bright frigate , appreciate it. I'll start with that.
bind the text to a new string/text variable on the widget bp
weee
there might be a smarter way of having one widget have multiple little notifications
what is Player Widget
a new variable I made for later use
Not to be mean, but it is.
You can't set the value of something before you've created it.
wdym
You have two set nodes that have the widget you're creating as a target before you've created the widget. You should put them after.
Or, on the widget itself, mark those variables as "Exposed on Spawn" and "Instance Editable" then you can feed the values directly into the create node.
Hello I am currently having some problems with creating a quest in unrela engine because my quest just doesn't display can anyone help me?
Hi guys I have a weird problem with my boss blueprint actor, idk why but in his memory there is my player character (RBody_BP) that takes most of the memory but normally he shouldn't appear in this character's memory that much, here is a screenshot :
UrLocalLeader, just post the question until someone answers. Also if it's widget specific you can also try asking in the UMG chat a few channels below.
Misterrider, that's asset sizes, which includes references.
@trim matrix You probably have Reference to your Player Character in your Boss Blueprint.
It's going to load it in memory too
ok, I thought it wouldn't impact this much the memory due to a simple reference, thanks
This solved it for me. Thanks ๐
thank you!!
Yeah anything that's referenced gets loaded. It's one reason to use a thin parent class or component to interface with (or a BPI) instead of referencing the full fat class.
I can't find "Start Recording Sequence" in actor. I found it only in editor utilities. I am working in 4.25 and also when I trigger it with editor utility widget the sequence got created but nothing recorded it's blank.
Please help it's urgent.
And how to render sequence at run time.
Hi! Does anybody know, where I can find logs from a Project Launcher game session (Win)?
Not exactly sure this is the right place, can I hotkey the collapse actions?
How come attach Comp to COmp doesn't work properly on socket in IK bones?
I have an EndTurn Event (turn-based combat) triggered by AnimMontage (on DamageTaken>PlayMontage>OnBlendOut>CallEndTurn). It's all nice until I have AOE damage which triggers the same event for every unit hit, thus skipping the next x units in the initiative chain. How would I go about only triggering EndTurn for the last AnimMontage which called it, without slapping on delays?
I can't have a bool that takes the first one and ignores all the rest because then, I get other problems with the AI and longer (death) animations.
Hi guys, Im trying to simulate ocean currents/ random swaying movements caused by waves on my character but I cant seem to get smooth inputs I only get impulse like movements, Ive tried Add movement input, add Impulse and. Anyone got any tips I want smooth swaying movements in random directions. This is the current result
@safe sable however it is you're generating the force, you probably want to apply the force on tick (scaled by delta time or Get Delta Seconds). So within your current example where you're making a new force value every 2 seconds, you can save that to a variable which then gets applied on tick. It may look like the ocean current is suddenly changing direction every 2 seconds but at least you'll have solved the start-and-stop motion problem.
https://discordapp.com/channels/187217643009212416/221798862938046464/902110595950731324 Need urgent help on this. please help.
thanks in advance
@tight schooner ok thanks Ill try that
@tight schooner looks much better now thanks
Sounds very unintuitive to have end turn based on anim notify
@gentle urchinThe old one was just based on a delay - I didn't like it. For some anims it was too long and felt slow/boring
But I fixed it (I think, testing it thoroughly now - as thoroughly as one can before realizing it wasn't thorough enough, u know). I'm checking to see if all finished animations. If they all did, the endturn goes through, if not, it does nothing.
The way to do this would probably be to track which actors are currently "active"
A turn is usually more like a currency which allows you to do some action. Once the action is done, player is out of turn(s) and the next player is granted a turn
So your animation notify or other event would instead trigger "actor finished its thing"
and you keep track of this, and then trigger end turn once all actors have triggered this
Hello, this is my Master Charactet BP it contains a widget which is displaying the name, healthbar and class icon above a players head. how can i make it, that only people that share the same team can see this? googled a little and people built it completely different
Uhm... Yes, I think my choice of words was clumsy. It's rather "EndAction". Fek! my bad! :/
The turn itself is initiative based
then it triggers on effect
The system worked as intended with the old delay system, I just wanted it to be "snappier", more precise. I know it works since I have a game up on steam with the system and It's been tested for over a year
That one was indeed based on current unit's action + delay to allow for hit/death anims to finish before passing the action to the next in the initiative chain.
Maybe I'm just overcomplicating things ๐
I think it's a sensible idea to actually track it instead of delays
basically when an actor becomes active for any reason it would just increment a counter, and when it becomes inactive it decrements it, and each time you'd just check if the counter is at 0 yet
this is a much more reliable way of doing it than using some system with delays where they might or might not be accurate - if you wanted you could always add a delay after the counter reaches 0, that's still a much better solution imo because you're just using the delay at that point for a visual effect instead of "let's use this to wait for stuff to finish"
Exactly! I had so much debugging to do with AI taking as valid a unit that was actually dyeing. And yes, it's just cosmetics.
Yepp, this makes alot of sense ^
Hello friends, I divided my screen into 2 vertically from the picture above, in this picture, I assigned the camera controls to the right side, now I added a switch to operate both sides separately when 2 fingers touch the screen. how do i block
@earnest tangleCounter sounds good, and adding to it isn't the problem, but rather timing in subtracting from it.
For instance: Attacker (A) hits 1,2,3,4. Say 3 dies.
When it does, it has a rather longer animation+particle effects etc.
If I base the end action on the attacker's anim, 3 would still be in death anim when the action will pass on, since the attack animation is long finished by then
the others are just "hit"
Right, so when any of them become active (eg. start animating) you increment the counter
I would assume if they get hit they would become active for this purpose
not really, no, depends on skills/if skills have retaliation/other after-effects
they get hit, they play the anim+particles+sound and that's that
Yeah so I don't see the problem
if they don't do anything then they won't increment the counter
if they do, they would, and thus prevent the turn from ending yet
so, on receive damage () they increment the counter only if they're about to die (since, as a safe rule of thumb death animations are longer) or react?
Yeah something like that
Ok, i'll try that - thanks! ๐
Hi all, I have a problem with the node "Play montage" and the pin "notify begin"
someone can help me please ?
I see that the "notify begin" of my animation is not always triggering at the same time
so it makes my "spawn actor" transform not always the same..
Hey, I'm currently running into a massive issue. I have a Struct which contains a ton of data for how a weapon should work. Once I continue to work on it and notice I need an additional variable and add it to the struct. This entirely wipes all data set in any weapon blueprint in this struct.
I'm on UE4.26.0 right now and this is slowing down the progress like crazy. Any idea why this is happening?
Structs behave weirdly when changing them, however I noticed that reloading all blueprint classes where the struct is referenced fixes the weirdness most of the time. Did you already try that?
(that's how you reload a bp class)
sorry to ask help again but no one had my problem before ?
@cobalt lynx you could also try creating a data asset for it instead of a struct. This might work a bit more reliably, plus allow storing them as individual assets
To explain better : I think that my notify begin is triggering randomly
Yeah tried this. Structs are entirly wiped all the time I add a new variable
I'll check out data assets and if they work well enough
@earnest tanglepffff... I get extra calls on the add to counter function. I just can't figure out how. I even tried to plug it into anim notify's "hit". It still gets called by the same unit twice sometimes ๐คฆโโ๏ธ. But it should work like you said, the idea seems what I need.
Maybe you shouldn't run it off the animation, but rather from the logic that triggers the animation
nvm, i'm an total cretin! The skill itself was doing hp+mp damage god damn it!
heh
hence triggering the hit twice, one for each. At least I've learned that even if the anim doesn't actually play twice, it still triggers the notifies twice - or does it ๐ค
it probably depends on how you handle it
Hey guys, I'm trying to add a 'timeline' node to my blueprint but when searching for 'timeline' or 'add timeline' nothing appears
if the notify is on the very first frame and you start the animation twice, that would probably consider the first frame to trigger twice
but if it was later in the animation it might not
@restive oracle are you inside a function or the event graph?
inside a function
latent nodes such as timelines only work within the event graph, since functions cannot be latent
I see, thanks a lot for that ๐
timelines also are not everywhere avaiable
Not sure, everywhere I've tried to use them they've worked (as long as it was in the graph) lol
timelines are only available for actors
Ah. Have you tried using it in a uobject which has a GetWorld() defined in C++?
I know certain nodes like Spawn Actor will not work in an uobject unless it has that declared, so perhaps timelines have the same limitation
Timelines are basically ActorComponents
Oh I see, yeah they probably would be limited to actors in that case :P
Why notify begin of Play Montage is not precise ?
<@&213101288538374145> ^
Hey folks, is there a way to disable motion blur via options style? I'm not seeing a way how through the post process
check the camera settings
Set the amount to 0
Aye, it's in post and camera
by default it's greyed out
Wait, yeah by default it's on at .5 haha
gotcha
Early morning haha
Or console command r.MotionBlur.Amount 0
I think I'll just use the console command to be honest
So the next question is, will it set to 0 on the camera AND post?
I could just simply set it to 0 on both for good measure
Then again, sometimes the post takes over the camera settings I think right?
@earnest tangleGood! Tested properly and ur method works in all scenarios (I could think of so far), thanks alot for the help ๐
nice :)
Can i cast or target to level blueprint?
no
You'd better have a persistent invisible actor BP in your level.
How to do this
Basically an empty actor, with some BP scripts and variables, stored somewhere in the level.
U say persistent how to make something persistence
It's right in the last line.
Well at least it persist throughout the level, which is exactly the lifespan of level BP.
i wonder if those "management" actors don't get culled away or slowed down when far away from the player?!
is there a way to write text to a file without using c++
there's a free plugin on the marketplace for it
The distance shouldn't have effect on the calculation, and it can be kept in the centre if world origin shifting is enabled.
I'm trying to make a cone (An static mesh attached to the character) to rotate looking at the mouse in the X and Z axis using the SideScroller template, but I can't figure out how
Right now I get the mouse position with this
But, using this value in the look at make my cone move very little and not even facing the debug sphere
is there any way for me to save data with blueprints?
If you mean save your game: https://docs.unrealengine.com/4.26/en-US/InteractiveExperiences/SaveGame/
If you mean writting a file to store data, you need to use C++ or a pluging
can you constrain mouse to certain area of screen?
probably by forcing it back inside the area if it goes outside of it
yes that sounds what im looking for
use min(mouseposition.x, screensize.x) and max(mouseposition.x, 0). you can substitute for your own values
you'll need to do the same for y
hi
how will you stop that loop tho lol
Can touch input be triggered by a right-click? I have UseMouseForTouch on and everything
What's the debug command to see which sound wave is playing actively?
Hey guys, a quick question
If I want to set a reference variable to null, then I can just use a 'Set' node without plugging anything in, Right?
Or is there another method of setting a variable to null?
@sharp rapids Yes, just SET the variable to nothing in it, keep it blank. Do so before calling the actor/thing to destroy so it garbage collects
Or do it when you need it nulled
@gusty shuttle ah, okay
Thanks
in c++ you can do MyObject->IsA what should I do for blueprint?
Maybe au.Debug.SoundWaves?
Yeah I keep trying it but its not showing any oddly
I've done it before not to long ago but I forget the actual command.
Aye, I had to add a 1 after soundwaves. Thanks man!
You can do ClassIsChildOf(MyActor.GetClass(), c) in place of MyActor.IsA(c)
where can download GamePlayAbility system plugin
It's built in.
How can I render a sequencer to a movie at runtime?. Please help its urgent.
Can I access these node (movie pipeline Queue engine subsystem) in any blueprint like actor?
Thanks for the reply.
Hi, how do i make the ESC key open and close a pause menu, normally i'd flip flop it but im not using the Set Game Paused node as its multiplayer?
You can still use Flip-flop node, just without Set Game Paused node.
Interesting.. for some reason that isn't working
i would rather poll a get all widget of class and search for the "pause" screen
if it exists destroy it, if not spawn one
or if you just hide it switch on the isVisible bool
What is your issue? Looking at the screenshot the Pitch is 0 and your branch prints "ROT IS 0" which seems correct
so this should be working?
Yes, though on second thought, might as well replace the Flip-flop node with IsValid check macro.
yea if you store the reference anyways, make the pause menu get an validated get
then you can branch from there
Like this?
no
rightclick the variable node and select "convert to validated get"
that saves you the branch and the other node
the logic is kinda the same, it's just cleaner in the blueprint ๐
So like this? @spark steppe
Hi, I'm trying to do something very specific with texts, strings and arrays.
Basically I input a text, i Parse it into an Array and this is where i don't know how to do what i want: I want to replace each word of that array (example: duck) with themselves plus a text tag (<Tag>duck</>)
I was thinking an each loop that sets the same variable over and over?
yea
you can remove the first normal pause menu get, and plug it to the blue pin on the validated get
to clean up a bit more ๐
stumbling in a help channel and offering payment upfront is pretty risky imho ๐
Thats still not working, it opens the pause menu but wont close it, does it have anything to do with the Pause Menu BP?
no, that looks fine
it's possible that your menu grabs the input focus and you never receive the ESC press on the other blueprint
put a print string before the validated get, and check if it even fires
Yeah it only fires once doesn't fire again
Listen to input action
^
So input comes from external to open, and is listened to internally to close
ah yea you have set input mode ui only, haven't seen that before (as its in the widget)
Thats atleast how i set mine up and it works like a charm
Thats also a no go ๐ good catch
that should be fine, not?
well, depends on what behavior he wants, but usually on menue screen you don't want input actions for the game
True. I use time dilation for it, but theres also a ignore move input avaliable
only later would work for him, as its multiplayer which cant be paused
Yepp
so I am trying to make a one piece fan game for fun and im stuck on trying to make a system to where you have certain abilities at first but when you eat/remove a devil fruit those abilities switch with different abilities/diff character and for whenever you switch that devil fruit with another one
I've tried but can't come to a good stance
Ive tried it this way but once i set the input mode to UI only it wont work after that
how can I get and save the current players location? I don't wanna actually save it as a save game just hold it in a variable so I can use the location later
Get Actor Location node
alright
True that. It needs to be game and ui, or game
I don't know where to ask this question.
So I've done a demo movement for a flying pawn. I'm moving the root object forward and left right, the pawn is the child of that root object and should have collision. The issue was that the root is moved forward and the pawn that has collision just clips through walls and it should somehow inherit the collision, so if the pawn hits the root should make some sort of a bounce crash or something.
But if i do that the character can move while on the pause menu
Thats only stopping movement you can still jump and if i hold the LMB down i can also move the camera too
For that part id just setup the listen events and consume them in the widget
When they're unused i just blind them
For good messure blind is just a function that contains a print string which says that its blinded.
Ive done it this way and it seems to work
Sweet. If it works to your criteria then all good :)
Thanks for ur help!
how do I migrate blueprints derived from cpp classes to another project without unparenting BPs to actors and UserWidgets? I don't really want to set up all my blueprints again after migrating
Where would be the place to store global data or hashmaps? That is, Rarity-Color pairs for UI and Text etc.
hey so
how do i stop media player from different bp?
i have escape menu widget and a media player widget
and i want to use the escape to stop the media widget yesi know stupid question
Do you need them to be tweakable on runtime? (i.e. saving/loading) => Game Instance
Do you only need them to be tweakable inside the editor? => BP Function Library (Pure functions)
Would be my way to go at least.
either a specific actor, subsystem or function library
any of which may draw data from a data table
What is the best way to move a pawn forward?
It's also causing a weird shadow behind the static mesh
add local offset is the same as set location
it's going to be choppy at the best of times
if you can't use a movement component (which I strongly suggest)
at least try with impulse
What's the difference between Collapsing into Node, Function or Macro? Any performance differences?
I'm trying to tp my character into the air, whenever this code is run it just teleports my character into the air for some reason. why? The default value of readyToTeleport is false so it should always get playerPosition first click
I put it in and the issue now is that it's not possible for me to see the speed in real time
ye
welp even better
Velocity is a vector, speed its magnitude
no math required
Velocity = Delta Movement / Delta Time in case
I have floating movement ๐ฆ
should carry velocity all the same
Delta Movement is world location at this frame - world location at previous frame
works the same
Speed in cm/s
well, uu/s
just saying
Be careful about what is appearance and what the physics engine returns
These are the default settings
so I would assume it would return this. On the other hand, it wouldn't make any sense to return distance in cm but velocity in m/s
Those settings are under Editor Appearance iirc
It means those are the units the editor will display
Not the units the physics engine is using
The physics engine works in cm, s, centiN and centiN cm.
alright, good to know
Have done enough vehicle physics to have learned that the hard way ๐
wouldn't the velocity in m/s still be correct without division though
Velocity come from where?
GetPhysicsLinearVelocity returns cm/s
cm
I think that's different to what components return possibly
I think you are still looking into the appearance section of the editor. That is how the editor will show values.
I don't know to which extent the components use physics
yeah but "show the values" I guess also means "the value of a function return"
or so I would assume
Regardless. Also GetVelocity returns cm/s
otherwise, why would that setting even be there
No, values shown in the edit boxes in the editor
I've not seen a single box anywhere say m/s
Me neither, thatโs why those settings look like legacy to me
Unity uses m and m/s but we never mention Unity on this Discord
Oops
The fact that the default walk speed is 600 makes it actually pretty clear that the units cannot be in m/s
which is 6 m/s, which makes sense
A really fast walk yes
he's right, we got defeated
Letโs say that I have been through this before
is there a way in BP to make "touch" collision without the use of collision?
For my vehicle physics I have created wrapper for all physics functions to have them use m/s, N and Nm
Otherwise it is impossible to compare to values from real cars
Scene queries?
Like line traces
that's collision though
No, because there is no collision resolution
a line trace hits something, a collision channel or a collision object
that's collision
Technically they are scene queries
No because there is no narrow phase nor collision resolution
Hey hey!
I just need to make a simple blueprint that when a player clicks on an object, camera zooms and focuses on that object (tree), and then again to see it a lot closer (ant on tree) Anyone have any ideas how I can accomplish this?
a very big tree and ant you can scale down/up
You can calculate what are called analytic collision
Yes, but I mean the blueprint to change between cameras (to go back and forth)
set view target with blend?
set view target with blend and add a camera to the object
You can offset the camera toward the tree and the ant
set the view target to the camera on the object's bp
Hey ya'll - is there a way to edit/hide the text caret in UMG?
For editable text boxes, etc.
will it be vector calculations or something different?
google does not return great results
You take advantage of the shape of the colliders to come up with an analytical solution
Sphere with sphere
Sphere with plane
Not much, in fact it is at the core of the physics engine
the physics engine is by and large expensive
No surprise the collision primitives are spheres, cuboids and capsules
PhysX and Chaos never got a native cylinder
if I am using that I might as well just add a collider it seems
capsules would have less data points than a cylinder
the cylinder is interpolated
it's just two spheres
and a half height
hence, 3 data points
What are you referring to?
and they could make the cylinder work as a cylinder without sphere caps
which they can't
I wrote capsules
Cylinders are not primitives in Unreal
Other physics engine do support them as primitives
So they have analytical solutions to check for collisions with cylinders
the point I've understood about cylinder use in UE is that you can interpolate the positions between two spheres much more cheaply than you can by creating an extra cylinder shape
for collision
that's how they optimized it to just have 3 data points
anyway, analytical collision sounds like it's the same as putting down a collider
If the cylinders are colliding laterally yes
which is a last resort
If they are colliding in other ways no
if they are colliding from top or bottom that would be one data point, one of the spheres
Yes but it has to work for any rotation of the shapes
that are also the only points used in the calculations
the sphere uses its center
- radius
Center and radius
but that's still one data point only
Itโs 4 values
Not sure what you call a data point
sphere is 4 floats
Cuboid is 3+3+3
9 values
Center
Rotation
And the 3 dimensions
Capsule is 3+ 2
Sorry 3+3+2
that would mean that cubes are the same as capsules, since capsules use 4*2+1 according to you
They are different shapes
capsules are two sphers
Their analytical description is different
and a midsection
We are in 3D space so you have location and rotation
the capsule shape does not change per rotation
it does change for 2 out of 3 rot.
No but the rotation affects how it collides with other shapes and that is the whole point
the shape remains the same
Correct , a capsule has one symmetry
the rotation changes, but that's irrelevant
In fact the engine uses the symmetry of the capsule to optimize the collisions and the overlaps
Folks great discussion, TBC
Itโs bed time in this part of the world
same
๐
Any ideas on how to get an actor reference from the level BP to another BP?
Have an object Hierarchy that I need to send data to a Builder BP that is spawned by Level and its instance is saved in levelbp. But I can't figure out a way for the ObjectHierarchy to "know" who to send it to.
you can do it in a few ways, but the real question is why
Using interfaces
if you're just hacking stuff together, use GetAllActorsOfClass
otherwise I'd advise you to look at your architecture
Which is better for performance or in general. Promote to variable or clean wires with nodes?
@obtuse herald@odd emberFunction library sounds like the ticket. Just want a global data table lookup without any specific actors. Thanks
cpp
making variables are better, because understanding matters more than performance
at least until you ship
yeah i agree
I think wires are probally better than variables tho but dont know for sure
the difference is going to be minimal
if you want to save performance for real, use cpp
anything in BP already costs 10x as much to perform
so throwing a stick on a blazing fire isn't going to make much difference
Speaking of performance, i heard about some devs putting a lot of their logic in the game state blueprint and then just grabbing variables and functions from that instead of having a bunch of different blueprints casting all the time. Thoughts?
You have proof of this?
I mean, structure and scoping matters as well
Just because you can doesn't mean you should
Priority one for me is organizing and trying to make stuff maintainable
Split screen in single player - Anyboby knows how to approach this? I am using the scene capture component to do something like this. But it is far from perfect. AA doesn't work, lights are wierd etc. I would like to render two actual cameras on a single screen. I know this can be done with multiple players but before I experiment with seting up input for that, I would like to know if there is an easier solution.
its a known fact
I don't know of any solution on the top of my head that doesn't require cpp. as far as I know you need another viewport, and that's cpp only
Possibly the get game state or game mode nodes are more performant than casting
game state flushes every time you hardload levels
you might as well use level blueprint at that point
Can you do behavior trees or ai in cpp? Thats pretty much a tick isnt it
but no, if you want to approach something with massive performance gain like ECS, you'll have to do things differently. atm there is no easy way to do it in UE4. but UE5 will have an ECS system that is extendable
I haven't done any AI in cpp myself but I know kaos spectrum created a blog post or something alike about AI in cpp
you can do behavioral tasks in cpp
I get a lot of question on Unreal Slackers Discord about custom BTTasks in C++, how to create and someContinue readingAll about BTTasks in C++
also, the BT graph isn't blueprint
it's just another interface that looks like blueprint (like the material graph)
the tasks themselves can be either BP or CPP
same with decorators, services etc.
I'll have to read what he has to say sometime soon because my AI is killing my FPS
Not even that many, like 20 but the game is all about AI and I hope to be able to cap out at around 2-300
They check a lot of stuff, depending on what they do
you'll need some massive amounts of optimization to make that happen
unless the AI is very simple
like RTS AI
and even so
you'll still hit a hard cap
The AI is supposed to be completely self going since it's a bit like a city builder but I'm just doing stuff badly
consider most FPS games out there have 120 to absolutely max 250 AI per level
ah so like pedestrians?
Not really, more like sims on a village level
Yeah that's no worries
use a world subsystem to create an AI director
Only thing is that they are all independent
what do you mean?
Like they don't need to do the same stuff at the same time if that makes sense
sure
basically you can have their needs be local, perception be local, and then have them communicate with the director about what to do based on needs/perception
Everyone has different jobs different locations they live etc, I honestly have too bad of a understand of game architecture overall to make it highly optimized
but for the number you want, you'll have to find clever ways of turning them off or making their ticks much longer and interpolate their actions between ticks
Currently I have an actor that creates a thread every X ingame time that updates their activity weights based on their needs
Not a single thread for every NPC but one thread and it loops over all NPC's
Is it possible to see which BTTasks are the most demanding?
think of this as AI LODing
the profile should be able to show you what's what, but you're probably better off asking in #cpp
Luckily they don't use perception
Yeah I was actaully thinking the move might be pretty heavy since I think it runs on tick no?
everything runs on tick if it's a behavior tree
Is it possible to somehow change the tickrate?
but AIMoveTo is a heavy task yes. pathfinding is expensive, and it has to have a chance to update dynamically if something gets in the way
you can change tick rate on every task
it's exposed in the BT
Ohh, I'll have to check that out tomorrow
Move to could probably be .1-.2s without it looking too bad
Yeah for sure
I am not planning on the game being too focused on graphics and the looks to begin with. Of course you need it to have some sort of baseline for immersion but I'm more focused on the actual systems
also where an AI director could come in handy. if the pawns all register to the AI director, then the AI director can cull their tick rate based on distance. or even deactive them
What would the AI director even be? In terms of class and such. AIController?
It's far too late and I'm too tired rn but I'll keep a tab open for tomorrow
good luck
Thanks for the insights
I saw this if you are a money spender https://www.unrealengine.com/marketplace/en-US/product/world-director-npc
See above
I prefer not when it's not needed and I think the biggest problem right now is that I've just done it poorly
yeah me either rather learn it myself tbh ๐
Sorry
So i have a messed up situtation, i was playing with a menu template and there was a gamma slider, i slid it and now the gamma for my entire engine has changed. THis is the BP for it, idk wtf happened
u can see its all dark
so, got a real weird issue, no clue whats going on but it feels like someone out there might know the answer.
for some reason my gamestate object isnt correct when I launch the game from a standalone [ie, right click, launch game] but if i launch in the editor, even in standalone mode, its right, i know its the right gamemode, just the gamestate is the 'base' one when i launch via the right click menu.
also, it works fine with a packaged build... so weird this one thing doesnt work.
welp, i figured it out, def a learning experience there, you'd think unreal would just crash if a class was missing from a blueprint, but nah it just falls back to a valid type, had to rebuild in development editor to get it to work, was using debug editor to test some stuff.
Why does my timeline keys stay linear when selecting user?
/how do I change the user setting?
To default to an ease
Rotate the tangent handles
I know you can manually do it, but there should be some way to set the user default. I'm following a tutorial where when the user option is selected it automatically does an ease on both keys, as if that is the specified user preset - easing.
can I use something like an enumerator to select from multiple object types? I'm trying to make something that selects what icon to add to a UI element based on another criteria
Hi everyone. I want to add in some keyboard and gamepad use for my document reader, but for some reason my usual method doesn't work.
@swift yarrow Not sure why it's not working if it does usually. Initial assumption is that the Widget isn't getting keyboard focus. On a side note it might be safer to make a local map of Keys mapped to Integers and switch on those, but if this was working before I doubt that's necessary.
I have set the widget to be keyboard focusable like prior examples. Not sure what I could be doing differently with the document viewer.
Unsure. You could try testing by setting Keyboard Focus on the widget's tick to itself. If that doesn't work I'd start debug printing in the on key down.
Can I save a structure or mapped variable in save game object?.
Of course. The only thing you cannot save there(you can, but should not) are hard pointers.
Any form of basic data can be saved into a savegame. Structs are a very important part of organizing data for that, and that becomes even more true if you ever get into C++ and start serializing your data down to bytes.
That makes me wonder, is there any pros and cons when it comes to save data serialisation, like the ability to make custom save data externally.
It seems advantageous in being easier to deal with code-wise and takes less space
Need some quick help here, how can I make it so my character doesn't deplete stamina while they're standing still or while in mid-air?
Having this issue when rendering a sequence to a movie video out put base. please help.
It worked when I pass output png but crashes in video.
I'm having trouble parsing what's going on in your graph cuz you got an event tick going into delay nodes, which is a big no-no. If you want something to happen periodically, use Set Timer By Event with "looping" checked, and connect the red delegate pin to an event, and then you'll have a periodically firing event that you can stop, reset, or otherwise control.
The problem with the node graph in the screenshot is you could potentially have many delay nodes activated simultaneously so it's hard to know what's actually going on at any given time.
You probably just want one, periodically recurring event that
- checks the state of the player and makes a decision on how to alter the stamina, and
- alters the stamina
Hi guys, I set up a basic box trace system that checks if an actor has an interface implemented and executes code accordingly but for some reason the trace does not detect any characters/ static meshes it only detects the basic actor I made. Anybody have an idea what might be causing this? A character is a type of actor so it should detect it right? UPDATE: it was a collision setting causing the issue
this is not the same as true AI. this is more likely some sort of crowd system. the golden rule is that you can't have your cake and eat it. if you want more functionality per AI, each AI will cost you more and you will be able to use less of them per level. if you have 100k AI, then what each AI does is going to be very limited.
Centralizing the ai into some ai master mind would help with this
But even with the ai itself superoptimized, your gonna hit limits on animations and everything else that goes along with it. But thats another chapter
In my game, I made it so that when the player clicks retry, when he dies, it loads a random new maze/level, however I want to make it so it always cycles, but it never loads the same one
Is there a way of doing that?
Right now it loads either level 1 or level 2, when I click retry, but I wanted to make it so it never loads the same one twice
Never the same - through a session or through a save ?
Im not sure
Oh
Just not the same as the last
I see
You just need to store the last loaded level
Either by gameinstance, or by a savegame
I want to record sequencer in game with all things like material change, animations, etc. All at runtime like twinmotion. Anyone knows please help
feel free to read through the discussion from yesterday
I figured it out, I also redid a bunch of it! THANKS
I'm making a game with airplanes and the movement component isn't working how I want it. Is it possible to not use a movement component and still replicate the movement? I want to use loca offset nodes to move the pawn without movement component.
Hi guys, I'm wondering if there is anyone who could help me with an issue I'm having regarding pawn possession. I'm working on a project for my final year of university and I'm trying to take control of a ship by interacting with the helm but maintaining the perspective of the player. Like you might see in Sea of Thieves, can anyone help me with how to do this?
Heya i am trying aiming from a top down mobile shooter and I use an arrow component to spawn bullets and i need to rotate it 360 degrees around the player so you can shoot in every direction using gamepad like controls so i used Gamepad Right axis multiplied it by 360 and i used set relative rotation on the arrow it works But for example when i move the joystick to left the arrow moves in a different direction and sometimes it freaks out and it just doesnt move correctly any ideas?
Are you deriving from the Twin Stick Shooter template?
nope i will check it out if it helps
@wheat jay whoah whoah whoa what are those delays doing in event tick?
Just simply do
Stamina = Stamina + TimeStep*(Regen + Drain*bIsSprinting*bIsMoving)
That's for if Regen and drain are additive. You'd do the math slightly differently if they are exclusive.
Yeah sorry for the delays lol, new to blueprinting.
Event tick runs every frame, I'm not even sure what the delay would do in that case but it certainly wouldn't do anything good.
I learned not to use Event tick for these kind of things.
iirc the delay node ignores additional calls if a delay is already active and waiting, so it would basically act as a debounce
(vs retriggerable delay which resets the timer on every additional call)
How could I stop the blocks from going through the ground and other blocks when building? I use linetrace and set world location to determinate the location currently.
You should use tick for things that need to update every frame (like stamina). But only for those things.
right click on key, and check option "auto"
inside your child, you can use function called "Get parent" or if you are in parent, you can get child actors
(Delay nodes ignore input until they are done)
Attach this component to another scene component, optionally at a named socket.
Can someone help with why I can't get input?
Where?
In a actor that's not my player I can't get player input
In Actor details, set Auto input to player 0
Still doesn't work
Do you use the same input events somewhere else?
I don't think so
If so make sure they don't consume the input
(It's inside the event details panel)
No, I can't find any other actors that use that button.
Show me your graph
For the player or that actor that doesn't want to get input?
Actor
The whole or just the part with input?
Just the part
Singleplayer
Then I don't see a reason why it shouldn't work right now
Do you have a custom player controller?
Try it in there
Yeah that should also work
Input works fine in player controller
Did you try removing the bool-check and going straight into Print String?
It might be that the bool isn't set to true, so it's not firing forward
In your actor, get the player controller -> enable input on begin play
Doesn't work
Still doesn't work.
Is this specific to only this actor?
Haven't tried with any other actors.
Ok I'm out of ideas
Well, maybe try this in a new blank blueprint?
See if it works there?
And you are sure you've set Auto input of this exact actor to player 0 and you don't consume input somewhere else?
Maybe try it on an empty map?
Okay, I'm bling guessing here,
Are you trying to get input while you've paused the game?
Or have you applied any Modifier to the Input Event?
No, i'm running around and everything.
Don't know how to do that, so I don't think so
Doesn't work
Click on the event, In the Details Panel, There is a modifier section
Is any box checked?
Try new actor, auto input, on an empty map. Bare bones
Default character, default controller
Guess it was unclear with my comment, but i tried to double down on your earlier suggestion about this.
Don't work
Can't find it
Select the 'F' Node
No modifier
... default game mode as well?
Yes, the only thing that is really edited in any of the default stuff is the position of the camera on the player controller
Yeah no I'm out of ideas
Try it in a new project
If it doesn't work there then idk
It works fine in the other project
There's always a million differences between 'this' project and the 'other' project
Hi there. How can I move an NPC from one point to the second point and then to the third point without stopping? The goal is, that NPC is continuously moving towards third point location, without stopping at first and second location. I tried to make it with Behaviour Tree, directly in Pawn Blueprint, and also with Spline Component, but NPC always is stopping as it reaches the target.
Sounds like ur not updating the goal location once the first goal location is reached
The second problem is, I am using an Array to define where the Pawn should go
If its a problem then id suggest rethinking the design of the system
Pawn is moving to the second and third location, but stops as it reaches each location.
Array of destination points is fine
For sure thats fine.
Are you seeing a single frame hitch or a longer delay?
I want find out how I can move the Pawn without stopping at each location of the array
It comes down to how you define "arrive at each location"
You need to use a configurable near distance from the destination point, and change your destination when equal or lower than your near distance
If I'm using for each loop, then it finishes too fast, that Pawn is moving to the last location in the array
Any of the techniques you've tried can work. It comes down to how you define arrive at location and how you handle the switching
I mean destination switching
You gotta let the pawn reach or atleast get close to a destination before moving to the next one
When i use the rope i success to attach it to my character but when i swing fast it get offset and be front or back from my character
Thank you so much, I think I understood what you both meant. I'll try it out ๐
Each frame
Hi, I want my player to transition to crouch animation when sphere trace hit an obstacle (actor) like in Gears of War
But seem like the trace successfully detect the hit and transfer the data to 'Play Montage' but my player is not reacting
Is there anything to change in the blueprint or is it in the AnimMontage itself?
Maybe change the starting section to 'Default'? (Or the section you have in your montage)
I have not change any setting is the montage yet, Default in 'Starting Section' seem to not work
Is the target area within the nav bounds?
I've print stringed input on tick and input is being recognised, but the OnKeyDown simply is not firing
Can I replicate my own movement without a movement component? Like using math and add offset location / rotation?
You should be able to just using SetActorLocation. Or SetActorTransform if you want control over rotation and scale at the same time.
Thanks I was more curious about the replication part
I need to find the middle of numbers -200 and 1800, I can't divide by 2 because of the 0. Anyone know how to get around that?
Wait, I just realized I can offset both number to be above 0, then divide, then offset back. Is there a more efficient method?
I think you tag the wrong person
I want the network replication. I'm little confused why you came up with slow movement or teleporting. I mean is there replication in slow movement? Im very confused
Yes thats correct
But you said slowly move and teleporting
But is movement component needed for net replication?
So I have a plane_BP and I cant find it there
I see replication on variables
This here?
but also its rotation etc?
Ok cool, thanks. I have one more question, can the default root inherit the collision of the static mesh?
Didn't understand, why can't you divide by 2?
(-200 + 1800)/2 = 800
Isn't that what you want?
Which is the right place here to ask about collisions?
If you're referring to the scene object that's the root of an actor - no
if you want the root component to collide based on the static mesh, make the static mesh the root
Here is the issue, in other to make a visual effect, im moving the whole root scene forward and the plane moves left and right
I lost my old project files ๐ฆ
Idk how to show it
usually for moving actors you would have the root component be some type of primitive, such as a collider or a static mesh
Im recreating (once again) the movement of an old game ive played
Hey all, I'm trying to figure out how to rotate the player pawn from BP for a first person point and click game. I can update the location just fine but it refuses to rotate for me. Any ideas?
if you're not controlling rotation directly by moving the mouse and instead are rotating based on clicks or such, try turning off "use control rotation"
@earnest tangle Be aware of the dubstep music so maybe mute the video, its not my video.
https://youtu.be/y-yRvnT_CKA?t=36
You can see how it goes left and right while still moving forward and not rotating the whole camra
I was able to make it move like this, except it was going through all walls
and the plane is just moved relative to the camera
So i move the camera not the root scene?
Yeah something like this where you have the camera actor and the plane actor
the camera is the player pawn, and the plane is just an actor that you move around for visual effects
Yes but that's just a camera behind a plane
but since it's a separate actor it can collide into things
But I cant just move the camera, the plane will stay in place i think
In did that by moving the whole scene
You can attach the plane into the camera
so that as you move the camera the plane moves with it
But will collision work?
Sure, I don't see why it wouldn't
If you move the plane with "sweep" enabled it should collide into things
it probably would work even if the plane was just a component attached into the camera instead of a separate actor :)
but yeah if you use "sweep" when moving it, that means it will do a collision sweep and see if it would hit things as it moves
like this?
Yeah something like that should work
Note that in this configuration the camera won't collide with anything so depending on how you want it to work it may need to be set up differently
With spring arm it doesnt work
OHH i had -80 target offset in z axis and it clipped into the floor
why is it so fast now omg in ue4 it was much slower when flying 250
working on chaos vehicle. The vehicle either doesn't move or is tsuck in the air
stuck*
physics is enabled
Ok, I have tried to restructure the system so the OnKeyDown only sends the pressed key to a custom event in the event graph.
Still not working, I've set the input mode to UI only.
Add then divide
-100 + 200 = 100 / 2 = 50
100 + 200 = 300 / 2 = 150
-200 + -300 = -500/2 = -250
I know it's a dumb question, but is there a "clean" way to get random 0.10 in range? I mean, I need to only get random .10s from - say, 0.0 to 0.5
Random Float in Range.
Or just random int in range (0-10), converted to float, divided by 10.
(-200 + 1800) / 2? I don't see why he can't divide by 2
@icy dragonIt's what I'm doing now, thought I was an idiot (I usually am) and there's a better/cleaner way ๐
I think he assume 0 was put into equation as a divided number, which in that case, the result would be 0 and not indefinite as in division by 0.
mmmh I see
The mathematical misconception makes sense, but at the same time it doesn't.
yeah xD
Exactly :) was my point. just need to add the numbers then divide. Instead of the offset idea , which isnt wrong, just more work..
Ok, so i have a decal below the player that always stays on the ground even after they jump. When they jump i want the decal to shrink based on their height, but if i base it on the distance, it grows instead of shrink.
Would anyone know how to work around that?
try to take the inverse
What do you mean?
Inverse of A is 1/A
...i dont know what that means
Is it called like that? english isn't my first language
Theres a few nodes called inverse, ive never used any of them though
Yeah that works, but do you know how to make it blend more? Rather than snap to smallest
The inverse is the name for something which when combined with the original thing produces the "identity", which is just the name for the thing which when combined with something else produces itself. I.e. the identity for multiplication is 1 as 1 * X = X, for addition it's 0, as 0 + X = X. The Reciprocal is just the specific name for the inverse under multiplication, in the same way a square is the specific name for a rectangle with equal sides.
welp
Ahh, alright. Thanks!
How does it snap to smallest? Assuming you're doing it on Event Tick.
Timer by Function Name
Timers work on intervals.
It should be done on tick (or timeline for fixed duration)
or make the interval smaller
That would work, though IMO something that doesn't need sub frame precision should be dumped to trash Event Tick.
I don't think timers really are that precise
Is there a way to set a timer to once per frame ?
Interval of 0.0001?
Interval of 0
Timers check their value once per frame to see if the elapsed time is greater than or equal to the desired interval, if it's 0 they always succeed
I would question the value of a timer once per frame though as you've basically just reinvented tick
It's cleaner I guess
Guess its just a means to avoid stacking loads of things on tick
You're still doing the same workload if your timer is firing once per frame, plus now you have extra overhead because of managing a timer
Isn't it basically "you become the very thing you swore to destroy"?
For sure. I'd just think its more managable compared to a massive branching event tick function.
I'd argue that sequence nodes and collapsed nodes make it more manageable, though it's nuts to do a lot of shit with BP tick anyway.
Hi everyone, I'm building a map for Unreal Tournament using the UTEditor and I'm trying to make a low-gravity area. for that, what I thought of is make 2 custom events in the player character that set the gravity (one decreases and the other one decreases it back to normal). what I'm currently doing is OnBeginOverlap of the trigger volume, i'm casting to the player character and calling the custom events. it works perfectly fine in editor, but when I package the map and play it on my server, the moment any player enters the volume, all clients (and possibly also the server?) crash. could anyone help me debug this? thanks a lot!
I agree . I was just curious as an addition to a former conversation, since timers could run several times within a tick, about the existence of a method for setting a timer to exactly once per tick.
how to drag/move an object with mouse?
Might be more relevant to #multiplayer as it seem to be net replication stuff
(and UT4's engine is kind of ancient, so things might've changed ever since Fortnite rule the UE networking in recent days)
oh, you're right! Thank you
right now i'm doing it like this
but this have a problem. The problem is that when i click on object, it snap to center of mouse hit location
check sweep
i want to move object from point
Would be best doing it in an actor BP anyway as you could drag whatever actor you're clicking.
here is the issue
if you can understand
this is not issue, the issue is that where mouse trace hit, i'm setting actor location, but it snap the actor to hit location, since center is the origin of actor
if you see that when i hit at any location point, it should move from that point.
Ahh, just save the offset when you click it an add it to the location while dragging
when press left mouse, save hit location to vector
Hit location - Actor location
save that to vector
Seems a bit too hacky, not even sure if this is going to work
This is more actor agnostic, and can be done in a standalone BP. Though I'd do a check to determine if the actor is draggable before moving it.
i did the subtraction method already, but this creating some issues when trying to move rotating object
Are you making a level editor? Might as well use transform gizmos for transforming actors around.
when object rotation is 0,0,0 then drag works fine. But when rotation is changed, the object is starts jitter
By transform gizmos, I mean transform gizmos in runtime, not to be confused wit editor ones. Something like this
https://www.youtube.com/watch?v=0zys_jv5zyk
Plugin link:
https://github.com/xyahh/UE4RuntimeTransformer
Example Project (must have plugin installed!):
https://github.com/xyahh/UE4RuntimeTransformer_Example
Documentation & other Stuff:
https://rtt.xyah.games/
here is the issue
you can see that if i try to move object, it starts jittering
and this is the blueprint setup
@icy dragon
the floor and cube collision is already set to block
mostly it happen when object rotation is changed, if object rotation is set to 0,0,0 it works fine
does it also happen if you set the visibility response channel on the object to ignore?
It's probably alternating between hitting itself and hitting the floor
it may jump back and forth between the ground and your object
should i disable the floor collision
no
on the object in the collision profile stuff, set visibility channel to ignore
just to test
Or rather make your own trace channel via Project Settings.
yea that's what would be a solution if it's really the problem
just in case you don't know what to do ๐
i did this, and the jitter issue is fixed now.
but this have one more issue
the offset?
yea idk why you subtract newvar from the hitlocation
you should be able to just set the actual location from the hit result
the reason for doing this, because the object should be grabbed and moved from relative to hit mouse position on object
yes i can do this, but this will snap object to center
i want to move object from point clicked
for example what if click on corner of cube? and try to drag
is there any better way for doing this
and set the cube to blocking on that channel
then your first thing is to check where the cube was clicked on the cube channel
and then you should be able to move it relative
actually what happens is that you click the edge of the cube, but it selects the floor location behind it, because it can't "see" the cube
I don't think you need an extra channel for that, just check if hit actor == self
no, that wont work because then he would get his other issue
i created a trace channel and applied that channel to cube
this is for cube.
and what should i do for floor?. should i set test channel to ignore?
that depends on what behavior you want, probably you want ignore
so you can only grab the cube if the mouse is over the cube
Hello. I am a beginner when it comes to Unreal Engine but I am trying my best to work on a idea I have. I want to make a tool that scales objects up and down in game. The idea is to scale them up when holding left mouse button and down when holding the right mouse button. I have come this far:
As it is now when I press left mouse button it scales objects up but it does it by a set amount and I want it to scale it gradually and when I stop pressing the button it will stop scaling
If anyone can help it will be awsome
you can use a similar approach as he does #blueprint message
where you start a timer, which executes the event as long as the button is pressed
i set the floor collision of test channel to ignore and then inside cube, the test channel is set to block, but when i tried to move object, it's offset is suddenly changed
it works fine, but when i try to move it faster, it hides
you should only set the offset once with the other trace channel
show your BP as it is right now
maybe mouse is hitting on floor?, so it return 0,0,0
possible, if you update the offset each iteration, which isn't necessary