Hi, guys!
I’m working on small racing game (Away3d 3.6).
I want to show a ground under wheels of my car.
I placed a RedularPolygone on scene and move it to the same position where I have a car at the moment. I understand that I cannot place the ground of big size (like 10000x10000) because of perfomance. Right? So I use that polygone to simulate ground movement. I dont know how to move bitmapmaterial to correspond to car position change.
I dont know exactly what to do. I need code like this [every tick]:
floorMaterial.offsetX -= carSkin.x - carLastX;
floor.x = carSkin.x;
floor.z = carSkin.z;
if (floorMaterial.offsetX < 0)
floorMaterial.offsetX += 512;
carLastX = carSkin.x;
carLastZ = carSkin.z;
Please look at my demo
http://metaine.com/sites/undpv3d/bin-debug/Game.html - place a focus on game and use arrows to move the vehicle.
Thanks for helping me.