Tag Info

Hot answers tagged

4

This is entirely a matter of convention. (Since you didn't mention any particular tools.) But! If you are modeling in the same default orientation as your screen, which you say is right-handed, X-right, Y-up, and therefore Z-towards-you, then it would be natural to model your characters facing you, where forward is Z-positive. Which also implies your ...


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 ...


3

You can use the OnBecameInvisible callback for that. Just implement something like: void OnBecameInvisible(){ // disable or destroy gameobject } The method will get called when the object isn't being rendered by any camera anymore. This also includes cameras from the Unity-Editor. So if you're running your game and have the Game and the Scene view ...


2

First your use of the aspect ratio is nonsense. The aspect ratio is the relation of width to height. So if you have float aspectRatio = (float)myGameHeight / (float) myGameWidth; This means that the the following is true: myGameHeight == aspectRatio * myGameWidth If you want to preserve the aspect ratio of the screen you need to do the following: ...


1

Hello I suggest you use Raycasting to test if the camera is directly pointing to the light source. The ray will go from the camera into the front vector direction, Once you get the RaycastHit, you can check the name, the tag or even use Layer Mask to selectively ignore colliders. If you want to apply the effect even when the camera is not pointing directly ...


1

FOV is field of view. Everyone likes to say that there is no camera in OpenGL, but to me that's a silly notion to hold on to even if it might be technically true. When you use the perspectiveCamera function you are essentially creating a camera. So think of the FOV as the type of lens. Is it a wide angle lens or more of a zoom lens? The FOV is given as ...


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 ...



Only top voted, non community-wiki answers of a minimum length are eligible