Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve targeting bones of resource generating structures #4060

Closed
8 tasks
Garanas opened this issue Jul 20, 2022 · 3 comments
Closed
8 tasks

Improve targeting bones of resource generating structures #4060

Garanas opened this issue Jul 20, 2022 · 3 comments
Labels
area: sim Area that is affected by the Simulation of the Game status: need modeler

Comments

@Garanas
Copy link
Member

Garanas commented Jul 20, 2022

Description

Targeting bones are used for weapons to aim at. Bones are defined in the mesh (.scm) file. The targeting bones are defined in the unit blueprint. As an example:

    AI = {
        TargetBones = {
            'Target_Bone_01',
            'Target_Bone_02',
            'Target_Bone_03',
            'Target_Bone_04',
        },
    },

image
Targeting bones that are inside their collision box of an UEF Tech 3 power generator

When a unit has no target bones defined it defaults to the center bone. The center bone is usually located at center of the unit, where it touches the terrain. This is fine for projectiles with an arc, but it is horrible for beam weapon as it makes them a lot more prone to terrain collisions. Hence we'll go and tackle it in this pull request, starting with resource generating structures.

image
The Seraphim destroyer is able to destroy the tech 1 Aeon mass extractor because it has some targeting bones defined, but the tech 2 Aeon mass extractor does not, and is therefore immune due to a tiny hill on the beach

Course of action

For this pull request we'll solely tackle resource generating structures. These often lack targeting bones, or they are inconsistent. We'll make them consistent in this pull request.

  • Tech 1 mass extractors: add or use one bone near the top of the collision box of the unit

  • Tech 1 mass extractors: add or use one bone near the top of the collision box of the unit

  • Tech 1 mass extractors: add or use one bone near the top of the collision box of the unit

  • Tech 1 power generators: add or use one bone near the top of the collision box of the unit

  • Tech 2 power generators: add or use two bones near the top of the collision box of the unit, on some axis that makes sense

  • Tech 3 power generators: add or use three bones near the top of the collision box of the unit, on some axis that makes sense

  • Tech 2 fabricators: add or use one bone near the top of the collision box of the unit

  • Tech 3 fabricators: add or use two bones near the top of the collision box of the unit

A few remarks:

  • The targeting bone should be (well) inside the collision box of the unit, otherwise weapons can miss by default
  • The targeting bone should be (well) inside the mesh of the unit, otherwise it feels unintuitive to players
  • Some units already have separate targeting bones, you can remove / adjust those to meet the requirements of this pull request

If you need to adjust a mesh because no valid target bones are available, mark it via a comment in this topic. As of writing this the Python exporter has a bug that causes animations to break. We'll need to approach this via the 3ds Max exporter, but that software is quite expensive.

List of useful hotkeys:

  • Alt + V: Show bones
  • Alt + B: Show bone names
  • Alt + Ctrl + Shift + c: Show collision boxes

All these hotkeys require cheats to be enabled.

Test plan

For each adaptation, make sure that:

  • A group of mantis can hit the unit in question, all projectiles should hit by default
  • A seraphim destroyer can hit the unit in question when the destroyer is in the water, near the shore of the beach position on the map Seton's Clutch, similar to the image attached
@Garanas Garanas added area: sim Area that is affected by the Simulation of the Game status: need modeler labels Jul 20, 2022
@MadMaxFAF
Copy link
Contributor

The targeting bone should be (well) inside the collision box of the unit, otherwise weapons can miss by default

and inside the mesh too

@Garanas
Copy link
Member Author

Garanas commented Jul 20, 2022

Added 👍

@Garanas
Copy link
Member Author

Garanas commented Aug 1, 2022

Closed in favor of #4067

@Garanas Garanas closed this as completed Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: sim Area that is affected by the Simulation of the Game status: need modeler
Projects
None yet
Development

No branches or pull requests

2 participants