Gijs Posted December 4, 2016 Share Posted December 4, 2016 (edited) On 3-12-2016 at 10:31 PM, Dad72 said: If there is one manners more general, I definitely want to see it. There is, and it is by pulling the ground over a mesh. So you would create a ramp mesh (ground), and then pull the ground over it. It works better than the old code, and you can do much more with it as well. Here it is: http://www.babylonjs-playground.com/#GQ83J#3 The brush size is now in BJS units. I also added some example shapes you can uncomment. I like how elegant the new addRamp function has become Edit: I fixed a wrong ray length in the code, added a new option to not let the ground go lower (allows ramps to go through each other), and corrected the comments: http://www.babylonjs-playground.com/#GQ83J#4 Edited December 5, 2016 by Gijs Fixed ray length code, added feature, corrected comments Wingnut, Kemal UÇAR, getzel and 2 others 5 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 4, 2016 Author Share Posted December 4, 2016 Hi Gijs, Woaw, it's really excellent. I will use this solution on my editor. Thank you very much for this new addRamp function Gijs and Kemal UÇAR 2 Quote Link to comment Share on other sites More sharing options...
gryff Posted December 5, 2016 Share Posted December 5, 2016 @Gijs as Dad72 says "excellent". Very impressive Hope we see more from you cheers, gryff Kemal UÇAR, Gijs, Dad72 and 1 other 4 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 11, 2016 Author Share Posted December 11, 2016 @Gijs Hello, Have you any idea how to put the texture correctly on the sides of the ramp so that it is not widened. I mean when the ramp is creating, the texture on the sides is large. Is it possible to re-scale to avoid this texture large. http://www.babylonjs-playground.com/#GQ83J#4 Thanks again Gijs 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 15, 2018 Author Share Posted September 15, 2018 Hi @Gijs, I'm coming back to you because you're the author of this feature that worked well before. But now, there is something different depending on the click and I do not know why. I told myself that you can understand better than me what happens. Try this PG to create multiple ramps in multiple directions. they are not placing correctly. I also noticed that if the terrain is not subdivided enough, it does not create flat ramps anymore. and if on a ground of 500 * 500 subdivisions of 500 are made that ground lose a lot of performance. And the bigger the terrain, the narrower the radius of the ramp (it would take a multiplier ratio, I guess, depending on the size of the terrain) The ideal would be to subdivide only the part of the ramp. You think it's possible? Thank you for your help. http://www.babylonjs-playground.com/#GQ83J#9 Quote Link to comment Share on other sites More sharing options...
Raggar Posted September 16, 2018 Share Posted September 16, 2018 If only I could remember what I did to fix the positioning. I ended up using a ribbon instead of a ground. This way, I create the ramp shape based on 4 clicks/picks. One for each corner. http://www.babylonjs-playground.com/#GQ83J#10 Click 4 times to create the ramp. Gijs and Dad72 2 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 16, 2018 Author Share Posted September 16, 2018 Pretty one. It's perfect. That works well. Thank you Raggar 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.