HowTo: autocenter the interior-cam-view

bonesjustice
Posts: 3
Joined: 04 Apr 2014 22:24

Re: HowTo: autocenter the interior-cam-view

#21 Post by bonesjustice » 11 Apr 2014 12:57

@CJoke Thank you a lot. I got it to work.
User avatar
uk_daf_fan
Posts: 87
Joined: 01 Jun 2014 09:52
Location: Lancashire, UK
Contact:

Re: HowTo: autocenter the interior-cam-view

#22 Post by uk_daf_fan » 27 Oct 2014 12:26

Sorry to revive this old topic, but I want to get this to work with my Xbox360 Controller.

All I want to do is use the right stick left and right and then release to autocentre.

I tried to do this with the .sii file by myself but it got confusing with the names of buttons.

The structure has now also changed:

Code: Select all

config_lines[143]: "mix trackiron `trackir.device.active?0`"
 config_lines[144]: "mix trackiryaw `trackir.device.position.yaw?0`"
 config_lines[145]: "mix trackirpitch `trackir.device.position.pitch?0`"
 config_lines[146]: "mix trackirroll `trackir.device.position.roll?0`"
 config_lines[147]: "mix trackirx `trackir.device.position.x?0`"
 config_lines[148]: "mix trackiry `trackir.device.position.y?0`"
 config_lines[149]: "mix trackirz `trackir.device.position.z?0`"
Would be so grateful if someone could give me the right format, thanks!
User avatar
Cadde
Posts: 6800
Joined: 24 Apr 2013 18:08
Location: Have no fear, i am from the internets!

Re: HowTo: autocenter the interior-cam-view

#23 Post by Cadde » 27 Oct 2014 12:42

Your stick isn't a set of buttons but axes. Assign them elsewhere (in game) and then cut the names over to your trackir values.
I don't know if they are relative (-32767 < 0 < 32768) or absolute (0 < 32768 < 65535) but that you can probably figure out on your own.

Depending on what they are (relative or absolute) you would devise a mathematical formula that turns their input to degrees (-180 < 0 < 180).

If relative, this is just simply "joyX.axisX / 180" (it will go to 182 degrees but it is a non issue)
if absolute you have to take the value of "joyX.axisX" and subtract 32768 from it before division.

EDIT: And OFC, there is the off chance that they are normalized... 0>1
Then it's just a matter of taking the input and multiplying it by 180.

And 180 is just an example, you could devise math for any other maximum rotations etc.
On extended hiatus.
User avatar
uk_daf_fan
Posts: 87
Joined: 01 Jun 2014 09:52
Location: Lancashire, UK
Contact:

Re: HowTo: autocenter the interior-cam-view

#24 Post by uk_daf_fan » 27 Oct 2014 20:19

Excuse my ignorance but I have absolutely no idea what you're saying.

Could you just tell me what to set the values to? The other methods seemed simple, maybe this one is not so.
User avatar
Cadde
Posts: 6800
Joined: 24 Apr 2013 18:08
Location: Have no fear, i am from the internets!

Re: HowTo: autocenter the interior-cam-view

#25 Post by Cadde » 28 Oct 2014 11:28

Here...

Code: Select all

config_lines[157]: "mix headtron `trackiron | hmdon | 1`"
 config_lines[158]: "mix headtryaw `sel(trackiron, trackiryaw, 0) + sel(hmdon, hmdyaw, 0) + (pow(normalize(abs(sel(c_jilooklr, joy.rx?0, -joy.rx?0)), c_lr_dz), 3) * sign(sel(c_jilooklr, joy.rx?0, -joy.rx?0)))`"
 config_lines[159]: "mix headtrpitch `sel(trackiron, trackirpitch, 0) + sel(hmdon, hmdpitch, 0) + deadzone(-sel(c_jilookud, -joy.ry?0, joy.ry?0), c_ud_dz)`"
First line makes sure that the game will use the headtracking mixes in the other two lines.
The second line applies mathematical power to make looking around in the left/right direction smoother until you apply full stick.
The third line is for up down and no smoothing is necessary.

From my personal taste, using a gamepad stick to look around in this manner is very inaccurate and annoying. But it might work wonders for you.
On extended hiatus.
Miggs
Posts: 91
Joined: 21 Aug 2014 17:16

Re: HowTo: autocenter the interior-cam-view

#26 Post by Miggs » 28 Oct 2014 13:14

Isn't this in the options menu now?
User avatar
Cadde
Posts: 6800
Joined: 24 Apr 2013 18:08
Location: Have no fear, i am from the internets!

Re: HowTo: autocenter the interior-cam-view

#27 Post by Cadde » 29 Oct 2014 21:42

Only if you steer with the same axis that you look with.
This is for separate steering and looking axes.
On extended hiatus.
User avatar
uk_daf_fan
Posts: 87
Joined: 01 Jun 2014 09:52
Location: Lancashire, UK
Contact:

Re: HowTo: autocenter the interior-cam-view

#28 Post by uk_daf_fan » 29 Oct 2014 22:05

This makes a bit more sense now, thanks Cadde, will try it soon.
Hackett40
Posts: 1
Joined: 09 Dec 2017 16:44

Re: HowTo: autocenter the interior-cam-view

#29 Post by Hackett40 » 09 Dec 2017 16:55

@ CJoke

Hi will this method work on version 1.30
Last edited by ohaha on 10 Dec 2017 08:16, edited 1 time in total.
Reason: Quote removed. Don't quote entire messages. Use direct addressing.
GEEKman13
Posts: 1
Joined: 04 Oct 2016 21:50

Re: HowTo: autocenter the interior-cam-view

#30 Post by GEEKman13 » 16 Apr 2018 05:20

this doesnt seem to work with 1.30
Post Reply

Return to “Help center - player to player”

Who is online

Users browsing this forum: No registered users and 6 guests