HowTo: autocenter the interior-cam-view
-
- Posts: 3
- Joined: 04 Apr 2014 22:24
Re: HowTo: autocenter the interior-cam-view
@CJoke Thank you a lot. I got it to work.
- uk_daf_fan
- Posts: 87
- Joined: 01 Jun 2014 09:52
- Location: Lancashire, UK
- Contact:
Re: HowTo: autocenter the interior-cam-view
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:
Would be so grateful if someone could give me the right format, thanks!
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`"
Re: HowTo: autocenter the interior-cam-view
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.
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.
- uk_daf_fan
- Posts: 87
- Joined: 01 Jun 2014 09:52
- Location: Lancashire, UK
- Contact:
Re: HowTo: autocenter the interior-cam-view
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.
Could you just tell me what to set the values to? The other methods seemed simple, maybe this one is not so.
Re: HowTo: autocenter the interior-cam-view
Here...
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.
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)`"
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.
Re: HowTo: autocenter the interior-cam-view
Isn't this in the options menu now?
Re: HowTo: autocenter the interior-cam-view
Only if you steer with the same axis that you look with.
This is for separate steering and looking axes.
This is for separate steering and looking axes.
On extended hiatus.
- uk_daf_fan
- Posts: 87
- Joined: 01 Jun 2014 09:52
- Location: Lancashire, UK
- Contact:
Re: HowTo: autocenter the interior-cam-view
This makes a bit more sense now, thanks Cadde, will try it soon.
Re: HowTo: autocenter the interior-cam-view
@ CJoke
Hi will this method work on version 1.30
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.
Reason: Quote removed. Don't quote entire messages. Use direct addressing.
Re: HowTo: autocenter the interior-cam-view
this doesnt seem to work with 1.30
Who is online
Users browsing this forum: No registered users and 6 guests