V!nc3r Posted April 28, 2017 Share Posted April 28, 2017 I don't know if some other people here have little difficulty to visualize what is a vector in 3d space, but I had to help myself so as to set directionnalLight direction, which is a vector3 value. So I set this little playground and I put it here if this can help others http://www.babylonjs-playground.com/#HEACG9#2 It may be useful to help orient a camera, a directionnalLight, and whatever. GameMonetize, Wingnut, usoban and 1 other 4 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 29, 2017 Share Posted April 29, 2017 Cooool! I got a pebble here somewhere... where is that thing? It's a magic pebble, and ya rub it... and it does... um... light.setDirectionToTarget(some.position [vec3]). (sometimes useful) I know your direction vector pain, V-man! Been there, sweated that sweat, said those dirty words. heh. Direction vectors have magnitude, too... and if you increase the magnitude... the direction stays the same... it's just POINTING HARDER! haha! God, that's funny, but correct. Then if ya normalize one of them puppies, it sets all three magnitude levels.... to values between -1 and +1, and then... it STILL points the same way, except.... whimpy pointing. ROFL!!! Ahh, directionVectors and magnitudes... the most evil things to ever walk the planet... except for Quaternions. Cool playground, thanks V! Well done. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 30, 2017 Share Posted April 30, 2017 http://www.babylonjs-playground.com/#HEACG9#5 Had a little fun. Changed to a 2-vector system, and then used those 2 directions (direction1 and direction2) on a zero-gravity particleSystem with custom updater func... to make the particles sparkle. Good times. V!nc3r 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 30, 2017 Share Posted April 30, 2017 Other option: using the RayHelper http://www.babylonjs-playground.com/#HEACG9#6 Wingnut and V!nc3r 2 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 30, 2017 Share Posted April 30, 2017 Very nice... good idea. http://www.babylonjs-playground.com/#HEACG9#7 In this one... I increase the "magnitude" substantially. I would like to "convert" that magnitude... to ray.length. Likely, there is no "standard" for length-to-magnitudeValue ratio. A ray with non-normalized direction of (-10, 0, 100) does not necessarily extend-to worldspace position (-10, 0, 100). We are free to set ANY ray.length-to-magnitude we wish, yes? (anyone, not nec DK). But, for the sake of experimentation, would anyone like to help me do a formula... so ray.length DOES align 1-to-1 with worldspace? (ray-line actually ends at -10, 0, 100 because ray.length is "bound" to direction magnitude). ray.length = direction.divide(new BABYLON.Vector3(.1, .1, .1)) ?? Nah, that's not even close. hmm. Syncing/binding magnitude to a ray.length. ["Why, Wingnut, why? It will just confuse you even more!"] Is the magnitude of a direction vector... its volume control? Its pointing intensity? Perhaps I have worked-with the first arg of applyImpulse()... too often, huh? In THAT case, the magnitude of the directionVector == thrust power. But, for lights that use direction... the magnitude of that direction COULD BE used to set light.range, right? Yuh yuh yuh, I think it COULD be so, if wanted. Arrow Scaling 101. heh Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted May 1, 2017 Author Share Posted May 1, 2017 I like the RayHelper. Wingnut you're crazy Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 2, 2017 Share Posted May 2, 2017 hehe. Oh man, could I tell you a story... about Wingnut and "arrows"! I did some freelance research... into societal herding tendencies. At first, I was trying to determine what factors affected people joining orgs, such as religions and capitalism. And I studied what made something... "normal". People tended to herd towards "normal". That was the primary arrow/direction that they followed. The amount of fanaticism they follow anything-with... is the arrow's magnitude. Wow, huh? How hard... how powerfully... does the arrow point? It seemed... folks also follow stories/storytellers (evident with TV/movie/child-stories popularity). The better the storyteller (the prettier and higher-magnitude the arrow - Disney/Pixar/ILM/LucasArts), the more people follow the arrow (drawn-into, attracted-to). Then, I noticed that there were four basic types of people, as far as arrows were concerned: 1. People who follow arrows. 2. People who install/magnify arrows. 3. People who take-apart arrows to see what makes them point. (rare) 4. People who completely ignore arrows (rebels/rogues) - rarely care about being/seeking "normal" - often take arrow.negate() route... just to piss-off arrow installers and go-against societal directional expectations. Deviants... deviating from societal norms. Arrow Ops 101 - Directioning and Magnituding. heh. Hoopla generating. Enthusiators (peddling/advertising). Remember C3PO storytelling to the Ewoks on the forest moon of Endor? Cool. They were all mesmerized with enthrall. Drooling. It's a gruesome subject to study. Be afraid... be very afraid. Humans LOVE following stories/arrows. It's built into our brains, for some reason. The study of THAT... could take a lifetime. What the hell were we talking about here? Oh yeah, direction vectors. erf. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.