I must apologize for a mistake I made earlier. Multiplying by world delta seconds is of importance when working with tick, but somehow that info popped up in my mind when it was irrelevant. Tick is very common to smoothly transition A to B, like the arrow position, without stutter. See, the timer event you use runs per X seconds instead of tick.
If you are doing something per tick, you can use the advice I gave. When running per X second (timer) consider my reply a moment of stupidity (or just too much work lately )
in addition to what @Roy_Wierer.Seda145 said is true, that way you can decouple tick time and speed of arrow over time. So you can basically tell actor move 100units over 1 second and it would be same between different FPS machines.
In simpler words you can do this in multiple ways ofcourse and I honestly feel that I am putting you in the wrong direction just to answer your question since I donât exactly know the end results you want in a projectile movement. However anything is possible.
If I need to do this custom like you do, What I would do is below
Thanks.
isnât timer by event also bound in time on any device? i was assuming its speed not defendant on FPS
I intent to put each of those arrows in an object pooling, and de-activate them by disable all their systems and also making their timerTick from 0.0222 to something like 10, just to make sure they are not ticking in the pool.
Is the solution you provided not more expensive then the one im trying to apply ? this game is for mobile devices
Still, The explanation you provided me did expanded my knowledge and was valuable to me. thank you.
I landed on 0.022 because it seems like the threshold for smooth enough movement.
i tried to see how low of a number i can get away with for mobile devices. seeing someone demonstrate set timer by event on you tube i was assuming this timer is bound by time and its speed is not dependent on fps or number of ticks per second
Is basically the same you can always stop tick of the actors on runtime if you are pooling them. On the example I didnât add those since itâs just a demo.
A proper way of doing it is very possible on my example.
-When actor gets in use from pool, you open gate enable tick when itâs on pool you close gate also in addition you can disable ticking too.
-Even its a mobile game ticking of actors with a gate wonât be too significant if you donât have hundereds of actors ready at pool.
You can write a check function to this as distance reached or collided to return actor to pool.
In addition to use deltatime or deltatime constant is important since tick time is not same for each frame. So in my example interpolation done for basically again for each tick calculating how much of a distance delta should actor receive for that delta time fraction.
You can check deltatime over here why in a visual format.
You can do with timeline, constant time functions, or as u do with a timer too.
Thank you again. those answers are super valuable to me. i will also read farther on that in documentation.
Btw, i intend to re-write everything in C++ (first i try to get a game running with blueprints without fatal mistakes)
If i know im gonna use C++ later, what is the solution in BP that are the most similar in C++ does C++ also have the Gate flow control ? or timerByEvent ?
You can do everrything in C++ that blueprints does, even much more than that. The correct way to approach UE is to understand wherre to use C++ and when to use blueprints in hybrid mode, depending on the need, complexity, usability. Think that hybrid mix of BP and C++ comes after having a fair enough programming knowledge and knowledge base.
In my case I do everything in C++ until one asset requires an editor for non programmers to be made. This is common in widget design. Then C++ is the base class implementing 100% of the core functionality, and widget designers inherit from that class to inject their designs onto the core functionality. âBindWidgetâ is used for that on the UPROPERTY. Same types of injection can be done in other types of assets. C++ == the functionality, Blueprints == the visual variants of that class.
I never start something serious in blueprints before I start working in C++, because blueprint data, structs, enums etc as well, can not be easily (or not at all) be ported to C++ at times, or takes a lot of effort to do.
Blueprint scripting also comes with a bunch of limitations on C++ programming concepts which are possible just in C++. like templating or accessing engine methods that are not exposed to blueprint. Itâs also easier to work with references (pointer type) there. + because itâs all text you can work with version control and those text files never ever corrupt. Blueprints corrupt easily and are binary so you canât use version control like Git with blueprints without having to upload megabytes of data per commit.
in C++ that would just be a boolean property, and optionally youâd add a method to set and toggle it.
bool bCanContinue = true;
if (bCanContinue) {
// do stuff
}
Thereâs no need to create such nodes in the first place. The gate node, do once etc. in BP is more of a quick prototyping addition so you donât have to add any tracking property manually.
Thank you @Roy_Wierer.Seda145 and @RedGrimnir i read both your explanations and it make sense to me. i was using C# with unity for few years and i will dive into C++. i never liked blueprints and forced myself into that when starting unreal. looking backwards it might have been a mistake, maybe i should have started with C++