- Home /
Why is enemy jumping at different speed even though the velocity is the same?
I have an enemy that jumps when it sees the player (there's a delay between each jump so the enemy doesn't jump every time). But for some reason, the enemy jumps at 2 different speeds after some jumps (It switches back and forth). I logged the rigidbody's velocity to the console and it was identical, nothing was changed even though it jumped at 2 different speeds. I tried changing it to AddForce but the problem still exists. The code never runs twice or more but only one (It only logs to the console one every time, no duplicate log). I change the velocity directly and don't multiply it with the current delta time so why does it differ? Is there any other factor that can change the velocity?
Your answer
Follow this Question
Related Questions
my jump key works about once every 10 presses 1 Answer
How to Make Velocity.y based on AddForce 0 Answers
Error when trying to implement JumpPad/GravityPad type effect on CharacterController (Solved) 1 Answer
how to make an 2d object move the direction its facing using rigidbody2d.velcoity 1 Answer
Velocity doesnt change properly 1 Answer