Hi cameni!
How to make a "reset" the two axes of one button?
Since working with only one axle.
this.register_axis("car/CARsim/view_cabin_cam_move", {minval:0, maxval:0.45, center:0, vel:2, acc:2}, function(v) {
this.player.moveCamPos.y = v;
this.player.moveCam = 1;
}, 0);
this.register_axis("car/CARsim/view_cabin_cam_strafe", {minval:-0.3, maxval:0.3, center:0, vel:2, acc:2}, function(v) {
this.player.moveCamPos.x = v;
this.player.moveCam = 1;
}, 0);
{
"name": "view_cabin_cam_move",
"comment": "View: Move the camera forward/backward",
"important": true,
"bindings": [
{
"event_name": "Num8",
"mode": "toggle+"
},
{
"event_name": "Num2",
"mode": "toggle-"
},
{
"event_name": "Num5",
"mode": "reset"
}
]
},
{
"name": "view_cabin_cam_strafe",
"comment": "View: Move the camera left/right",
"important": true,
"bindings": [
{
"event_name": "Num4",
"mode": "toggle-"
},
{
"event_name": "Num6",
"mode": "toggle+"
},
{
"event_name": "Num5",
"mode": "reset"
}
]
}