Jump to content

Reinventing door script :D


Tattooshop
 Share

You are about to reply to a thread that has been inactive for 1435 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

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... :D

 

Link to comment
Share on other sites

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 by Rolig Loon
  • Thanks 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1435 days.

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
 Share

×
×
  • Create New...