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?
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)
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.