-
Notifications
You must be signed in to change notification settings - Fork 2k
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
lua_api.txt: more detailed documentation of 'set_attach' method. #11632
lua_api.txt: more detailed documentation of 'set_attach' method. #11632
Conversation
This paragraph sounds good to me but its grammar should be fixed and the "multiply coordinate by 10" should not be called a bug. |
This text would fit well into a modding guide. lua_api.txt is an API reference, not a tutorial. |
@sfan5 which a grammar should be fixed? I didn't see any mistakes or typos in the text. This is a bug because it is necessary to multiply position by 10 and also it was confirmed by rubenwardy on Discord. |
So can it be merged now or how? It is just impossible to review long-term as there is no even a code, just an extension for the API documentation. |
@sfan5 I made fixes by replacing some sentences with your suggested ones, but some ones I've decided to remain particularly the mention about the relative rotation is a sum of the own, the parent's and the relative rotations. |
That's better but grammar is still wrong in a few places, apostrophes are |
Added references to the model dimensions in two places, replaced the apostrophes to the single quotes. I think the example is important, because I show how the relative position should be set correctly for the child. And can you elaborate in which sentences grammar is wrong? |
Should be reduced to a note on
|
@appgurueu if it is better to make as notes for
So ok? |
@appgurueu So, what do you think about my suggested changes to the attachment doc above? |
Yes |
…a separate clause.
Done. |
@appgurueu @sfan5 are your objections/suggestions about this PR? Can it be merged now? |
should appear in first person. Default `false`. | ||
* This command may fail silently (do nothing) when it would result | ||
* `bone`: string. | ||
* This is a name of the parent's bone that is set with `set_bone_position`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't it from the model/mesh?
* Relative to the parent's model space. | ||
* Default is {x=0, y=0, z=0}. | ||
* Note: Just like model dimensions, it should be multiplied by 10 | ||
to set it actually proper. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to set it actually proper. | |
compared to a world position. |
* Note: Just like model dimensions, it should be multiplied by 10 | ||
to set it actually proper. | ||
* `rotation`: {x=num, y=num, z=num}. | ||
* Rotation around each axis in degrees. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Rotation around each axis in degrees. | |
* Rotation around each axis in degrees, relative to parent's rotation. |
After some discussions on Discord and in #11582 which relate to my misunderstanding of the objects attachment mechanism, I found it necessary to finally document about it not to repeat my mistakes in future. Correct me though, if I wrote something wrong.
To do
This PR is Ready for Review.
How to test
Just read the changes in the only file.