I'm opening this for public discussion, both because not much is happening in here and I could use some info from the playerbase. This regards the HL2 project.
I have an experimental feature in its infancy, and I'm wondering if it's too clunky and technical to be used. I don't want this to be a gimmick feature, it should rather be something truely useful.
This post will be quite technical in nature, so I ask those shy of such things to just consider if the overall usage sounds too awkward.
What this feature simulates is resting a weapon on an object. Think bipods.
We already have an existing function known as the 'leankey', a single key that is used in conjunction with the mouse to define posture. Holding this key, and moving the mouse, will allow the player to define a posture between both left and right leaning, and standing and crouching. Holding this key prevents the player from turning with the mouse, for obvious reasons.
In conjunction with this free-posture, if the player then 'leans' his weapon down on an object or map geometry, the camera(and thusly, the weapon) will now lock and pivot around the point related to this contact. This means the posture, which is still controlled by the mouse, now also controls the aim by virtue of this locked pivot. Lean left, the aim shifts right. Crouch down, and the aim shifts higher. Note that your aiming is now limited by how far you can lean in a direction.
Conceptually, this is extremely useful for defensive fighting. It allows the player to take cover behind roughly waist-high objects with an absolute minimum of exposed area presented to his target.
There are, however, a slew of technical problems that come with this 'feature'.
Having aiming tied to lean makes hitting a target become entirely dependant on the quality of the lean system. The current lean animations have a lower head position at the left and right extremes; this gives aiming with the mouse a u-curve.
The attachment point must actually be a fair distance away from the player, having it very close compounds animation error + lag to unacceptable levels, despite the smoothing algorithms and prediction I have applied. I estimate this distance at about arm's length, which is fine for large weapons, but not for say very short shouldered subguns.
This is a first person deal, only. Third person won't look any different, hopefully I can keep the rifle from sinking too far below his head. (and into the supporting object)
The limited traversal I can see being frustrating to players, it's possible they will have to un-lock from the bipodded position to hit targets at the extreme edges of thier coverage, but this is a problem with some reality basis, and a fair disadvantage to the superior accuracy and stability of the bipod position. I can make the lean animations more 'extreme', but the limit will always be somewhere.
On what is legal to set the bipod on I have not yet determined. Right now it's a single point on 'anything solid', which could be anything from a metal desk to a piece of wood, and quite posssibly teammates. This is harder than it sounds, as code is pretty blind to the world around the player. (everything must be clumsily 'felt')
What to do when the barrel line is broken is up for grabs. (If the leaning takes you into a position the bipod + weapon could not possibly follow you, happens frequently if you crouch 'under' a table) I could have the weapon disengage the pivot lock, or I could just leave it 'attached' but disable firing or display a 'lowered' animation. Keep in mind that the weapon model you see in game does not exist for others, so there aren't options like 'using physics' unlike what some may imagine.
Suggestions or comments on the viability of this feature are welcome. I'm not afraid to dump it if it's looking too clumsy to live. I know it's hard to make a judgement without seeing it, but it's the same thing I have to do - it's obviously not complete yet.
I have an experimental feature in its infancy, and I'm wondering if it's too clunky and technical to be used. I don't want this to be a gimmick feature, it should rather be something truely useful.
This post will be quite technical in nature, so I ask those shy of such things to just consider if the overall usage sounds too awkward.
What this feature simulates is resting a weapon on an object. Think bipods.
We already have an existing function known as the 'leankey', a single key that is used in conjunction with the mouse to define posture. Holding this key, and moving the mouse, will allow the player to define a posture between both left and right leaning, and standing and crouching. Holding this key prevents the player from turning with the mouse, for obvious reasons.
In conjunction with this free-posture, if the player then 'leans' his weapon down on an object or map geometry, the camera(and thusly, the weapon) will now lock and pivot around the point related to this contact. This means the posture, which is still controlled by the mouse, now also controls the aim by virtue of this locked pivot. Lean left, the aim shifts right. Crouch down, and the aim shifts higher. Note that your aiming is now limited by how far you can lean in a direction.
Conceptually, this is extremely useful for defensive fighting. It allows the player to take cover behind roughly waist-high objects with an absolute minimum of exposed area presented to his target.
There are, however, a slew of technical problems that come with this 'feature'.
Having aiming tied to lean makes hitting a target become entirely dependant on the quality of the lean system. The current lean animations have a lower head position at the left and right extremes; this gives aiming with the mouse a u-curve.
The attachment point must actually be a fair distance away from the player, having it very close compounds animation error + lag to unacceptable levels, despite the smoothing algorithms and prediction I have applied. I estimate this distance at about arm's length, which is fine for large weapons, but not for say very short shouldered subguns.
This is a first person deal, only. Third person won't look any different, hopefully I can keep the rifle from sinking too far below his head. (and into the supporting object)
The limited traversal I can see being frustrating to players, it's possible they will have to un-lock from the bipodded position to hit targets at the extreme edges of thier coverage, but this is a problem with some reality basis, and a fair disadvantage to the superior accuracy and stability of the bipod position. I can make the lean animations more 'extreme', but the limit will always be somewhere.
On what is legal to set the bipod on I have not yet determined. Right now it's a single point on 'anything solid', which could be anything from a metal desk to a piece of wood, and quite posssibly teammates. This is harder than it sounds, as code is pretty blind to the world around the player. (everything must be clumsily 'felt')
What to do when the barrel line is broken is up for grabs. (If the leaning takes you into a position the bipod + weapon could not possibly follow you, happens frequently if you crouch 'under' a table) I could have the weapon disengage the pivot lock, or I could just leave it 'attached' but disable firing or display a 'lowered' animation. Keep in mind that the weapon model you see in game does not exist for others, so there aren't options like 'using physics' unlike what some may imagine.
Suggestions or comments on the viability of this feature are welcome. I'm not afraid to dump it if it's looking too clumsy to live. I know it's hard to make a judgement without seeing it, but it's the same thing I have to do - it's obviously not complete yet.
Last edited: