This commit is contained in:
RosimInc 2015-08-13 02:59:00 -04:00
commit f91fcd3eb4
4 changed files with 37 additions and 13 deletions

View File

@ -159,6 +159,7 @@ Camera:
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: .0219999999
m_StereoMirrorMode: 0
--- !u!4 &61719365
Transform:
m_ObjectHideFlags: 0
@ -257,6 +258,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d0907c1567bad554c8b995de3459e517, type: 3}
m_Name:
m_EditorClassIdentifier:
nextPosition: {x: 0, y: 0, z: 0}
moveSpeed: 1
Link: {fileID: 11495142, guid: fab430cecad80ad4391987a06b550cb7, type: 2}
Person: {fileID: 11406500, guid: 646dd6566f9e1374caa3af8ad37c43d3, type: 2}
PointsAmount: 200

View File

@ -4,6 +4,11 @@ using System.Collections.Generic;
public class Center : MonoBehaviour
{
//public float fov = Camera.main.fieldOfView;
public Vector3 nextPosition;
public float moveSpeed = 0;
public FriendshipLink Link;
public PersonTest Person;
public int PointsAmount = 50;
@ -51,6 +56,19 @@ public class Center : MonoBehaviour
delta = new Vector3();
}
//camera zoom
if (Input.GetAxis("Mouse ScrollWheel") != 0)
{
Debug.Log("Pressed middle click.");
//Camera.main.transform.position.z += (moveSpeed * Time.deltaTime);
//transform.position = Vector3.Lerp(transform.position, nextPosition, Time.deltaTime * moveSpeed);
//Camera.main.fieldOfView += Input.GetAxis("Mouse ScrollWheel") * 10f;
//Camera.main.transform
}
}
void FixedUpdate()
{
if (dragging)
{
MoveSphere();
@ -67,9 +85,8 @@ public class Center : MonoBehaviour
rb.angularVelocity *= 0.8f;
}
delta += new Vector3(deltaX, deltaY, 0);
//rigidbody.AddTorque();
rb.AddTorque(Vector3.down * delta.x * torqueForce * Time.deltaTime, ForceMode.Impulse);
rb.AddTorque(Vector3.right * delta.y * torqueForce * Time.deltaTime, ForceMode.Impulse);
rb.AddTorque(Vector3.down * delta.x * torqueForce * Time.fixedDeltaTime, ForceMode.Impulse);
rb.AddTorque(Vector3.right * delta.y * torqueForce * Time.fixedDeltaTime, ForceMode.Impulse);
Debug.Log(delta.x + ", " + delta.y);

View File

@ -19,7 +19,7 @@ InputManager:
snap: 1
invert: 0
type: 0
axis: 0
axis: 2
joyNum: 0
- serializedVersion: 3
m_Name: Vertical

View File

@ -3,17 +3,14 @@
--- !u!129 &1
PlayerSettings:
m_ObjectHideFlags: 0
serializedVersion: 6
serializedVersion: 7
AndroidProfiler: 0
defaultScreenOrientation: 4
targetDevice: 2
targetGlesGraphics: -1
targetIOSGraphics: -1
targetResolution: 0
accelerometerFrequency: 60
companyName: DefaultCompany
productName: DeathBook
cloudProjectId:
defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0}
m_ShowUnitySplashScreen: 1
@ -26,7 +23,6 @@ PlayerSettings:
m_ActiveColorSpace: 0
m_MTRendering: 1
m_MobileMTRendering: 0
m_UseDX11: 1
m_Stereoscopic3D: 0
iosShowActivityIndicatorOnLoading: -1
androidShowActivityIndicatorOnLoading: -1
@ -81,6 +77,7 @@ PlayerSettings:
metroEnableIndependentInputSource: 0
metroEnableLowLatencyPresentationAPI: 0
xboxOneDisableKinectGpuReservation: 0
virtualRealitySupported: 0
productGUID: 402278fad2098ce4eab29439139ae9ad
AndroidBundleVersionCode: 1
AndroidMinSdkVersion: 9
@ -123,6 +120,7 @@ PlayerSettings:
iOSLaunchScreenCustomXibPath:
AndroidTargetDevice: 0
AndroidSplashScreenScale: 0
androidSplashScreen: {fileID: 0}
AndroidKeystoreName:
AndroidKeyaliasName:
AndroidTVCompatibility: 1
@ -136,6 +134,7 @@ PlayerSettings:
resolutionDialogBanner: {fileID: 0}
m_BuildTargetIcons: []
m_BuildTargetBatching: []
m_BuildTargetGraphicsAPIs: []
webPlayerTemplate: APPLICATION:Default
m_TemplateCustomTags: {}
actionOnDotNetUnhandledException: 1
@ -197,6 +196,7 @@ PlayerSettings:
ps4ApplicationParam2: 0
ps4ApplicationParam3: 0
ps4ApplicationParam4: 0
ps4GarlicHeapSize: 2048
ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ
ps4pnSessions: 1
ps4pnPresence: 1
@ -339,8 +339,7 @@ PlayerSettings:
blackberrySquareSplashScreen: {fileID: 0}
tizenProductDescription:
tizenProductURL:
tizenCertificatePath:
tizenCertificatePassword:
tizenSigningProfileName:
tizenGPSPermissions: 0
tizenMicrophonePermissions: 0
stvDeviceAddress:
@ -398,4 +397,9 @@ PlayerSettings:
- WebGL::template
WebGL::emscriptenArgs:
WebGL::template: APPLICATION:Default
firstStreamedLevelWithResources: 0
firstStreamedSceneWithResources: 0
cloudProjectId:
projectId:
projectName:
organizationId:
cloudEnabled: 0