Page MenuHomeFeedback Tracker

[Feature Request] Expand attachTo
New, NormalPublic

Description

  • Add possibility to attach object to another by bones/selection/whatchamacallits
  • Add relative direction offset to accompany the position offset

As in something like

[_cig, "filter"] attachTo [player, [0, 0.003, -0.01], "mouth", true];

Which would attach the object _cig by the selection "filter" to player model selection "mouth" (given offset etc would still apply).

_beam attachTo [truck, [[0, 0, 0], 90]];

Would attach the object _beam to truck with direction 90 degrees relative to trucks direction.

Details

Severity
None
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Feature Request

Event Timeline

h- created this task.Mar 22 2024, 4:05 PM
dedmen added a subscriber: dedmen.Thu, Apr 25, 3:24 PM

???
attachTo can already attach to selection. And you can rotate it after attaching. Wiki even has example of that https://community.bistudio.com/wiki/attachTo
I don't get this? what is missing? As far as I can see its already all there

I think they want the ability to use the child object's selections as the reference point. The existing selection stuff is only for the parent.

NikkoJT removed a subscriber: NikkoJT.Thu, Apr 25, 6:55 PM
h- added a comment.Fri, Apr 26, 7:49 AM

Should have worded it better but what NikkoJT said, attach from child object selection to parent object selection.

So you don't have to try and trial-and-error-find an offset if the 'joint' position is important to what you're doing; for example if you have several different shaped and sized objects to attach to a parent it would be so much easier if you could use a mempoint on both the child and parent object to align them automagically.

You can already get position of a model selection/bone can't you?
So you can calculate the required offset

h- added a comment.Fri, Apr 26, 4:32 PM

Sort of I guess, problem is two-fold:
I'm almost completely mathematically illiterate :D

Due to that, or just due to circumstance the offset seems to not seem to be 100% correct when doing that -> I suppose because the child object is attached at its object center which might not be the "visual center".
What I mean is that for the engine the object center is not what the center might be visually for human looking at the rendered item in-game (I assume for the engine center is geometry center?), so one then needs to add another mempoint on the child object model to get the "visual center" for the child object, then calculate the offset for the parent object mempoint.
I have tried that but for some reason results are a bit funky, the "joint" is not correct so then you need to start moving that "center" mempoint 1mm a time, crunching an testing in-game until you get correct enough result. Which is exceptionally tedious when you have several objects to do this with.

It's hard to "argue" my point when the use-case I had in mind when writing this request is quite hard to explain, and/or I'm just doing something wrong due to being a dumbass..