Quantcast
Viewing all articles
Browse latest Browse all 388

Modify mesh in a particular Viewport

Hi 

 

I am trying to develop very basic 2D car game. In the game I want to show a small map on top right side of the screen which is actually same track but with a zoomed out scene so that user can see what is coming ahead of the car. I was able to accomplish this but now my problem is in the zoomed out map car is very small mesh.

 

Is there any view where I can change size of a particular mesh(Car) and then create a view port

 

or can I change size of mesh(Car) in just one viewport. I am attaching screenshot of scenario and code by which I have implemented my existing code 

var camera1 = new BABYLON.FreeCamera("camera1",  new BABYLON.Vector3(0, 0, -8), scene);
camera.viewport = new BABYLON.Viewport(0, 0, 1, 1);
var camera2 = new BABYLON.FreeCamera("camera2",  new BABYLON.Vector3(0, 0, -50), scene);
camera2.viewport = new BABYLON.Viewport(0.8, 0.8, 0.2, 0.2);
scene.activeCameras.push(camera1);
scene.activeCameras.push(camera2);

Image may be NSFW.
Clik here to view.
forumscreenshot.jpg


Viewing all articles
Browse latest Browse all 388

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>