Tag Info

New answers tagged

0

Usually this is handled a bit differently. When manipulator is picked, you choose a movement plane (XY, YZ or XZ). Then you cast ray from cursor on to that plane and detect the hit point and move the manipulator (and object) to that location. Special cases you need to work around for are when the plane is parallel to the view and ray from cursor can reach ...


2

Best solution Run an OVR Mirror and display another output window on your projector/monitor. You can attach it to one of the OVR 'eyes' if you are feeling lazy, or create a new camera and run it from there for better performance. Using networking You would run the client in 2 ways: Directly answering your question: To Remotely see everything exactly ...


0

You can use ctx.translate(dx,dy) to scroll the camera. Alternatively, have a camera object with x,y coordinates, and when drawing game objects, draw at object.x - camera.x.


1

If you need to go nuts you can render the scene twice with two cameras, first with a camera set to near=100.0f far=10000.0f and then use a different depth buffer and render on top of the color buffer with another camera with near=0.01f and far=100.0f (unless you need to smoosh your character's nose into a wall closer than 1cm, that should be close enough) ...


0

Is it because the eye-at = (0,2,0) and therefore the cross product of up x (eye-at) = (0,0,0) and that means, that no real transformation matrix can be constructed? Exactly, the actual values in the resulting matrix is just the coordinates of the view direction (at-eye), up and right vectors next to each other; result = [[right.x up.x view.x] ...


0

Your code is a little strange. If you want to rotate around the Y axis, then you change the X and Z coords, but you're altering Y and Z. This code rotates smoothly around Y: function rotateCameraY(radiansIncrement) { var x = _camera.position.x; var y = _camera.position.y; var z = _camera.position.z; var signx = x > 0 ? 1 : -1; // get current radians ...


1

You'll want to look into pixel-art upscaling filtering algorithms (http://en.wikipedia.org/wiki/Image_scaling). These have been specifically designed to upscale pixel art, having the properties of (1) retaining the original color palette (aka. no blurring) and (2) removing jaggies (aliasing that occurs due to nearest neightbour sampling). Some names of ...


-1

You need to apply a low pass filter before the down-sampling (down-scaling) occurs on the low resolution screens. I have used simple gaussian blur (convolution transform) with good results: This was done with a blur radius of 1 pixel.


5

For one, nearest-neighbor will result in pixel perfect scaling only if it's used to upscale in integer multiples. Apart from that, you should not be conducting any scaling operations on your view/projection matrices. If you set your view to match the dimensions of the screen, and your projection matrix to be orthographic with dimensions that match the ...


2

You need to average the sprite pixels which are visible beneath each screen pixel. The sprite pixels can be sampled "nearest", but to move smoothly in subpixel increments on the display, you need some kind of oversampling. If you're using OpenGL, you can do this in your shader by averaging 4, or 9 or more sprite samples offset near each fragment (calculated ...


0

Ok after a lot of tries I made it,Stil I dont know if this is the best way to achieve this, if someone can explain why this is a solution it will be good! I just change the matrix mode to GL_PROJECTION and translate it gl.glMatrixMode(GL10.GL_PROJECTION); gl.glLoadIdentity(); gl.glOrthof(0f, 8f, 0f, 4f, -1f, 1f); gl.glTranslatef(x, y, 0f); ...


0

You can use just the camera() method to change the perspective more easily. To use it, you probably want two variables: rotationAngle and elevationAngle. Moving the mouse sideways changes rotationAngle between 0 and TWO_PI. You can then set variable float centerY to sin(rotationAngle) and float centerX to cos(rotationAngle). Moving the mouse up and down ...



Top 50 recent answers are included