Tattooshop Posted May 21, 2020 Share Posted May 21, 2020 Hello dear scripters! How to create the simplest swinging 'no hinge' door script? I can certainly not reinvent the wheel and take it ready, but I want to understand how it works. Link to comment Share on other sites More sharing options...
Rolig Loon Posted May 21, 2020 Share Posted May 21, 2020 (edited) Start by reviewing the basics in the sticky thread on door scripting at the top of this forum. Edited May 21, 2020 by Rolig Loon 1 Link to comment Share on other sites More sharing options...
Tattooshop Posted May 22, 2020 Author Share Posted May 22, 2020 18 hours ago, Rolig Loon said: Start by reviewing the basics in the sticky thread on door scripting at the top of this forum. Thank you! very good topic! So I read it, but stuck on PRIM_ROT_LOCAL. I just can’t see what this vector is (< 1,0,0 > etc...) and how to express through it a rotation of 90 degrees along the z axis? It’s clear with PRIM_POS_LOCAL, it is expressed in meters... Link to comment Share on other sites More sharing options...
Tattooshop Posted May 22, 2020 Author Share Posted May 22, 2020 Do you think it will be enough to indicate a rotation of 90 degrees and an offset of half a meter along the axes X and Y for a one meter wide door using SLPPF? for the simplest door script? Link to comment Share on other sites More sharing options...
Rolig Loon Posted May 22, 2020 Share Posted May 22, 2020 (edited) 26 minutes ago, Tattooshop said: I just can’t see what this vector is (< 1,0,0 > etc...) and how to express through it a rotation of 90 degrees along the z axis? You're referencing something a bit out of context, so I can only guess what you mean. If you want to rotate an object 90 degrees around its local Z axis, you'll want to use llSetLinkPrimitiveParamsFast(number_of_link,[PRIM_ROT_LOCAL, llEuler2Rot(<0.0, 0.0,PI/2>) * current_local_rotation]); where you have already determined what that link's current_local_rotation is. 18 minutes ago, Tattooshop said: Do you think it will be enough to indicate a rotation of 90 degrees and an offset of half a meter along the axes X and Y for a one meter wide door using SLPPF? for the simplest door script? That sounds right. After all, the visible (hinge) edge of the door is halfway along its X dimension and halfway along the Y (thickness) of the door. I'm not sure which approach you think creates the "simplest" door script. As you can see from reading through that thread, there are many ways to script a door. The simplest one is the one that fits your own needs best and is appropriate to the type of door you have created. Edited May 22, 2020 by Rolig Loon 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now