Attach-constrained element attachment
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C++
- Star
- 1.9k
- Fork
- 588
- Merge trung bình
- 4 ngày 9 phút
- Pull request đã merge (30 ngày)
- 11
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của multitheftauto/mtasa-blue
-
engineSetModelFlag, engineGetModelFlag, engineSetModelFlags and engineResetModelFlag return errorĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
multitheftauto/mtasa-blue#3186 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
bindKey shouldn't be able to bind function multiple timesCó thể đã có người làm @iManGaaX đã nhận 10 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
multitheftauto/mtasa-blue#2629 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Protocol Error 67Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
multitheftauto/mtasa-blue#5553 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
multitheftauto/mtasa-blue#5552 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Crash every time disconnectingĐang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 43/100
multitheftauto/mtasa-blue#5550 · 1 reaction ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của multitheftauto/mtasa-blue
Issue tương tự
-
area/ysql kind/bug priority/medium status/awaiting-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
yugabyte/yugabyte-db#37523 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Cockatrice/Cockatrice#7896 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
mlir
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
llvm/llvm-project#241070 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
ros-navigation/navigation2#6771 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
backlog documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 96/100
EchoTools/nevr-runtime#2354 ·
Maintainer thường phản hồi trong vòng 1 ngày