XTender

Textureproblem with endless Track

Recommended Posts

I try to build an endless Track for a small Game and currently I stuck on an textureproblem.

https://www.babylonjs-playground.com/index.html#9HEBCE#12

I use the CreateRibbon Method to build a lane out of an array. When I have 200 segments I remove the one at the top and move the camera temporary to the first one so currently it just looks like the lane is just waving but in reality the camera is moving (you can see it when you remove the camera position setting at the bottom.)

I scale the texture to fit the whole mesh but then it looks like the track is not moving :) I tryed it it the vOffset but that didnt worket out. What I need is some kind of "material/shader" which projects a texture always in the same way, no mater where the mesh is in the world so it would look like the track moves.

Or maybe someone have an another Idea how to achieve this.

Thanks :)

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.