Questions tagged [viewport]

An area (typically rectangular) expressed in rendering-device-specific coordinates, e.g. pixels for screen coordinates, in which the objects of interest are going to be rendered

23 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
801 views

Why doesn't the Camera.pixel(Height/Width) match the Canvas size?

I am making an app that has a custom viewport Rect like so: When I check the sizes of this viewport rectangle in pixels with Camera.pixelHeight; Camera.pixelWidth,...
1
vote
0answers
33 views

Drawing angle between 2 rays

Currently, we can draw rays in real time, like this: ...
1
vote
1answer
673 views

How to do in Godot 2D: game screen in one viewport and minimap in another. Different sprites on each

The second day I google the tutorials, but nothing comes of it. All tutorials link to splitscreen demo, but it is made under the second Godot and does not work in the third. The problem is this: I ...
1
vote
0answers
208 views

Performance problems with scrolling html5 canvas for large tile-based game

I try programming a splix.io clone as an electron app and do the visualization via the html5 canvas. The movement across the tiles should look fluent like the original, so I target 60 frames a second. ...
1
vote
2answers
445 views

libgdx Camera and World Size Question

I'm new to libgdx and especially to using OrthographicCameras. I'm trying to understand how useful they are. The question is, suppose I have a game map 500 units wide. I have an OrtographicCamera ...
1
vote
0answers
578 views

get position of GameObject on rendertexture from camera

I'm rendering the camera output to an rendertexture on a plane. This works fine. But I want to put GameObjects on the rendertexture on positions of world objects that are visible on the camera. <...
1
vote
0answers
65 views

Implementing navigatable achievement menu in javascript

I am in the process of learning javascript for game design, and wanted to make a separate achievement page that the user can navigate to that will allow them to check their achievements on various ...
1
vote
0answers
339 views

Libgdx handle screen resolutions

I know there are some questions to this topic, but i didnt find a satisfying answer for my problem yet. I'm learning to use libgdx right now, and I'm not sure about handling different screen ...
1
vote
3answers
288 views

LibGDX - Trying to make a radar-like display

i have an interesting question about geometry. I have two or more moving objects outside of my stage's viewport (blue and red circle in the image below), which i want to point at with two arrows on ...
1
vote
0answers
383 views

Create multiple viewports in minecraft?

Im new to minecraft modding, but Im curious about the possibility of creating a mod such that players could set up a 'security camera' with its own viewport so that the player could 'see what the ...
1
vote
1answer
514 views

glViewport and single-pass cubemap rendering

This question is related to another question of mine on StackOverflow. The problem I'm facing is that while I'm rendering to a cubemap in a single pass using a geometry shader (like I show in my ...
1
vote
1answer
267 views

Scene2D viewport affects all other cameras despite having a separate one

I have two cameras initialized as such: ...
0
votes
0answers
97 views

Bizarre Viewport bug in Maya 2018

I can't Google for this sort of thing because it's a very difficult error to describe, so asking it here is my last resort. I have to use Autodesk Maya 2019 for the game I am working on, along with ...
0
votes
0answers
69 views

Unity Pixel Perfect Camera - Adjusting the Viewport Rect?

I am trying to make a pixel perfect Tetris style game. I have the pixel perfect component attached and have tried playing with settings such as Crop Frame and Stretch Fill. It seems to override any ...
0
votes
0answers
31 views

How do I determine that the edge of the camera intersects the edge of the background sprite? UE4

I'm trying to make sure that when the camera reaches the border (left or right) of the sprite's background, a copy of it is spawned from the corresponding side. But I seem to be missing something in ...
0
votes
0answers
17 views

using glew glviewport cannot get the correct proportion of a window

the generated window resolution is (1334, 750) when i call glViewport(0, 0, 1334, 750); the whole window is filled, but when i ...
0
votes
0answers
24 views

DIY hologram experiments split screen

I am currently experimenting with the DIY holograms. Does anyone know to split my windows into 4 perpendicular identical displays like this but for Windows? I am using Unreal Engine & I want it to ...
0
votes
0answers
26 views

How to check what part of an gameobject is seen by a camera?

Could anyone please give me a hint on how to determine how much of an object is seen by a camera. There have to be a threshold value (e.g. 30% of an object is seen). If value is below the threshold ...
0
votes
0answers
33 views

How can I instantiate enemies in a 2D game at a set Viewport Position before my camera enters the room? (Or alternative solution!)

I'm currently working on a 2D game where I'm trying to pre-populate my level with encounters, I want the enemies already in the room when the player enters. Right now the encounter is triggered upon ...
0
votes
0answers
345 views

OpenGL viewport is stretched

For this project I am using GLFW, glad and glm. My window looks like this: The dimensions of the window are correct, but the viewport is stretched, making my square into a rectangle. How do I use a ...
0
votes
0answers
39 views

Confused on graphics rendering

Implementing a viewport is just a rectangular space on the back buffer usually a 2d texture set to the size of the client window that we render to. However in direct3d when we describe the viewport ...
0
votes
0answers
57 views

Keep player within screen bounds, top down shooter

I am using x and z axis to go left/right ; up/down respectively. The Camera is on the y-axis. I have the following code so far - private float playerWidth; private float playerDepth; ...
0
votes
0answers
841 views

Scaling issues with Open GL viewport / scissor box (Trying to draw outside of viewport)

In my game I am currently scaling the viewport so it retains the ratio of my development device like so: ...