Large diffs are not rendered by default.

@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 2138677392}
m_IndirectSpecularColor: {r: 0.28463098, g: 0.3712187, b: 0.49875954, a: 1}
m_IndirectSpecularColor: {r: 0.28463084, g: 0.37121835, b: 0.49875888, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
@@ -152,9 +152,65 @@ Prefab:
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4365643621193746, guid: 85dfab9623c67784fa7894de63cd1604, type: 2}
propertyPath: m_LocalPosition.y
value: -0.17
objectReference: {fileID: 0}
- target: {fileID: 4027874660965690, guid: 85dfab9623c67784fa7894de63cd1604, type: 2}
propertyPath: m_LocalPosition.y
value: -0.17
objectReference: {fileID: 0}
- target: {fileID: 4189669893887648, guid: 85dfab9623c67784fa7894de63cd1604, type: 2}
propertyPath: m_LocalPosition.y
value: -0.17
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 85dfab9623c67784fa7894de63cd1604, type: 2}
m_IsPrefabAsset: 0
--- !u!1 &60557825
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 60557827}
- component: {fileID: 60557826}
m_Layer: 0
m_Name: WorldManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &60557826
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 60557825}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c361f0784c814441cb62ff2e4657dfdc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_VRplayerPos: {x: 0, y: 0, z: 0}
m_dynamicObjects: []
m_playerInSpace: 0
gravityShift: 0
--- !u!4 &60557827
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 60557825}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.3385412, y: -0.010354791, z: 3.3755152}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &213062476 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4677891204690692, guid: 85dfab9623c67784fa7894de63cd1604,
@@ -468,6 +524,23 @@ ReflectionProbe:
m_UseOcclusionCulling: 1
m_Importance: 1
m_CustomBakedTexture: {fileID: 0}
--- !u!1 &699247742 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1593707594805610, guid: a87f0180d46fd334b9025d0314a0dc70,
type: 2}
m_PrefabInternal: {fileID: 821952736}
--- !u!65 &699247746
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 699247742}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 5.000549, y: 0.15000004, z: 5}
m_Center: {x: 0.6702254, y: -0.07500002, z: 1.1600004}
--- !u!1 &766333378
GameObject:
m_ObjectHideFlags: 0
@@ -807,6 +880,26 @@ ReflectionProbe:
m_UseOcclusionCulling: 1
m_Importance: 1
m_CustomBakedTexture: {fileID: 0}
--- !u!1 &947764231 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1245921258145638, guid: 85dfab9623c67784fa7894de63cd1604,
type: 2}
m_PrefabInternal: {fileID: 10690979}
--- !u!54 &947764235
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 947764231}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!4 &1284735118 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4896299854906514, guid: a87f0180d46fd334b9025d0314a0dc70,
@@ -11,11 +11,36 @@ public class worldManager : MonoBehaviour {

// private variables -------------------
private float m_playerBoundaries;

//debug variables --- Use this as temporary variables

//gravity
public float gravityShift = 0f;

//instantiating stuff
public Rigidbody cubeBody;
public int maxNumberOfObjects = 100;
public Rigidbody[] instantiatedObjects;
public List<Rigidbody> points = new List<Rigidbody>();

//timescale
public float timeModifier;

//player relocate
public Vector3 originalPosition;

// -------------------------------------
// Use this for initialization
// -------------------------------------
void Start () {
//array resize


//store original location (for relocate)
originalPosition = m_VRplayerPos;

//instantiate
instantiateObjects();

}

@@ -24,6 +49,12 @@ public class worldManager : MonoBehaviour {
// Update is called once per frame
// -------------------------------------
void Update () {

//ChangeGravity
changeGravity();

//changetime
changeTimeValue();

}

@@ -37,23 +68,32 @@ public class worldManager : MonoBehaviour {
}

// Function to change the gravity
private void changeGravity() {
// ------ make sure to add rigibody everywhere
private void changeGravity() {
gravityShift = Mathf.Clamp(gravityShift, -1.0f, 1.0f);
Physics.gravity = new Vector3(0,gravityShift,0);

}

// Function to change the time of motion
private void changeTimeValue() {

timeModifier = Mathf.Clamp(timeModifier, 1.0f,10.0f);
Time.timeScale = Time.timeScale * timeModifier;
}

// Function to initiate new dynamic objects
private void instantiateObjects() {

for (int i = 0; i < maxNumberOfObjects; i++)
{
instantiatedObjects[i] = Instantiate(cubeBody, cubeBody.position, Quaternion.identity);
}
}

// Function to relocate player
// Function to relocate player /reset to its original location when it started
private void relocatePlayer() {

if(Input.GetKeyDown("space")){
m_VRplayerPos = originalPosition;
}
}