Event Tick VS Axis Mapping - Walking Speed Issue

Hello,

I try to make a simple game where an actor (player or not) move automatically from a point A to a point B.

For that i was using the Axis Mapping Event like that

But this Axis Mapping Event works only on actor which are controlled.

I try then to change the Axis Mapping Event by the Tick Event

All my actors are moving now.

But the issue is there:
During the movement actors will have their Walking Speed changed.

But it looks like with the “Event Tick” that doesn’t work… Even if after a Print i see that the speed is set to the correct value, the actor doesn’t follow that speed.

With the Axis Event, the Update speed works and the actor follow the speed but only controlled actor move…

So What is the difference between those 2 events? How can i make all my actor follow the new speed?

Do I have to use something else than Axis Event or Event Tick? For performance as well?

Thanks for your time.

Hi @BakuryuReitoken

You are trying to perform an action every frame tick. So when you said the speed changed, i am guessing possibly faster?

To delink the movement from the frame per second you need to get the “Delta Seconds” and multiply that by your walk speed, you then may have to adjust the walk speed til it suits your needs. (If you call a function from event tick then you can use GetWorldDeltaSeconds node instead of having to pass it through to the function)

At the start the Speed is set at 500.

So i start to make my actor move automatically with Axis Mapping.

During the movement, the actor will overlapp other actor.
When it overlap a “boost speed actor” the speed is set to 1000.

It’s working, i see my actor moving faster.
I print the speed of the actor = 1000

Issue: Other actors not controlled doesn’t move with the “Axis Mapping Event”

I switch from Axis Mapping to “Event Tick”
All actors are moving with a speed of 500. (OK)
On the overlap of the “boost speed actor” the speed is set to 1000 (print show me 1000)

But any actor are moving faster… they still have the same speed than before (500) (Not OK)

Issue: the actor doesn’t apply the new speed… i don’t know why because the speed is correctly set to the new value.

In summary, i think the Axis Mapping does something more than the Event Tick, but what?

all axis mapping does is send the axis value, a range from -1 to 1. 1 being forward axis (or right on Y) and -1 backward (or left on y) and values in between represent slower movements. and 0 no movement of course.

make sure you are setting the walk speed on the correct actor (check your print is returnin the correct character to be sure also)

But, this is not a good way to control none player pawns. You really should look into AI controller. Or create your own code for movement. i find things get a little messy when trying to adapt the player controlled characters.

Have a look at this, Ryan has some pretty good tutorials normally so see if it helps.

Unreal Engine 5 Tutorial - AI Part 1: Character Setup - YouTube

Thanks i will check that and see if i can apply it.

I have the same issue with the AI movement…

What does it mean… I become crazy

There is no difference between those 2 regarding the event itself.
My issue comes from inivisible collision box blocking my actor.