Don't click here unless you want to be banned.

LSL Wiki : llRotBetween

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl338.us.archive.org
rotation llRotBetween(vector a, vector b);

Returns the rotation needed to rotate from a to b, with a center of rotation at <0,0,0>.

Note: Be sure to normalize a and b before using llRotBetween, with llVecNorm. This automatically prevents any quirkiness on the part of this function.

vector a = <0,0,1>;
vector b = <1,0,0>;
rotation between = llRotBetween(a, b);
//Ignoring float precision loss these statements below are true.
//a * between == b 
//b / between == a


Q: Wuh?
A: Imagine a cube with an arrow sticking out of it. The base of the arrow is in the center of the cube, and we'll call that <0,0,0> (see next question). This arrow is vector a (a forward vector, if you will). After some arbitrary rotation, the base of the arrow is in the same place, but it's pointing off in some other direction, that's vector b. So, given vector a which is the way the cube is facing now, and vector b, the way you want to be facing, this function returns the rotation you need to get from here to there.


Q: What is a 'center of rotation'?
A: The center of rotation would be the center of the object that is rotating (the parent object of a link set). The math of this function assumes that the object's center is at <0,0,0>, so if you're getting your vectors from world-coordinates, make sure to subtract the task's position from them.




This article wasn't helpful for you? Maybe the related article at the LSL Portal is able to bring enlightenment.

Functions / Rotation Jasa SEO Jasa SEO Murah Sepatu Online Toko Sepatu Online Sepatu Sepatu Murah Sepatu Safety Sepatu Futsal Cheapes Hostgator Coupon Link Booking Televisori offerte Notebook Offerte Berita Terkini Internet Marketer Muda Internet Marketer Indonesia Portatile Apple RDAnet Lorks Karikatur Bisnis Modal Kecil Bisnis UKM Berita Terbaru Iklan Baris Jasa SEO Jasa SEO Murah SEO Indonesia Konsultan SEO SEO Belajar SEO Kursus SEO Kursus SEO Murah Jam Tangan Casio Jam Tangan Casio Jam Tangan Murah Jam Tangan Grosir Baju Terbaru Grosir Baju Baju Terbaru Grosir Baju Murah Bisnis Online Belajar SEO Kerupuk Kerupuk kulit Social Bookmark Dofollow Social Bookmark Kumpulan Puisi Kirim Puisi bola hantu Penumbuh Rambut Penumbuh Rambut timbangan WBC Wonogiri Jasa SEO Murah Jasa SEO Jam Tangan Murah
There are 2 comments on this page. [Display comments/form]