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:
@@ -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
|
||||
|
Reference in New Issue
Block a user