Jump to content

  • Log In with Google      Sign In   
  • Create Account


DiscGolfer17

Member Since 13 Dec 2012
Offline Last Active Feb 11 2013 08:08 AM
-----

Topics I've Started

Move object freely around sphere in Unity3D

02 February 2013 - 07:43 PM

I have a ship centered at the screen with a radius of 10 from the center of sphere located at (0, 0, 0) ... I am using the standard on-screen Joystick provided in the Standard Assets (Mobile) package of Unity. Can someone help me figure out how to allow the joystick to move the ship around the sphere by a specified radius? I currently have the joystick controlling the angle the ship is rotated at but I can't seem to get it to move the ship in a correct orbit.


Track Position in OpenGL ES

28 December 2012 - 03:36 PM

I have some models moving around a sphere using glRotate() and glTranslate() which all works how I want. Now I need to add collision detection. Each model has a bounding box and bounding sphere associated with it. How do I keep track of each models' position and apply that to the bounding box and bounding sphere so that I can test for collisions? I am using Java on Android, with the libGDX framework on OpenGL ES 1.1.


How to Create an ArcBall Camera

24 December 2012 - 08:38 PM

I am trying to allow the user to rotate the camera around my 3D object by keeping the camera located somewhere on the sphere surrounding it. My first question is whether or not I can use a 2D virtual joystick to control the camera movement, and will the joystick map to the arcball camera? (Most examples I have seen are in XNA and using mouse dragging to move the camera) My second question is more of how the arcball works, and how I should go about creating it? If I can set up my joystick to manipulate the arcball rotation then I can just position my camera using it, and set the look at point to the origin (0, 0, 0).

 

Note: I am using Java on Android, as well as the libGDX framework.

 


Camera Orbit Using Quaternion

15 December 2012 - 09:07 PM

I'm trying to build a camera class that will allow me to orbit a sphere using a quaternion. Can someone help get me going in the right direction as far as how to use a quaternion, manipulate it with input, and then apply it to the camera? I've gotten the camera to orbit but I've come across the infamous gimbal lock problem and quaternions I hear are the way to go. I am using the libGDX game framework in case you want to take a look at their PerspectiveCamera, and Quaternion classes that I'm using.

Controlling Spherical Coordinates With Joystick

13 December 2012 - 04:53 PM

I am working on a 3D game in OpenGL on Android using the libGDX framework. I have a sphere drawn at the origin and I am working on getting the camera to orbit the sphere freely on any axis. I would like to control the camera with a virtual joystick that I have being drawn in the bottom left corner. I have started to attack this using spherical coordinates and converting them to cartesian coordinates. My problem is how can I control the spherical coordinates of theta (angle between x axis and ray from the camera position to the origin), and phi (angle from the z axis to the same ray)... I've also noticed that as the camera is orbiting the sphere, after the angles hit 45 degrees the direction changes by itself and starts to loop around the other way (note: I am currently getting movement by just incrementing theta and phi at the same time by 1 degree up to 360 and then back around). Thanks for any help at all on this!

PARTNERS