View Single Post
Mr Kidnapper
Senior Member
Status: Offline
Posts: 442
Join Date: Feb 2011
Default 12-18-2011, 10:07 PM

When programmers talk about a feature being of "native" support, it means that it is a feature that is included in the program, no modifications necessary. So for example, you would be able to check a box and the feature would work, no strings attached.

Ah, the problem I meant with the user moving the window is that calibration is (generally) only done once. After that, I have to use the script to set the mouse every .08 seconds to certain coordinates. The coordinates used are relative to the screen and not the Alice window.
Unfortunately even so, this is still based on a calibration object and won't work.
However, if you ever manage to figure out to get the location of the window on the screen then we could solve the entire problem of mouselock and abandon calibration points altogether.
I have been trying for the past hour to figure out what calls I need to make to find the window location. It probably has something to do with in edu.cmu.cs.stage3.alice.player

Edit: Found it. I figured it out when I looked in the .java files for Mouse Distance from Top Edge.
world.renderTarget.getAWTComponent().getLocationOn Screen()
It might be off by a few. I don't know if renderTarget refers to the window itself or just the render box. It's probably the render box.

Edit2: Calibration Point-less mouselocking works. My FPS is now resistant to both window resizing and window movement.

Edit3: Hoshit! I removed the stopRadius (I call it BoundRadius) variable because there would be no more magnanimity from mouselocking. Suddenly mouse movement became very smooth. The difference is noticeable even after many times the default mouse sensitivity.
Bah. Still a little magnanimous. Bound Radius of 1.

Edit4: Mouse-based camera movement is complete. I suppose. I don't think I could make it any less laggy. I fixed the "roll" problem by creating a dummy on the camera that moves to the camera's position, which is what the camera's horizontal rotation is based on, and I made rotating past 60-70 in either vertical direction impossible. Now it's pretty much the exact same thing as any other FPS.

Last edited by Mr Kidnapper; 12-19-2011 at 12:55 AM.
Reply With Quote