Search the Community
Showing results for tags 'pan'.
-
Hi everybody, I'm new on this library and I landed here for the offered support on Pixi library. I'm trying to migrate a .net 2D engine to Angular project. This homemade engine only handles rectangles and allows developers to manage simply the model and return the rectangle to draw, after applying zoom and pan. You can zoom in one or two directions and drag&drop. Obviously we do not only draw rectangles, but by approximating the geometry to a rectangle we can draw any path. Up to now I have tried the viewport and cull library, to manage zoom and cull (I have a model with 200k-300k rectangles) I'm studying / experimenting with Pixi, and I'm worried about the zoom. Do you have any general suggestion? Not only for the zoom, but, for example, is it better to use graphics or sprites?
-
Hi, I'm using Pixi since several days on a game prototype which consists in a map made of tiles. The problem is that I got a big map (2000px / 2000px), so it don't fit a desktop screen, and not any mobile screen. I am looking for a way to allow the user to pan (i.e. navigating on the canvas with mouse drag and drops (for desktop) and with the finger (for mobile devices) zoom in / out the canvas Like in google maps for example Any idea of an embedded feature I can use? Thanks in advance for you answers.
-
I was hoping someone could point me in the right direction here. I see that I can set world bounds to detect when a sprite is out of bounds of that world. But I don't think that will help in what I am trying to do. I have a background image and a sprite. When the sprite reaches near the edge of the screen, the camera needs to pan the screen. My question is, is there a way to determine when the character reaches, for example, the edge of the screen to the left(minus 20 pixels or so) so that I can begin panning the camera then?
-
So I'm not sure if this is a bug or maybe I've just not configured the camera correctly. I have a scene that's the interior of a building and the interior is made of a bunch of room meshes joined together. I have it so that when you click on a room the camera sets that room mesh as its target. If I try to pan the camera(ctrl and mouse drag) after clicking on a room the whole interior pans except for the room that I clicked on which stays in the centre of the screen, separated from the rest of the rooms. Any way to remedy this? I'm using an ArcRotateCamera by the way. Example of what I mean: http://www.babylonjs-playground.com/#18KHF6#0 Click on sphere2 and then pan the camera (ctrl and mouse drag).
-
Hey everyone! I am trying to figure out how to implement a google maps style camera. What I mean by this is a camera that pans by default.. so, the inverse behavior of the arc rotate camera. I looked around the forum for camera panning but everything just circles back to 'the arc rotate camera supports panning.' How can I make it so it pans by default and you hold control to rotate it? Ive just got mountains of fail in front of me. The best way to describe it is im trying to replicate the camera movement here: http://middle-earth.thehobbit.com/
-
Hi All, I would like to use babylonjs from a touch device. Zoom in and zoom out by means of pinch works in a touch device (mobile/ tablet) http://www.babylonjs-playground.com/#AMEB6#0 Panning works on pc by holding CTRL+Drag. What is the best way to implement panning on a touch device ? one touch drag would rotate the scene. Will it be possible if I want to use 2 touches and drag to pan ? Regards Rajkumar
-
Hello, I am familiar with JS, and new to Phaser. I am seeing if Phaser will be the framework for me, and something I am having issue with is getting a tilemap to pan when a pointer is dragged across it. All of the docs I am seeing on the drag input is connecting those events to a sprite, which isn't what I want. Am I missing something, is there an example showing this off? Also, in general with developing in Phaser.. Is it generally one "correct way" to create and style UI elements? Can you create standard HTML buttons outside of a game window and still connect events to those buttons to trigger things in game? Thanks in advance!