Page MenuHomeFeedback Tracker

player selectionPosition "leftleg" returns incorrect position
New, NormalPublic

Description

selectionPosition on "leftleg" of a "Man" entity returns a position at the groin.

Details

Severity
Minor
Resolution
Open
Reproducibility
N/A
Operating System
Windows 7
Category
Scripting
Steps To Reproduce

Enter any mission with a player character and debug console access. Execute the following script while your player is standing.

private _selectionNamesMan =
[
	"spine1",
	"spine2",
	"spine3",
	"head",
	"leftshoulder",
	"leftarm",
	"leftforearm",
	"lefthand",
	"rightshoulder",
	"rightarm",
	"rightforearm",
	"righthand",
	"pelvis",
	"leftupleg",
	"leftleg",
	"leftfoot",
	"rightupleg",
	"rightleg",
	"rightfoot"
];

private _object = player;

{ deleteVehicle _x } foreach allsimpleobjects ["Land_Baseball_01_F"];

private _positions = _selectionNamesMan apply { _object selectionPosition [_x, "HitPoints"] };

_position = _positions select { not (_x isEqualTo [0,0,0]) };

{
	createSimpleObject ["Land_baseball_01_F", ATLtoASL (_object modeltoworld _x)];
} forEach _positions;

Move your character away and you'll see baseballs at each of the named selection positions. The left leg (knee) is noticeably absent. If you reduce the list of selection names to just "leftleg", you'll find that that one baseball will appear at the player's groin.

Additional Information

Any system that involves allowing a player to interact with or indicate body parts is going to be a bit confusing.

Event Timeline

JB47394 created this task.Apr 19 2019, 7:01 PM

And now it's working correctly. Same code, same game session, but the knee baseball now shows up where it should.

Another day in paradise.

Ah. One change was made. I went from

_object selectionPosition [_x, "HitPoints"]

to

_object selectionPosition _x

For whatever reason, asking for the selection position as "HitPoints" doesn't return a good value for "leftleg"