Tag Info

New answers tagged

5

As the commenters on the opening post have already pointed out, this mechanism is called 'perspective correction' or in 3D terms 'perspective projection'. The basic idea is that as things get further away, they get smaller. It's all about trigonometry (calculating triangles). You can calculate this by assuming that your Field of View is like a pyramid ...


0

First of all, you should stop incrementing inventory, if you don't spawn more projectiles. Example: if (Input.GetTouch(i).phase == TouchPhase.Began){ if(inventory < 3){ // spawn 3 at max OnShoot (); inventory++; } } Then decrease inventory whenever a projectile gets destroyed. Eg. void OnTriggerEnter2D(Collider2D other) { ...


1

I would agree that it would be best to go fully 3D billboard with this. You can do this without shaders (well, you would use the built in BasicEffect which is an already written shader for you). Move the camera away from the scene and decrease the FOV. here's why: When you move the camera close to the scene and widen the FOV, the close fighter (blue ...


3

You can do this in two ways, both of which require 3D cameras and projection: First, give all of your objects a 3D position in the world. // XYZ Vector3 Position; Next, create a camera with a position and orientation: class Camera { // Position of the camera in the world Vector3 Position; // Place where the camera is looking Vector3 ...



Top 50 recent answers are included