You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've made this change in my own code, and it's been pretty useful.
This just sets the scale a which the mouse cursor moves. In my current project, I have the game at 2x zoom, and I have my sensitivity at 1.25 so the mouse cursor is just a little faster than the 'regular' mouse.
I don't know if anyone else will find it useful or not...
Add _sensitivity = 1; to the Mouse.as constructor.
In Mouse.as, change the updateCursor function to this:
protectedfunction updateCursor():void
{
//actually position the flixel mouse cursor graphic
_cursorContainer.x = _globalScreenPosition.x*_sensitivity;
_cursorContainer.y = _globalScreenPosition.y*_sensitivity;
//update the x, y, screenX, and screenY variables based on the default camera.//This is basically a combination of getWorldPosition() and getScreenPosition()var camera:FlxCamera = FlxG.camera;
screenX = (_globalScreenPosition.x - camera.x)/camera.zoom * _sensitivity;
screenY = (_globalScreenPosition.y - camera.y)/camera.zoom* _sensitivity;
x = screenX + (camera.scroll.x * _sensitivity);
y = screenY + (camera.scroll.y * _sensitivity);
}
First, it seems like either failing to escape the game/application window despite running the flixel-based cursor past the edge of it is a potential issue. I've added actually testing this against some of our code to check that, but it's a familiar one to me when speed in an application != system-wide speed for the cursor's motion. (The question comes down to, are the system cursor and the flixel/flash cursor actually at the same location in screen space? If they are, no problem. If they aren't, well, this.)
Second, I'm wondering where PhotonStorm will leave us during the resolve of #163 ; as part of the tools there is the class FlxMouseControl which may help to both augment and better support this feature (depending, of course, on whether it's even worth merging in). Unfortunately the classes there are a little muddled; that class depends on his FlxExtendedSprite for part of the features (or is it the other way around?)
Third, I think it's a great idea (and I'm sure the code's great but again, on my list for now)! Off the top of my head, I can't think of a use that isn't first person, but the ability to adjust control sensitivity is seemingly essential, to me.
I've made this change in my own code, and it's been pretty useful.
This just sets the scale a which the mouse cursor moves. In my current project, I have the game at 2x zoom, and I have my sensitivity at 1.25 so the mouse cursor is just a little faster than the 'regular' mouse.
I don't know if anyone else will find it useful or not...
Here's the changes I've made:
add to FlxG.as:
Add to system/input/Mouse.as
Add
_sensitivity = 1;
to the Mouse.as constructor.In Mouse.as, change the updateCursor function to this:
In Mouse.as change getWorldPosition to this:
Finally, in Mouse.as, change getScreenPosition to this:
The text was updated successfully, but these errors were encountered: