Immersive Vehicles (Formerly Transport Simulator)

Immersive Vehicles (Formerly Transport Simulator)

4M Downloads

[Enhancement] handHeldHandOffset: [X.x,Y.y,Z.z]

LauraDarkez opened this issue · 9 comments

commented

this parameter would allow you to make the hand-origin reference point be set to a specific point of a handheld gun, rather than being stuck in reference to the origin. would allow for better use of the playertweaks arm when it comes to the use of handheld guns, since things like conventional fire extinguishers suffer from having the arm at an unusual angle when it should be relative to the handle.
2022-12-06_15 24 21
would give guns a defined point to reference the hand to, which is beneficial overall to convention-users

commented

if this is something that could be relatively simple, i might be willing to pr it myself, as long as im directed to what parts of the code i should be looking at

commented

But you already have this?

handHeldNormalOffset – The offset where this gun will be when held normally by the player. An offset of 0,0,0 will render the gun in the center of the player's right shoulder rotation point. For reference, this is 0.3125 blocks to the right, and 1.375 blocks from the bottom-center of the player's feet.

commented

that isnt though. handheldNormalOffset is the reason the arm is at the weird angle that it is at. its in reference to the origin of the gun. the hand itself is angled towards the origin of the gun. this parameter would make it so that the handheldnormaloffset can be whatever it needs to be to look right when holding any gun, but without isolating the origin from the position that the hand references, i cant really do things like "make the origin of a gun be the position best suited for placing it on a part slot" without compromising how the hand is angled. See example: fire extinguisher above

commented

image
origin of this extinguisher is at the bottom so that it can be conventionally placed on vehicles like crates and barrels. this makes sense from a convention standpoint. but as a result the handHeldNormalOffset has to be very low on the Y axis. this results in the arm being angled down very low when it SHOULD be angled to the handle instead of the base

"handHeldNormalOffset": [0.0, -0.78125, 0.625]

the idea would be that the "handHeldHandOffset" would allow me to define a point relative to the model itself, for example [0.0, 0.71875, 0.0] would make it so that the hand acts like the origin of the gun is at that position on the gun instead of at 0 0 0.
image
heres what it would look like if "handHeldNormalOffset" was 0,0,0.625

but because of the origin, the arm angles down and the gun practically floats
image

this parameter i am requesting would let me make the arm instead reference the origin at a y position of 0.71875, resulting in a arm that looks more like this without changing the handHeldNormalOffset or handHeldAimedOffset:
image

commented

and with my machine gun it would let me have an origin that better matches the mounting position it would have when either on its bipod or on a swivel mount, but make the hand act like the origin is where it currently is: in the handle geometry

now do you understand what im trying to get at here?

commented

image
the only way to get the last image as a result without adding this parameter is to put the gun's origin here instead, which isnt as nice when it comes to convention

commented

Ah, so you're saying that you'd rather have the hand-held offset adjust the position of the gun in the player's hands, rather than the position of the hand relative to the 0 position of the gun? Or should I have both and call this one something different?

commented

i gave you a name for this parameter, my goal was to have both cause you need to offset the gun's normal offset so that it isnt sitting directly at the shoulder

"handHeldHandPosition" is a good alternative

commented

Implemented in V22.6.0.