Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [scale]

Scale in relation to the geometry, in a game, whether that be 2D or 3D.

0
votes
2answers
18 views

Stopping the texture2D from stretching in RawImage

I am working with a RawImage texture which is fully stretched, filling up the entire scene. I am using some code to download images from website and then show them on the RawImage, the code is simple, ...
1
vote
1answer
34 views

How can I convert screen coordinates from a click to 2D scaled world coordinates?

I need a way to convert screen coordinates obtained from mouse clicks to world coordinates in my 2D game. To create a zoom effect controlled by the user, before drawing a model I will scale all of it'...
0
votes
1answer
18 views

How to scale a sprite on x axis to touch the point without changing pivot?

I have a sprite. The pivot is at random point. I want to increase the sprite's scale on the x axis, without moving the pivot, until its edge touches a point at right. I have a method to set/add size....
0
votes
0answers
26 views

scale on z axis move

At the position z = 0 my box has size on one side 0.2. When, for example, I move it to z = 1.5, size of it scale up. I've trided to calculate it by using triangle formula z*tan(fov/2), but it does ...
1
vote
1answer
285 views

Scale camera to fit screen size unity

My background and gameobjects are 2d sprites not UI images ,I want to know how to make my background scale with screen size and positions of 2d sprits on it don't change after building game (webGl) ...
0
votes
1answer
178 views

How to scale an object in one direction without moving the opposite edge?

I am using Unity. In my game, I have an SpriteRenderer and I'd like it to increase its size I'd like it to lengthen to the right, without moving the left edge. I tried changing its scale to ...
0
votes
3answers
104 views

How can you tell if you are a large player on a large map or a small player on a small map?

If everything is scaled by a constant factor, can you tell that the world is smaller or larger? I think you could look down at the ground and see that it's "closer". But how do you know what ...
0
votes
1answer
63 views

Scaling web game to suit any screen size

I've made a simple multiplayer game, and now trying to make it fit on any screen size. I've tried stretching it out to fit the browser size, but it just appears weird and distorted. I'm also trying to ...
0
votes
1answer
88 views

Confused by scaling, units, and more

Ok, so I've already waded through a bunch of questions around this, and it's just making me even more confused. Let's say I am trying to model a card table in a 2d game. Behind (beneath) the table ...
0
votes
1answer
70 views

Transforming 2D viewport coordinates after scaling the viewport (zoom in/out)

I've been getting started with personal experimentation and have been working on a project for a few days now using SDL2. It is a 2D game, and at this stage I have it rendering game objects in a fixed-...
0
votes
0answers
30 views

Relative camera movement with character in center

I'm trying to translate and scale a 2D space from world space to camera space with my character in the center. Adding in the scaling is tripping me up. Here's what I've got so far, without the ...
1
vote
0answers
53 views

2D: Scaling a character with multiple RigidBody2Ds?

So, this example is in the Godot Engine, but other engines porbably have this kind of problem, too: I have a character with multiple RigidBody2Ds, that also has a ...
4
votes
2answers
211 views

How to do 1.5x scaling for pixel art where only one dimension has to scale?

I'm working on a point and click adventure game where the top third of the screen is a 16:3 single piece background with sprites on top. The width has to be edge to edge. It can't be cropped because ...
0
votes
1answer
95 views

Change center point and size with the help of the Matrix in Unity

Let us suppose I have an array of Vector3, it contains vertices. Now I want to scale the vertices and/or change the center point of the texture (move texture ...
2
votes
0answers
47 views

Large Mesh at a far distance

So I am trying to do something like KSP, where I have a ground to orbit Level of Detail with the planets. And from theirBuilding a new Universe Video I know they are using scaled space, and local ...
0
votes
1answer
670 views

Change localScale.x in Unity without creating a new Vector3

Is it possible to change localScale.x in Unity without creating a new Vector3?
1
vote
0answers
278 views

How to scale game with orthographic camera correctly? [duplicate]

During porting to android I encountered that the game does not fit on the screen in portrait mode. It uses an orthographic camera. How could I scale to game to fit the screen in portrait mode?
1
vote
1answer
857 views

Scale object based on another object's position

Despite an hour or so of Googling I can't seem to figure out how to calculate the scale factor based on distance. Here's the illustration of my problem. I've tried manipulating the x values and such, ...
0
votes
1answer
3k views

Unity: How to resize a game object for a certain amount of time?

I've tried to make a coroutine like this ...
2
votes
2answers
210 views

How do I work out what resolution my backgrounds should be?

I'm working on a game that's 1200 x 800. The pixels per meter ratio is 1:20. When I add my background texture that is 400 x 225. It fits well in the zone however the lines on the image are pixelated. ...
1
vote
1answer
446 views

Android: Make game look the same on all devices

I'm trying to get my android application to look the same on all screen devices. I assume I have to do something regarding the density, I just can't figure it out. And while I have seen very similar ...
2
votes
0answers
169 views

Bullet Physics Scaling rotational part of 6DoF Spring Damper

I am currently trying to scale up my setup (consisting of two rigid bodies connected by a btGeneric6DofSpring2Constraint) to fall within the suggested dimensions for a concise simulation. In order to ...
1
vote
0answers
35 views

What is the perfect sprite size for new ipads with retina displays [closed]

The graphic designer is sending me huge sprites 3000px in width drawn by hand. And now the company is hiring a professional painter to paint huge oil paintings for the game for other levels. Nothing ...
3
votes
0answers
2k views

Phaser: Scaling to fill screen, maintain pixel ratio, but not aspect ratio

I've used libraries in other languages before that provide different types of scaling via viewport types. The best example of what I want is from a library called libgdx for Java, their ScreenViewport....
0
votes
1answer
88 views

Supporting uniform/non-uniform scale in hierarchical animation

I have worked with hierarchical blended animation systems for a number of years, but I have never been quite sure how to handle scale correctly. The introduction of non-uniform scale is additionally ...
2
votes
1answer
203 views

Make virtual joystick preserve aspect ratio Android in Unity

When I start my game on Android my virtual joysticks stops being round. Here you can see it: Here is the project on PC at the same time: Here are my UI settings for the Joystick: Please, help me ...
0
votes
1answer
532 views

LibGdx: set TextButton font to a TrueTypeFont

I am making my first LibGdx game, and having an hard time understanding font scaling on TextButtons. Here is a comparison between the rendering on my Kindle Fire 7 and an high resolution tablet: I ...
0
votes
1answer
174 views

Cocos2d-x setContentSize, setScale give poor graphic quality

I want to create sprite with size is relative to the screen size. I.e: Sprite size is equal to screen width * 0.2. I use setContentSize and ...
0
votes
1answer
181 views

Hard edges with non power of 2 images in OpenGL

When down scaling 2D images in Java2D, it does a great job at preserving hard edges while downscaling to non power of 2s. However, in OpenGL, I have been unable to find a solution to this. I have ...
0
votes
1answer
151 views

Re scaling an object from its current scale to a scale of 0

I want to have an animation which starts at a starting scale of whatever the current gameObject's scale (i.e 1, 1, 1 or 2, 3, 2) is which then end at a scale of 0, 0, 0. The problem is that Unity's ...
2
votes
3answers
519 views

Unity 5.5 Android scaling

The questions I've seen are outdated, explained, not to my liking, or just don't work. Problem: I want to be able to create a game that can scale on all mobile devices with ease and with no ...
0
votes
1answer
3k views

How can I scale/zoom to a point in canvas in the game?

I am using html5 canvas to build a MMO game. When I scale my background by default it scales to (0, 0) which is the top left corner of the background. If I have ...
1
vote
0answers
53 views

Where to put Tweening effect codes in HTML5 Canvas game?

I am building a javascript HTML5 canvas game and I need to scale the map. However whenever I scale my map the screen stutters very obviously. To scale smoothly without player noticing I add Tween ...
0
votes
1answer
145 views

Issues with 3dsmax and Unity3d scale

I changed the units in Blender so they are identical to Unity 3d. If I make a 1m^3 box in Blender, it will import into unity as exactly the same size as the standard cube. With 3ds max, I changed ...
1
vote
2answers
328 views

Unity3D position of 2D objects with size of Object

I'm making a 2D project in Unity3D. I want to place an image in the right upper corner. I've got this working, but ofcourse the image is falling of the screen for a part (and completely when I change ...
0
votes
1answer
200 views

how to correctly scale box2d in libgdx

I'm currently using 800x480 resolution and FitViewPort and I divided that by PixelPerMeter variable which is equal to 10 and that helped to move my box2d body faster. But when I tried to use fonts I ...
13
votes
2answers
7k views

Scaling my pixel art platformer from 720p to 1080p

I'm developing a pixel art 2D platformer for PC and smartphone, but I'm stuck on a technical issue. I chose to have a 32x32 tile resolution, and a 64x64 character sprite resolution. The levels are ...
13
votes
1answer
5k views

What makes scaling pixel art different than other images?

Recently I was coaching a developer who's new to making pixel art games, and realized there's some "conventional wisdom" around scaling pixel art that's not obvious to a newcomer, and might not be ...
1
vote
2answers
529 views

How to fake a 3d character displacement by sprite scaling in GameMaker?

I want my 2D sprite to become bigger when moving down the screen (closer to the camera), smaller when walking away and to maintain the same size when moving left or right. The scaling along the y ...
1
vote
2answers
579 views

GUI scaling: Viewport-based scaling or individual logic

I want to use scene2d for creating a GUI for a libGDX game. In scene2d all sizes are provided in pixel units (instead of percentages). So I wonder what is the best approach to deal with different ...
0
votes
1answer
243 views

Looking for a dirty pseudo 3D trick

To be specific I want to do bad sprite scaling like in Operation Thunderbolt. For some reason I'm getting it all wrong so far. I started over from scratch and I've literally got a sprite that follows ...
0
votes
1answer
233 views

MonoGame - scale down a sprite from the middle

I want to animate a texture's scale. First it's scaled up to 10, and then it gradually goes down to 1. However the texture is drawn at Vector2(0, 0) so it doesn't ...
2
votes
1answer
448 views

Unity2D: Scaling and Locking Image to anchor points

I have a script that uses Index to change an objects sprite using OnClick to move through the sprites, like a slideshow. I want the image to scale to the size of my anchor points, because I've notice ...
0
votes
3answers
406 views

Scaling a rotated rectangle in a given direction

I'm facing an issue when trying to scale a rotated rectangle in a given direction. In my context, the width and height of the rectangle are based on the texture size multiplied by a scale factor (...
1
vote
0answers
197 views

Resizing the map in HTML5 canvas

Say I have a big map for my HTML5 game. And it is drawn with an image repeatedly. I want my map to be able to resize and respond to player's behaviors. Now I can resize my map, I just multiply a ...
1
vote
0answers
315 views

(GameMaker) Smooth scaling and transparency while zooming

My game has a zoom function. There is a man in a spaceship, we can see the interior of the room room from side on as the outside is totally transparent. When I zoom out I want the outside of the ...
1
vote
0answers
93 views

Instanced based game with multiple node instances

I have a nginx load balancer with 4 nodejs instances behind it, and one Redis server to ...
4
votes
1answer
277 views

How to keep sprite on screen while increasing its width to screen width

I have been able to increase the width of a sprite to the width of the screen size, but the sprite exceeds the borders of the screen width to the right or left when I try expanding it when it's not at ...
0
votes
1answer
225 views

Bullet: Apply any Transformation to RigidBody?

I'm using Bullet for CollisionDetection. I load a scene from a Collada-File using Assimp. Let's say I want to give every object in the scene a RigidBody with a box as CollisionShape. Right now I first ...
1
vote
1answer
448 views

Wrong pivot point of parent / wrong scale of children

I'm trying to make two objects, in is an intact glass, the other one is the glass but shattered. So for the shattered glass, in Maya I make a Plane, cut it with the multi-cut tool, extrude the faces, ...