Jump to content

Recommended Posts

Hey all,

 

I have a question I haven't managed to find a solution for...

 

Is there a way to get the aiming deadzone somehow via script?

 

If not, do any of you guys have any idea how I could "approximate" it, or an alternative way to get the "offset" which the gun has relative to the unit's (mostly interested in players, not AI though) looking direction (the "hard thing for me here is to exclude a unit's looking direction).

 

Thanks in advance.

  • Like 1

Share this post


Link to post
Share on other sites

aiming deadzone: no. You can decide to show the cursor or not (difficultyOption command, cfgDifficultyPresets for a config)

Weapons have dispersion, orientation/direction. players/Ais have an eyedirection...

What is your final aim?  ("exclude a unit's looking direction" from what? why? when?) You're approach is probably wrong but let's go for a workaround or totally different solutions.

Share this post


Link to post
Share on other sites

Thanks pierremgi.

 

Well, my final aim is to constrain the mouse inside, or ideally up to the edge of, the deadzone. This way I'll manage to give the player the option to have another two degrees of freedom (in a sense, the term is somewhat abused here), enabling them to have different controls for their head/eyes, gun and orientation.

 

I have an idea that I could possibly use getDir along with weaponDirection in order to find if the direction of the weapon is inside a specified angle, but then I wouldn't be able to know whether this is inside the aiming deadzone. I should check whether the unit is rotating if I wanted to find if this is in the deadzone or not (still I would have to find a way to handle the 0 deadzone case).

 

1 hour ago, pierremgi said:

You're approach is probably wrong but let's go for a workaround or totally different solutions.

If you have any idea of a different solution (or any workaround) please don't hold it back :smiley-biggrin:.

 

Nevertheless, thanks for the info.

Share this post


Link to post
Share on other sites

If I'm right, deadzone is a setting in general game options. And it defines a length whithin the cursor is able to point at unit/vehicle without moving all the landscape. So, with no deadzone, the cursor (mouse) stays at center of the screen, and all the landscape moves. If set at max (1?) the cursor can move within (probably) half of the screen without moving the landscape. Most of players use the mouse to rotate along with the weapon.

If I'm right, you want to split the screen for some extra displays, or controls???

Share this post


Link to post
Share on other sites
1 minute ago, pierremgi said:

If I'm right, deadzone is a setting in general game options

Yep...

1 minute ago, pierremgi said:

t defines a length whithin the cursor is able to point at unit/vehicle without moving all the landscape

Correct again :).

2 minutes ago, pierremgi said:

So, with no deadzone, the cursor (mouse) stays at center of the screen, and all the landscape moves

Exactly...

3 minutes ago, pierremgi said:

If set at max (1?) the cursor can move within (probably) half of the screen without moving the landscape

Well, first of all I am not sure what is the max (could be normalized - 1 - or the actual number in pixels, absolutely no idea on this one). If I am not mistaken though (has been quite a while since the last time I checked it) when it is maxed it covers the whole screen. I might be wrong on this one though...

4 minutes ago, pierremgi said:

Most of players use the mouse to rotate along with the weapon.

As far as I am aware this is the case.

5 minutes ago, pierremgi said:

If I'm right, you want to split the screen for some extra displays, or controls???

No, I want to let the player to move his/her gun without steering the avatar. For example you may utilize different controls to rotate your player (for example two buttons), move your gun (for example and most probably the mouse) and move your face (for example an IR-track like device).

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×