orient3d_model(3)

๐Ÿ“ฆ
version 0.7.1 ยท 2 versions
, in nixos 26.05

๐Ÿ’… orient3d_model(3) ๐Ÿ’…

okay bestie, welcome to the Arcan Lua API manual โ€” this is the orient3d_model(3) page and itโ€™s lowkey iconic โœจ

๐ŸŒธ NAME ๐ŸŒธ

orient3d_model โ€” set the base orientation for the specified model. slay ๐Ÿ’–

โœจ SYNOPSIS โœจ

       nil
       orient3d_model( model, roll, pitch, yaw )

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

Okay so the active orientation of a model is dynamically changeable โ€” thatโ€™s the whole vibe. But many models from external sources come with a different starting orientation ๐Ÿ˜ญ

You could compensate for that, but sometimes itโ€™s easier to just rotate the vertices once. Itโ€™s giving โ€œone-time vertex glow-up,โ€ honestly. The cost is O(n) in respect to the number of vertices in the model. Not me doing math in public, but there it is ๐Ÿงฎโœจ

๐ŸŽ€ NOTES ๐ŸŽ€

  1. Since this operates on the vertex data itself, with a transformation that can impose a loss of precision, it is not recommended that this is used more than once for any model. fr fr, be careful with this one ๐Ÿ’€

๐ŸŒˆ EXAMPLE ๐ŸŒˆ

hereโ€™s the example, bestie โ€” copy it exactly and itโ€™ll slay:

       function orient3d_model0()
             camera = null_surface(4, 4, 0, 0, 0);
             view = camtag_model(camera, 0);
             model = build_plane3d(-5.0, -5.0, 5.0, 5.0, -0.4, 1.0, 1.0, 0);
             show_image(model);
             orient3d_model(model, 10, 5, 2);
       end

๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘


thatโ€™s the whole page, periodt ๐Ÿ’… this one comes from the 3d source/version and is dated October 2026. mwah ๐Ÿ˜ฝ

๐Ÿ“ฆ where this page comes from