1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-12 16:15:20 +02:00

Add First Person Attachments (#10360)

Fixes some other third person camera specific attachments.
Implements a single new flag for entities to be forced visible in first person mode.
Old mods do not need to be updated to use the new flag and are fully backwards compatible.
This commit is contained in:
Jordan Snelling
2020-10-04 14:10:34 +01:00
committed by GitHub
parent 0f98b54aa4
commit 3068853e8a
12 changed files with 101 additions and 35 deletions

View File

@@ -6167,12 +6167,14 @@ object you are working with still exists.
`frame_loop`.
* `set_animation_frame_speed(frame_speed)`
* `frame_speed`: number, default: `15.0`
* `set_attach(parent, bone, position, rotation)`
* `set_attach(parent, bone, position, rotation, forced_visible)`
* `bone`: string
* `position`: `{x=num, y=num, z=num}` (relative)
* `rotation`: `{x=num, y=num, z=num}` = Rotation on each axis, in degrees
* `get_attach()`: returns parent, bone, position, rotation or nil if it isn't
attached.
* `forced_visible`: Boolean to control whether the attached entity
should appear in first person.
* `get_attach()`: returns parent, bone, position, rotation, forced_visible,
or nil if it isn't attached.
* `set_detach()`
* `set_bone_position(bone, position, rotation)`
* `bone`: string