Skip to main content

All Questions

Tagged with
1 vote
2 answers
2k views

Modern OpenGL: Object picking (C#, OpenTK)

I am trying to implement object picking in OpenGL using C# and OpenTK. I have written a class for this purpose based on two sources: OpenGL ray casting (picking): account for object's transform ...
wotnot's user avatar
  • 281
2 votes
1 answer
523 views

OpenTK Oblique Frustum (Lens Shift)

I am very new to OpenGL and am using the latest version of OpenTK with C#. My camera class currently does the following, public Matrix4 GetProjectionMatrix() { return Matrix4....
Khal's user avatar
  • 23
1 vote
1 answer
2k views

How to move objects with perspective camera and rotating the camera in Unity3D?

I'm trying to rotate my camera(50 degree in X) and also place an object following the touch posiiton, here is my script, can rotate the camera and move the object but since it's perspective the object ...
Sociopath's user avatar
  • 295
0 votes
2 answers
254 views

How to create an exponential equation that calculates camera field of view against distance?

I am working on a game mod and I need to calculate a field of view setting, based on a subject's distance from the camera. I have already written a test programme (basically a programme that creates a ...
user avatar
0 votes
1 answer
119 views

How to incline the plane of a camera view?

I have a background that is a GUITexture, and some 3d objects between the background and the camera. __ \ | | \ ___ |bg| Object |Cam| |__| / / Current Result:...
Mc Kevin's user avatar
  • 972
1 vote
3 answers
2k views

Stop camera from moving on x axis

So I have a rocket (player) that is flying up on the Y axis. I have a camera with this script following the rocket: using UnityEngine; using System.Collections; public class CameraController : ...
Anton nelson's user avatar
1 vote
3 answers
3k views

Gameobject instantiated in canvas shows up behind other canvas items

In my game, if it is the first time the player has ever played the game then I have an image that is displayed. I instantiate it in the canvas like so: if (PlayerPrefs.GetInt("First Time", 1) == ...
sabo's user avatar
  • 923
0 votes
1 answer
1k views

Wrong result, drawing a cube in SharpDX

I want to draw a cube in SharpDX. And this is my current result: As you can see, at some point, parts of the cube are cut. I don't know what setting is wrong, what could it be? I think it's ...
fedab's user avatar
  • 989
0 votes
2 answers
84 views

Camera Jitters Matrix Camera

I am using a translation matrix to move the screen but when the player collides with an object the player will jitter as if it wants to be in 2 places at once. It looks like velocity wants to keep ...
Ryan Foy's user avatar
  • 322
0 votes
1 answer
60 views

Issues with Cameras

I want to have the screen follow the player, seeing that many use Matrix to make the camera do as they want, I get a little stuck. I have a main class called Game1.cs, a Player class were the movement ...
Ryan Foy's user avatar
  • 322
1 vote
1 answer
584 views

Can't access to properties of superclass in C#

I'm new in C#, actually I'm creating a subclass of a PerspectiveCamera class VCamera : PerspectiveCamera { private double m_AngleRadianX; private double m_AngleRadianZ; public VCamera() ...
Guillaume Boitel's user avatar
0 votes
1 answer
2k views

Perspective Projection

Few days ago I decided to start in 3D programming and came across perspective projection. I use the following code to get the matrix: public static Matrix3D ProjectionMatrix(double angle, double ...
Belos's user avatar
  • 291
2 votes
1 answer
1k views

Looking for sample code Silverlight 3d c#

I am wanting to create a visualization of earthquakes like this image below where I can move the camera and show 100's or 1000's of small circular objects. . All the demos I can find online show a ...
Chris's user avatar
  • 319
0 votes
1 answer
3k views

C# XNA - Matrix.CreatePerspectiveFieldOfView - Extend how far camera can see

i am using the following code to setup my camera. I can see the elements in a range of some 100 fs. I want the camera to see farther. projection = Matrix.CreatePerspectiveFieldOfView((3.14159265f/...
Moon's user avatar
  • 19.9k