- Home /
Orbiting objects appear stretched
So im trying to make this interface where a bunch of buttons orbit around the player until they select one. the buttons are all moving correctly, but they appear to be stretched when they are coming and going around the player. when they are directly across from the player, they appear to be the correct scale. The transforms of the objects are not actually changing, just their positions so its really just a perspective thing, but it looks terrible when their actually going around the sides. Is there any way i can fix this? Hers my code
using UnityEngine;
using System.Collections;
public class Orbit : MonoBehaviour {
public Transform targetObject;
Vector3 rotationMask = new Vector3(0, 1, 0);
public float rotationSpeed = 5.0f;
void FixedUpdate() {
transform.RotateAround(
targetObject.transform.position, rotationMask, rotationSpeed * Time.deltaTime);
transform.LookAt (targetObject);
}
}
Answer by Xarbrough · Jun 22, 2015 at 12:53 AM
If your objects are being distorted too much at the screen edges you can narrow the field of view property of the main camera. The higher the fov the more fisheye distortion. I usually set mine from the default 60 to 30, when a player is 2 units tall.
I probably should have mentioned, This is for the Oculus D$$anonymous$$2 so theres two main cameras and their settings are much different then normal Heres a screen shot of the inspector for one of the eyes
Actually, what you said worked perfectly. If you post it as an answer I can close this
Your answer
Follow this Question
Related Questions
Objects not always Spawning At Correct Location 2 Answers
How to get all gameObjects with a script on them 1 Answer
Material for Image UI component does not work in WEBGL 2 Answers
Orbit Collision Axis 0 Answers
How do change UI.button onclick states(off, editor and runtime, runtime only) via script? 0 Answers