Xim/Xbox recoil scripts damping 'spikes'

GPC2 script programming for Titan Two. Code examples, questions, requests.

Xim/Xbox recoil scripts damping 'spikes'

Postby Coilover » Wed Nov 10, 2021 3:19 pm

Does anyone have any bright ideas how to dampen the spikes in recoil script when using a Xim with Titan2 on Xbox

The issue that I have is that I am noticing 'spikes' in the 'Y' values when transitioning from stationary to moving with Mouse or moving the mouse very slowly. The GTunerIV device Monitor show the odd spurious 'spike' in movement, which in turn translates into odd and erratic behaviour on the game/screen.

I assume that the spikes are not caused by a Xim setting or a mis-match between polling rates etc?

Idea #1
Assuming it is not a 'setting thing', I was thinking about damping the output by keeping a rolling array of the last 10 Y values. If the current Y value is <> 50% percent of the average of the array values then replace it with the average value. Obviously the percentage and the number of stored values can be 'tweaked' to produce sensible results.

That was my idea. I have not had to do this type of damping of figures before. Any input would be greatly appreciated.

I am looking to build my own recoil script to incorporate into my other scripts; mainly because, although there are great scripts out there, there are none that do exactly what I need.

If anyone does have a solution that they do not want published, please PM me.

EDIT: Has anyone implemented a Kalman Filter for smoothing in GPC2?
User avatar
Coilover
Staff Sergeant
Staff Sergeant
 
Posts: 15
Joined: Thu Nov 04, 2021 6:59 pm

Re: Xim/Xbox recoil scripts damping 'spikes'

Postby bonefisher » Sun Nov 21, 2021 1:11 am

You have to have a threshold on the anti recoil for XIM! I have some out there and Mad has some scripts with this option to try!
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: Xim/Xbox recoil scripts damping 'spikes'

Postby Nagato » Sun Nov 21, 2021 1:07 pm

Is it better to go through script regarding the anti recoil? I'm currently using the universal Gamepack and it works pretty well but maybe the result is better with script. Need your feedbacks guyz :)
User avatar
Nagato
Sergeant First Class
Sergeant First Class
 
Posts: 19
Joined: Tue May 11, 2021 12:21 pm

Re: Xim/Xbox recoil scripts damping 'spikes'

Postby bonefisher » Mon Nov 22, 2021 12:09 am

change your curve in XIM which gives the beginning down pull when moving with the anti-recoil on!
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: Xim/Xbox recoil scripts damping 'spikes'

Postby Yearoh » Wed Dec 08, 2021 5:09 pm

Are you talking about the auto-recoil 'mitigation' for the xim or just changing the x/y value?
User avatar
Yearoh
Master Sergeant
Master Sergeant
 
Posts: 38
Joined: Fri Jul 10, 2020 9:32 am


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 105 guests