Attach-constrained element attachment
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start by reading the existing attachElements function and how it is exposed to Lua. Work out how attachment state is represented before assessing how the six inheritance flags could be applied. Done means an already-attached child can selectively inherit position and rotation axes, with each flag defaulting to true.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is your feature request related to a problem? Please describe.
The current attachElements function attaches one element to another so that whenever the parent changes its position or rotation, the child follows along. However, there is no way to restrict which axes the child should inherit from the parent — it always follows all transformations completely.
Describe the solution you'd like
A new function attachWithConstraints that works on an already-attached element — since the parent is already known after attachElements is called, there is no need to pass it again. The function receives only the child element and boolean flags controlling which axes should be inherited (all defaulting to true).
Suggested syntax:
bool attachWithConstraints ( element theElement,
[ bool x = true, bool y = true, bool z = true,
bool rx = true, bool ry = true, bool rz = true ] )
Example — child only rotates on the Y axis:
-- Attach normally first
attachElements(childElement, parentElement)
-- Then define the constraints (position free, only Y rotation)
attachWithConstraints(childElement, false, true, false, false, true, false)
Describe alternatives you've considered
The current workaround involves multiple objects and manual matrix calculations:
- The main object is attached to the vehicle, with rotations managed manually
viasetElementAttachedOffsetseach frame. - A base object must follow only the position of the main object (no rotation inheritance).
- A secondary object must follow the position and only the Z rotation of the main object.
To achieve this, it is necessary to retrieve the matrix of the main object every frame
and perform the axis calculations manually in Lua — which at scale becomes expensive on the CPU.
The proposed attachWithConstraints function would handle this natively, eliminating
the per-frame matrix reads and manual calculations, significantly reducing CPU overhead.
Additional context
Here is a video demonstrating the problem and the motivation for this feature:
https://github.com/user-attachments/assets/0e5d969d-7db2-4dbd-8c39-f613567d997a
Security Policy
- I have read and understood the Security Policy and this issue is not about a cheat or security vulnerability.
- Lenguaje dominante
- C++
- Estrellas
- 1.9k
- Forks
- 588
- Merge medio
- 4 d 9 min
- PR fusionados (30 d)
- 11
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de multitheftauto/mtasa-blue
-
engineSetModelFlag, engineGetModelFlag, engineSetModelFlags and engineResetModelFlag return errorAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
multitheftauto/mtasa-blue#3186 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
bindKey shouldn't be able to bind function multiple timesPosiblemente ocupada @iManGaaX la tomó hace 10 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
multitheftauto/mtasa-blue#2629 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 3 días
-
Crash every time disconnectingAbiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 43/100
multitheftauto/mtasa-blue#5550 · 1 reacción ·
Los mantenedores suelen responder en 3 días
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
multitheftauto/mtasa-blue#5549 · 2 comentarios ·
Los mantenedores suelen responder en 3 días
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
multitheftauto/mtasa-blue#5547 · 4 comentarios · 1 reacción ·
Los mantenedores suelen responder en 3 días
Todos los issues de multitheftauto/mtasa-blue
Issues similares
-
mlir
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
llvm/llvm-project#241070 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Page request: clang-replAbiertohelp wanted new command
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
tldr-pages/tldr#25111 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Ask the `ServerHelper` for fresh headers on every poll in `Future::get`, as is done for cookiesAbiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
NVIDIA/cuda-quantum#5886 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día