Ironsights origin

Obsidian General.
Post Reply
User avatar
Makrontt le nécron
npc_citizen
npc_citizen
Posts: 198
Joined: Wed Aug 27, 2008 2:01 pm
Location: France

Ironsights origin

Post 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 :oops: .
I made several attempts, but I don't find the right syntax to change that in the weapon script, can anyone help me?
I'm back baby!
Image
fug4life
Beta Tester
Beta Tester
Posts: 4093
Joined: Mon Dec 11, 2006 10:35 am

Post by fug4life »

Help this man^^^^^
'I would probably smarten up before you meet Violet'.
'She has zero tolerance for idiots'.

fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
skidz
Obsidian Gold
Obsidian Gold
Posts: 3228
Joined: Mon May 29, 2006 6:36 am
Location: Maple Ridge, BC
Contact:

Post by skidz »

None of these?

Code: Select all

   	"ironsightoffset"
	{
		"x"   "-13"
		"y"   "-5.5"
		"z"   "4.2"
   	}
User avatar
Makrontt le nécron
npc_citizen
npc_citizen
Posts: 198
Joined: Wed Aug 27, 2008 2:01 pm
Location: France

Post 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.
I'm back baby!
Image
Ny
Phone Donator
Phone Donator
Posts: 496
Joined: Sun Oct 05, 2008 3:22 pm
Contact:

Post 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
:nyoron:
User avatar
Makrontt le nécron
npc_citizen
npc_citizen
Posts: 198
Joined: Wed Aug 27, 2008 2:01 pm
Location: France

Post by Makrontt le nécron »

thx it works ! :D
(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:
Image
see where the crosshair is?

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

Image
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.
I'm back baby!
Image
Ny
Phone Donator
Phone Donator
Posts: 496
Joined: Sun Oct 05, 2008 3:22 pm
Contact:

Post by Ny »

Ah now it makes sense, nice stuff Mak!
:nyoron:
DigitalySane
Polygon
Polygon
Posts: 30
Joined: Mon Aug 18, 2008 11:59 am

Post by DigitalySane »

Nice work Makrontt le nécron.
fug4life
Beta Tester
Beta Tester
Posts: 4093
Joined: Mon Dec 11, 2006 10:35 am

Post by fug4life »

impressive
'I would probably smarten up before you meet Violet'.
'She has zero tolerance for idiots'.

fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
User avatar
z33ky
Former Developer
Former Developer
Posts: 69
Joined: Wed Oct 29, 2008 5:27 pm

Post 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..
Post Reply