XTender Posted November 19, 2017 Share Posted November 19, 2017 I try something pretty easy (I think) but I cant make it work. The want that the faces are aligned in their direction between two world space Vector3. The position on the screenshot is not correct but that's not the problem. I tried it with lookAt for the mesh and also played a bit around with RotationFromAxis from this example http://www.babylonjs-playground.com/#1QM99D#6 But its always not correct rotated, correct would it be when they are aligned along the edge between the two vertices where currently the feces are placed. Any suggestions? Quote Link to comment Share on other sites More sharing options...
jerome Posted November 19, 2017 Share Posted November 19, 2017 RotationFromAxis() is the way to go here ... but I don't understand what you're trying to achieve in your PG Quote Link to comment Share on other sites More sharing options...
adam Posted November 19, 2017 Share Posted November 19, 2017 1 hour ago, XTender said: where currently the feces are placed. I hope this was a typo. Wingnut 1 Quote Link to comment Share on other sites More sharing options...
adam Posted November 19, 2017 Share Posted November 19, 2017 Like Jerome, it isn't exactly clear to me what the issue is. This PG might help if the issue is that you are having trouble keeping the fences upright: https://www.babylonjs-playground.com/#1QM99D#13 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 19, 2017 Share Posted November 19, 2017 Hi guys. This issue is related-to the old cylinderBetweenPoints() function that is laying around in some playgrounds. Xtender wants the fence-section to start at END of previous fence-section run, and go to some "next fence-section start position". He is having a difficult time determining the Y-rotation needed to accomplish that. (not uncommon) He needs fenceSectionBetweenPoints() Each fence section might need a gizmo/invisible-parent... as a central rotating/positioning device. It also might be wise to set the fence-section pivotPoint/origin... to the start-point (left-edge?) of the fence-section. Not sure... still thinking. A playground search for 'vend' will find all those playgrounds. One of them is here: https://www.babylonjs-playground.com/#1MQTOG#0 Hope this helps (and clarifies). Quote Link to comment Share on other sites More sharing options...
adam Posted November 19, 2017 Share Posted November 19, 2017 Something like this? https://www.babylonjs-playground.com/#1QM99D#14 another: https://www.babylonjs-playground.com/#1QM99D#15 Arte, jerome and Wingnut 3 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 19, 2017 Share Posted November 19, 2017 Nice. I had a purrrdy, fancy, fence thing going... but... too artsy... couldn't beat Adam to the draw. Mine wasn't going to use picked points... just an array of fence post points. If each fence section has a set width (and it does), then... hmm. Needs thinkin'. I want to make an irregular-shaped circle of fencing, just to experiment. Adam will beat me to that, too... but I always learn stuff from his code. (He's a friggin' genius. So is Jerome. I am among BIG guns, here.) Anyway, so far... https://www.babylonjs-playground.com/#1QM99D#17 Too slow. Not finished. Darned Adam... he's got a FAST draw. No outlaw challenge can gun him down in the streets. heh Later, we'll attach 2 physics hingeJoints between each fence section in the "circle", and create the first BJS physics-active bulldozer track. :/ Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 19, 2017 Share Posted November 19, 2017 https://www.babylonjs-playground.com/#1QM99D#21 Goofy fencing fun. Quote Link to comment Share on other sites More sharing options...
XTender Posted November 19, 2017 Author Share Posted November 19, 2017 2 hours ago, adam said: Something like this? https://www.babylonjs-playground.com/#1QM99D#14 another: https://www.babylonjs-playground.com/#1QM99D#15 When it works with uneven ground .. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 19, 2017 Share Posted November 19, 2017 Hi XT. Oh sure, now we have MORE hell. (Wingnut trying comedy, there, XT... ignore at-will) Let me predict: You want all vertical fence-boards... to remain perfectly vertical, even when section is running up/down a hill? Cross-boards can be angled up/down, but not verticals? Thoughts? Quote Link to comment Share on other sites More sharing options...
XTender Posted November 19, 2017 Author Share Posted November 19, 2017 Just ignore that the are fences. Imagen that they are just 3d "Lines" and I would like to place it between 2 V3 . The Position and Scaling is the easy part. its just the rotation thing. But I thing I come a bit closer, looks like my artist mad some failures in the model export. when i make the mesh lookAt the targer position its nearly perfect. only that its pointing in the complete opposite direction. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 19, 2017 Share Posted November 19, 2017 *nod* thx. Anything here? https://www.babylonjs-playground.com/#XALW2#14 connect() looks pretty easy/right. Arte 1 Quote Link to comment Share on other sites More sharing options...
XTender Posted November 19, 2017 Author Share Posted November 19, 2017 OK the issue was the wrong exported model :/ lookAt do the job right Quote Link to comment Share on other sites More sharing options...
adam Posted November 19, 2017 Share Posted November 19, 2017 51 minutes ago, XTender said: When it works with uneven ground .. https://www.babylonjs-playground.com/#1QM99D#20 jerome and Arte 2 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.