Tag Info

Hot answers tagged

2

There are 2 main types of projections used in video games and 3d applications: Perspective Orthogonal Perspective This type of projection is the one that is the most commonly used to represent a 3d world simulation; it acts a little like a normal camera with lenses. All the elements of the scene are projected toward a single point, but drawn on a plane. ...


2

Let's rephrase your question: Given a rotation R, and a position p, we would like the rotated point p' to lie along the Z-axis (also known as the center of the camera). For this, we can use linear algebra: Compose the rotation matrix R from your euler angles. Solve the problem Rd = [0 0 1]^T, or | 0 | d = inv(R) | 0 | | 1 | d is ...


1

When you "enter full-screen", the base window's border is removed and it is re-sized and moved such that its' ClientBounds == ScreenBounds. When this occurs, the Device is destroyed ("lost"), and needs to be recreated. At the same time, the back-buffer and any other textures or rendertargets that should be "full-screen" must also be re-created with the new ...


1

I think you want eyeY = -10, upX = 0, and upZ = 1. The other values can stay. Your given and desired points suggest you want to rotate the camera position and its up vector about an axis parallel to (1, 0, 1) by angle PI. Doing that would yield the values I listed above. Can you explain why this is happening? It looks like you are getting ...


1

You need to distinguish between the gl-viewport and the cameras viewport. The GL-viewport somehow defines the area on the Display, while the cameras viewport defines the area in the game world. So a camera with a viewport of (1/1) can see 1 unit of your world in width and height and projects it to the gl-viewport. For example: You have a Camera with a ...


1

This answer works properly : beginner: camera quaternion rotation (space sim)


1

Sounds to me like what you need is to define a box in the middle of the screen, and only if the car moves outside of that box then the camera will move. That way the car has a bit of freedom to move without the camera moving, but as soon as it gets too far away from the center of the screen the camera does follow it. This is similar to the technique used in ...


1

There are lots of ways to do this, though MoveTowards seems reasonable for your purposes. Essentially, you'll want to determine some speed you want the camera to follow the car. Let's say that's float cameraFollowSpeed; Then you need to adjust that to be framerate independent with Time.deltaTime So now FollowCar's Update() your code is something like ...



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