Page 1 of 1
Ironsights origin
Posted: Tue Dec 02, 2008 7:46 pm
by Makrontt le nécron
It may look stupid seeing how long I've been using the "cl_ironsight_test_wpn_offset" command, but I only recently discovered that a new origin can be set for ironsights

.
I made several attempts, but I don't find the right syntax to change that in the weapon script, can anyone help me?
Posted: Fri Dec 05, 2008 5:26 am
by fug4life
Help this man^^^^^
Posted: Sat Dec 06, 2008 9:20 am
by skidz
None of these?
Code: Select all
"ironsightoffset"
{
"x" "-13"
"y" "-5.5"
"z" "4.2"
}
Posted: Sat Dec 06, 2008 11:20 am
by Makrontt le nécron
Well, thx for the answer but I already know about these, what I mean is:
there is console commands named "cl_ironsight_test_wpn_offset_x", "cl_ironsight_test_wpn_offset_y" and "cl_ironsight_test_wpn_offset_z" that change where the camera look in ironsights mode and that are changed in the weapon script with
Code: Select all
"ironsightoffset"
{
"x" "-13"
"y" "-5.5"
"z" "4.2"
}
but there is also commands named "cl_ironsight_test_wpn_ori_offset_x", "cl_ironsight_test_wpn_ori_offset_y" and "cl_ironsight_test_wpn_ori_offset_z"
that change from where the camera look in ironsights mode and I didn't find what to put in the weapon script.
The commands works, but as they are just for test, they don't change the script.
I tried stuff like :
Code: Select all
"ironsightoffset"
{
"x" "-11"
"y" "-6"
"z" "4"
"xorigin" "0"
"yorigin" "-1.5"
"zorigin" "0"
}
but nothing.
Posted: Sat Dec 06, 2008 12:57 pm
by Ny
Found the answer to your problem in the SDK docs. I got interested in this but it hit me as to why you want to define two sets offsets? Anyways here's what your looking for:
Code: Select all
"xori" "xx"
"yori" "xx"
"zori" "xx"
I don't know the actual values you need but according to valve these codes don't work in the script.
Source:
http://developer.valvesoftware.com/wiki/Ironsights
Posted: Sat Dec 06, 2008 1:40 pm
by Makrontt le nécron
thx it works !
(this wasn't made for oc, but I suppose the oc code was based on this one)
Why I want to define another offset? Just look a the mac10 with my scripts, and you'll see that moving one point of the camera is not enough.
some pictures to explain:

see where the crosshair is?

by only rotating the weapon, the ironsights are aligned but not whit the crosshair

If I can also move the point from where the camera look, it is much more easy to use!
now I have some fixes to do with the css scripts.
Posted: Sat Dec 06, 2008 1:43 pm
by Ny
Ah now it makes sense, nice stuff Mak!
Posted: Sat Dec 06, 2008 7:59 pm
by DigitalySane
Nice work Makrontt le nécron.
Posted: Sun Dec 07, 2008 10:56 am
by fug4life
impressive
Posted: Mon Dec 08, 2008 12:48 am
by z33ky
There's a bug with the yaw when looking up & down.
I have the very same bug in my own mod and I don't know how to fix it.
Maybe you guys can find out..