-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature request: mouse camera and nicer keyboard controls #9
Comments
potentially related to #7 ? |
I second this so badly. Turning around during anything more than just walking on keyboard is impossible because camera controls are located right above the action keys. My keyboard+mouse control scheme suggestion is following: This could definitely make it much easier to play for non-controller users, and add back a lot of missing precision. |
I currently have an additional codebase that adds MouseDelta as a control scheme for the Camera, but I'm not really sure the best course of action given that there is the Camera Controls PR - dependent on whether or not that gets pushed to main would need two separate codebases for Keyboard control. Right now, my code enables movement based on a frame-by-frame Mouse Delta (where it places the Mouse in the center of the window, then increments the Inputs and checks the resulting deltaPosition and uses that as a VirtualStick. One small problem with that: It normalizes for all stick inputs which is bad for specifically the Camera control (for every other joystick, it makes intuitive sense), in other words there's no "Sensitivity Controls" In theory, if I add the Mouse Control feature to #7, then i would need to do it before EXOK team pushes the PR, which also means more work for Noel. |
Yeah I am in favor of implementing this once #7 is resolved. I think the steps are:
|
Don't hot reload for autosaves and c# source code changes
Rebinding should work now (though you need to do it through a json file, not in-game right now). To get Mouse input to work, I think a custom binding should do something like this: namespace Celeste64;
public class MouseAxisBinding : VirtualButton.IBinding
{
public Vec2 Axis;
public bool IsPressed => Value > 0;
public bool IsDown => Value > 0;
public bool IsReleased => Value == 0;
public float Value => ValueNoDeadzone;
public float ValueNoDeadzone
{
get
{
var normal = (Input.Mouse.Position - Input.LastState.Mouse.Position).Normalized();
var dot = Calc.Clamp(Vec2.Dot(normal, Axis), 0, 1);
return dot;
}
}
public VirtualButton.ConditionFn? Enabled { get; set; }
} However, to make this properly work Foster needs a mode to capture the Mouse cursor, which is doesn't right now, using |
having fun so far, but it's a little miserable to play with a keyboard. is there any chance we could get controls that bring it more in line with other pc 3d platformer controls? (e.g. a hat in time)
for example you can move with wasd, move the camera with the mouse, jump with space, and do dash/grab with left and right click?
The text was updated successfully, but these errors were encountered: