Search the Community
Showing results for tags 'direction'.
Hi! I am decent at scripting, but have a blind spot the size of Jupiter when it comes to rotations. I have a scenario where I have a flat prim on the ground (basically an invisible doormat), where a collision triggers a bit of chat to the agent. No biggie. However, I need it to respond differently depending on whether an avatar is moving in line with or contrary to the prim's local "forward" axis (x-axis in my test prim). After some testing, I figured I could theoretically do this with the rotation difference between the prim and the avatar. Depending on the global quadrant the prim is facing (and the direction the avatar is facing when walking), this is (in vectors) either <0.0, 0.0, 0.0> or <180, 0, 0>. This would basically cover scenarios 1 and 2 below where you move forward with W, with the camera position behind you. Trick is that it's also possible to move "backwards", by which I mean pressing the S, to that your avatar is facing the camera. (I'm leaving aside, for the moment, that an avatar can cross left-to-right or right-to-left as well) I also get the feeling that my lack of trigonometry skill is causing me to over-complicate things. Can someone point me in the right direction (pun totally intended) on how I can get this to work robustly? I attached an image detailing my four scenarios.
Hello! Help, please, with particles. I have a script, but it always emits particles in one direction, no matter how I rotate the object. How to make the emission change the direction when the object rotates (attached or rezzed)? Is this difficult? Thank you! ---------+--------- The problem solved. Just had to use 'cone' instead of 'angle'.