Turning while speed change active

dasjlm

Member
I'm using a RPG player. I have speed change set up and working with a button held down and stopped on button up. I set it up as with no movement required as I'd like it to stay active if player turns right or left. My problem is I can't turn to player as long as the speed change button is held down.

I have the A and D keys set up for turning using Horizontal axis but they don't work when the speed change button is held down. (Normally work ok.)

Strange all other keys work with speed change button held. Forward, backward, strafe right, left, jump, and crouch. Just not the turn right and left.

I'm using Horizontal Axis for turn right and left and Alt Horizontal for strafe right and left.

I assume I must be missing something simple as it seems the turning is blocked by the speed change ability yet the strafe works.

Any ideas?

Thanks in advance
John
 
I just noticed the player is turning but super slow. I mean barely. So it seems the rotation speed is affected by the speed change ability. I'll dig into a bit now that I have a bit of a clue?
 
I increased the RPG turn speed from 1.5 to 5 and the player does turn faster and of course I could make it faster but then when speed change is not on would be turning way too fast. Perhaps I need to modify that value on the fly when speed change is active?
 
Figured it out. The A and D setup should be buttons not axis. Once I changed that works. Knew it had to be something silly.
 
Might have spoke too soon. Problem is back. Seems my rewired change had a issue. Anyway still can't get the turn and speed change to work together. Will keep testing.
 
Hm yes I can reproduce this too actually. Had a look through Speed Change and the RPG movement type but can't see anything that should be causing this. @Justin not sure if you have any ideas?
 
Put some debug logs in the base before and after ApplyRotation and confirmed there is a difference if speed change is on. Not sure why yet.
 
For now I got around the issue by updating the rotation speed in the AbilityStarted in the SpeedChange script.

ie:
m_CharacterLocomotion.MotorRotationSpeed = 10f; // JLM TEST

I save the normal speed first then restore it when the ability is stopped.

Will do for the purpose of my game as my player can run and turn.
Will test a bit more but happy with how it looks so far.
 
The RPG Movement Type allows rotation when you press the Rotate Input Name button. This button maps to Fire3 which if you look in the input manager also gets activated when the shift key is down. To prevent this from happening you'll either want to change the input manager or change which button names the inputs are mapped to.
 
Interesting. I didn't set up rotate. So are you saying the player needs to use rotate when running instead of turn?
 
The RPG ViewType will rotate when the same button is down as the SpeedChange. This is what is causing the difference. You can change the button mappings to another value within the input manager so it doesn't do that.
 
Top