Problem with Max Velocity.
I'm using the PMO for the players movement engine, btw.
Anyways, heres the deal:
When my player is running and jumps, its max velocity is set to its current velocity just before jumping. I also have a value (1,2) telling the character to continue moving right or left after jumping, even when there is no user input.*They are assigned properly so I know they aren't causing the problem.
And my problem:
If the character is facing right, and executes a running jump, I can hold left in mid air to slowly move back to the left. However, this doesn't work when jumping to the left and then trying to move right, because the max velocity is a negative (players max velocity moving right is 240 and left is -240. So something about the MAX velocity being a negative number prevents my player from moving to the right.
I've tried using a different value when jumping to the left(maxvelocity*2/maxvelocity) to get the exact velocity, but negative, and that didn't work.
I've also tried a bunch of other stuff I can't exactly recall, but none of it did the trick!
Any suggestions? Thanks in advance!
Re: Problem with Max Velocity.
As fas as I can remember, the MaxXVelocity value is absolute. So if you set it at 240, then XVelocity (the horizontal speed) won't ever exceed 240 if the player is going to the right, or -240 if the player is going to the left.
EDIT: So there's really no need to set MaxXVelocity to a negative value.
Re: Problem with Max Velocity.
Ah your right, I didn't add Abs() to the velocities, duh!! Thanks!