ACE3 icon indicating copy to clipboard operation
ACE3 copied to clipboard

GM Compatibility for replacing wheels

Open nomisum opened this issue 5 years ago • 4 comments

Mods (complete and add to the following information):

  • Arma 3: 1.98 stable
  • CBA: v3.15.1.200418 stable
  • ACE3: 3.13.2 stable

Description: Replacing tracks/wheels on GM vehicles is not possible.

Steps to reproduce: Place a GM vehicle (e.g. BTR-60, P601), remove its wheel.

Expected behavior: As with any vanilla vehicle there should be an action to replace the wheel. But no action shows up.

Where did the issue occur?

  • Dedicated & Singleplayer

Log Files: none

Additional context: GalComT (GM dev) believes to remember the cause is in GM not following the vanilla naming convention for wheel hitpoints. (https://discordapp.com/channels/245546995874267147/568004733902651393/712352221659922454)

Screenshots: vlcsnap-2020-05-20-11h14m03s279 20200520140758_1

nomisum avatar May 20 '20 12:05 nomisum

i would love to solve this in https://github.com/acemod/ACE3/pull/7835 but i cant figure out whats going on.

ace_repair_fnc_canReplaceWheel returns true but action doesnt show up. replaceWheel action has same position as removeWheel action which is showing up correctly.

selections are named hitpoint_wheel_1_1 instead of wheel_1_1_steering in GM but as it works for removeWheel it should work for replacing too imo.

maybe someone with more knowledge about this topic can advise @BaerMitUmlaut ?

nomisum avatar Jun 28 '21 11:06 nomisum

ftr BaerMitUmlaut has no idea either 😕

nomisum avatar Jul 13 '21 10:07 nomisum

None of the actions are where they should be. I tested on the "gm_ge_army_fuchsa0_command" and I got wheel removal actions in the driver side windows...

The reason why is because getAllHitPointsDamage returns: ["hithull","hitbody","hitfuel","hitengine","hitlfwheel","hitrfwheel","hitlf2wheel","hitrf2wheel","hitlmwheel","hitrmwheel","hitglass_0_0","hitglass_1_1","hitglass_1_2","hitglass_2_1","hitglass_2_2","hitglass_3_1","hitlbwheel","hitrbwheel","hitrglass","hitlglass","hitglass1","hitglass2","hitglass3","hitglass4","hitglass5","hitglass6","#hitpoint_lightfront_1_1","#hitpoint_lightfront_1_1","#hitpoint_lightfront_1_2","#hitpoint_lightfront_1_2","#hitpoint_lightfront_2_1","#hitpoint_lightfront_2_2","#hitpoint_lightback_1_1","#hitpoint_lightback_1_2"]

The wheels are not included the hit selections array, but they are included in the hit points array, something that is needed for finding the wheel hitpoints in FUNC(getWheelHitPointsWithSelections).

I'm not sure what can be done about this - any suggestions?

johnb432 avatar Aug 29 '23 16:08 johnb432

I've found another problem, which I've reported along with the first discovery in the GM discord:

https://discord.com/channels/245546995874267147/572495109975703553/1259809913660510350

A copy of the text:

I'm trying to address wheels not being able to be replaced with ACE when a vehicle's wheels are damaged. There are two problems as far as I have been able to tell:

  1. For most vehicles I've tested (exceptions are BRDM and Luchs) selectionPosition returns different positions for when a wheel is intact vs fully destroyed. Example: For gm_ge_army_kat1_452_container, cursorObject selectionPosition "hitpoint_wheel_2_1" returns [-0.951436,-0.944285,-2.15989] when said wheel is intact, where as it returns [0,1.60933e-05,-0.130896] when the wheel is destroyed. This means the ACE interaction to replace the wheel is near the center of the vehicle, not where one would expect (also it can be tricky to get close enough to the interaction).

  2. In the case of the Fuchs, getAllHitPointsDamage cursorObject doesn't return wheels in the selection array. ACE uses getAllHitPointsDamage to determine which selections are wheels.

I might be able to accommodate for something in ACE for the second issue, but I'm hoping it's easier to fix on your end than to add an exception on ACE' end. Unfortunately ACE can't implement anything for the first issue, unless a cache is used for the positions - but that couldn't account for the effect of the active suspension and it changing the position of the wheel hubs, making it a suboptimal solution.

I don't think there is much ACE can do for both issues.

johnb432 avatar Jul 08 '24 09:07 johnb432