logo
Main

Forums

Downloads

Unreal-Netiquette

Donate for Oldunreal:
Donate

borderline

Links to our wiki:
Wiki

Walkthrough

Links

Tutorials

Unreal Reference

Usermaps

borderline

Contact us:
Submit News
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic More accurate turning when using mouse (Read 526 times)
Masterkent
Developer Team
Offline



Posts: 1275
Location: Russia
Joined: Apr 5th, 2013
Gender: Male
More accurate turning when using mouse
Dec 9th, 2018 at 4:49pm
Print Post  
The current implementation of PlayerPawn.UpdateRotation permanently discards any fractional part when changing integer values of ViewRotation.Yaw and ViewRotation.Pitch:

Code
Select All
ViewRotation.Pitch += 32.0 * DeltaTime * aLookUp;
....
ViewRotation.Yaw += 32.0 * DeltaTime * aTurn; 


so some small amounts of mouse movement become lost. This is not perceivable when Pitch or Yaw is changed by hundreds; however, when you use max zoom of Sniper Rifle and move your crosshair slowly, such truncations may noticeably reduce accuracy.

A possible improvement may be implemented by introducing two variables that would store any unused fractional parts of horizontal and vertical turns for the next mouse moves so that summed fractional parts might eventually give an integer offset of Yaw/Pitch:

Code
Select All
var transient float AccumulatedHTurn, AccumulatedVTurn; // Discarded fractional parts of horizontal (Yaw) and vertical (Pitch) turns 


Code
Select All
function int AccumulatedPlayerTurn(float CurrentTurn, out float AccumulatedTurn)
{
	local int IntTurn;

	CurrentTurn += AccumulatedTurn;
	IntTurn = CurrentTurn;
	AccumulatedTurn = CurrentTurn - IntTurn;
	return IntTurn;
} 


Code
Select All
ViewRotation.Pitch += AccumulatedPlayerTurn(32.0 * DeltaTime * aLookUp, AccumulatedVTurn);
....
ViewRotation.Yaw += AccumulatedPlayerTurn(32.0 * DeltaTime * aTurn, AccumulatedHTurn); 

  
Back to top
 
IP Logged
 
shoober420
Betatester
Offline



Posts: 286
Location: US
Joined: Jun 17th, 2012
Gender: Male
Re: More accurate turning when using mouse
Reply #1 - Dec 9th, 2018 at 5:13pm
Print Post  
I’ve experienced mouse movement not being registered in other games, like Lost Planet, but not Unreal engine games. Do you play with low sensitivity?
  
Back to top
IP Logged
 
Hyper
Board Moderator
Betatester
*****
Offline


It's Unreal.

Posts: 2974
Joined: Oct 11th, 2002
Re: More accurate turning when using mouse
Reply #2 - Dec 9th, 2018 at 6:49pm
Print Post  
Oh yes. I've noticed this for years. But it never bothered me enough to report.

It is most noticeable on weapons with high zoom when trying to snipe mobs extremely far away. Sometimes I was not able to aim on the monster because of this weird inaccuracy.

For testing purposes: get a weapon like a rifle, type the command "fov 1" and notice the stepped aiming/turning. It should ideally be per-pixel accurate as long as the mouse sensitivity allows this.

https://www.youtube.com/watch?v=j3POysXYcBQ
  
Back to top
WWW  
IP Logged
 
Masterkent
Developer Team
Offline



Posts: 1275
Location: Russia
Joined: Apr 5th, 2013
Gender: Male
Re: More accurate turning when using mouse
Reply #3 - Dec 9th, 2018 at 7:13pm
Print Post  
shoober420 wrote on Dec 9th, 2018 at 5:13pm:
I’ve experienced mouse movement not being registered in other games, like Lost Planet, but not Unreal engine games.

The problem is that it may be registered inaccurately. F.e. when you move your mouse by 2 points, the resulting rotation change may be 4 or 5 depending on how the mouse movement was handled - in a single tick or two adjacent ticks (that, in turn, depends on random factor).
  
Back to top
 
IP Logged
 
Masterkent
Developer Team
Offline



Posts: 1275
Location: Russia
Joined: Apr 5th, 2013
Gender: Male
Re: More accurate turning when using mouse
Reply #4 - Dec 9th, 2018 at 7:25pm
Print Post  
Hyper wrote on Dec 9th, 2018 at 6:49pm:

Unfortunately, we can't increase the precision of rotation angle (this would require much more advanced changes in the game), the suggested modification only makes such step-wise angle changes better synchronized with the mouse movements. In particular, it guarantees that if you move your mouse long enough, you eventually can change your rotation, no matter how slow the mouse movement is.
  
Back to top
 
IP Logged
 
Hyper
Board Moderator
Betatester
*****
Offline


It's Unreal.

Posts: 2974
Joined: Oct 11th, 2002
Re: More accurate turning when using mouse
Reply #5 - Dec 9th, 2018 at 7:55pm
Print Post  
Masterkent wrote on Dec 9th, 2018 at 7:25pm:
Hyper wrote on Dec 9th, 2018 at 6:49pm:

Unfortunately, we can't increase the precision of rotation angle (this would require much more advanced changes in the game), the suggested modification only makes such step-wise angle changes better synchronized with the mouse movements. In particular, it guarantees that if you move your mouse long enough, you eventually can change your rotation, no matter how slow the mouse movement is.


No problem. It is just a minor annoyance. I do not get limited by this 99.0% of the time. Not worth breaking anything for.
  
Back to top
WWW  
IP Logged
 
shoober420
Betatester
Offline



Posts: 286
Location: US
Joined: Jun 17th, 2012
Gender: Male
Re: More accurate turning when using mouse
Reply #6 - Dec 9th, 2018 at 11:18pm
Print Post  
There are so many factors that come into play with this, although you can’t argue with code. I’ll test out the “fov 1” method when I get home. I’m on Linux though, so “raw input” is used indefinitely when it’s SDL2. I also disable all mouse acceleration through a conf file.

Do you guys untick “enhance pointer precision” to partially remove mouse acceleration? Also, do you guys use the MarkC Acceleration Fix, and enable RawHIDInput in the Input tab under Unreal?
  
Back to top
IP Logged
 
shoober420
Betatester
Offline



Posts: 286
Location: US
Joined: Jun 17th, 2012
Gender: Male
Re: More accurate turning when using mouse
Reply #7 - Dec 10th, 2018 at 5:45am
Print Post  
Wow, I'm experiencing this same behavior. It literally feels like using low sensitivity in a game that has bad mouse input. Lost Planet comes to mind, and it felt the same way. Slow mouse movements dont register at all until you move your mouse a certain speed.

The things I mentioned before can greatly reduce this, as well as increasing your mouse polling rate. For example, I use 500hz on my Intellimouse 3.0 for better mouse response.

Increasing your sensitivity in game reduces this somewhat, but thats not a solution. It still happens even when cranking the sensitivity up really high.
« Last Edit: Dec 10th, 2018 at 2:41pm by shoober420 »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo