- Home /
Bug when using input system for co-op input
I've been setting up the new input system to handle co-op movement and had a working prototype for movement in 2D. However in trying to modify the system to handle platform-style player control I'm getting some really strange behaviour. The first player to join controls normally however when input for the second player is registered, rather than moving as expected when using Rigidbody2D.velocity the player snaps to a position and when input is released they return to the origin?? Any suggestions would be much appreciated as I can't figure out what could be causing an issue. Both players use the exact same scripts and input configuration. Here's some of the code from my player controller.
//Call movement each frame to apply input
void Update()
{
Movement();
}
//Receives input vector from another script based on input system
public void SetInputVector(Vector2 input)
{
movement = new Vector2(input.x, 0f);
}
void Movement()
{
rb.velocity = movement * moveSpeed;
FlipSprite();
CheckAnimation();
}
Your answer

Follow this Question
Related Questions
New Input System, Multiple controllers plugged in Issue. 0 Answers
New input system controller stops detecting on fully pressed trigger? 0 Answers
Getting analog input values from multiple controllers 2 Answers
How do I use controller knob input like mouse position? (New Input System) 1 Answer
Help In Making a SphereCast for 3D Tire! Working RayCast Script included! 0 Answers