Skip to content
Snippets Groups Projects
Commit 0d3e9471 authored by Mamad Farrahi's avatar Mamad Farrahi
Browse files

added all funcionalities without using navigation modules

parent 8a12cbec
No related branches found
No related tags found
2 merge requests!2App Base Implementation,!1Dev base remove libraries
......@@ -1548,7 +1548,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 89500984}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -3.255, y: 7.04, z: -11.344}
m_LocalPosition: {x: -2.73, y: 6.81, z: -11.12}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
......@@ -1570,6 +1570,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
playerTransform: {fileID: 89500987}
vrCamera: {fileID: 549720497}
runSpeed: 4
--- !u!114 &89500989
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -1668,7 +1669,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
jumpHeight: 2
forwardForce: 7
forwardForce: 5
timeToNextJump: 0.5
rb: {fileID: 0}
controllerInputManager: {fileID: 89500992}
......@@ -4560,7 +4561,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 246320986}
m_LocalRotation: {x: 0.30146483, y: 0.5212398, z: 0.5317749, w: -0.5955196}
m_LocalPosition: {x: -1.9607847, y: 1.1546874, z: 0.5501962}
m_LocalPosition: {x: 3.25, y: -1.02, z: -6.81}
m_LocalScale: {x: 0.45528218, y: 0.45528236, z: 0.45528233}
m_ConstrainProportionsScale: 0
m_Children: []
......@@ -7680,12 +7681,12 @@ MonoBehaviour:
m_Name: Position
m_Type: 0
m_ExpectedControlType: Vector3
m_Id:
m_Id: d925eb41-eb8c-4000-9716-33eb4b8f323a
m_Processors:
m_Interactions:
m_SingletonActionBindings:
- m_Name:
m_Id:
m_Id: dacbe3cb-f44b-468d-a944-c7be3059c93c
m_Path: <XRHMD>/centerEyePosition
m_Interactions:
m_Processors:
......@@ -7700,12 +7701,12 @@ MonoBehaviour:
m_Name: Rotation
m_Type: 0
m_ExpectedControlType: Quaternion
m_Id:
m_Id: e2ec82f3-8f1e-4aa0-beeb-245411cafd8b
m_Processors:
m_Interactions:
m_SingletonActionBindings:
- m_Name:
m_Id:
m_Id: e9edc872-d4da-419c-8504-74b6c4f6fd36
m_Path: <XRHMD>/centerEyeRotation
m_Interactions:
m_Processors:
......@@ -16392,7 +16393,7 @@ GameObject:
- component: {fileID: 1278327731}
- component: {fileID: 1278327730}
- component: {fileID: 1278327729}
- component: {fileID: 1278327728}
- component: {fileID: 1278327733}
- component: {fileID: 1278327732}
m_Layer: 0
m_Name: EndBarrier
......@@ -16401,19 +16402,6 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!65 &1278327728
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1278327727}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &1278327729
MeshRenderer:
m_ObjectHideFlags: 0
......@@ -16472,7 +16460,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1278327727}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -3.02, y: 4.43, z: -1.33}
m_LocalPosition: {x: -3.02, y: 4.17, z: -1.4}
m_LocalScale: {x: 1.745625, y: 1, z: 0.2625}
m_ConstrainProportionsScale: 0
m_Children:
......@@ -16489,9 +16477,22 @@ MonoBehaviour:
m_GameObject: {fileID: 1278327727}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f7319b4d530c0f541b9fb27b39861975, type: 3}
m_Script: {fileID: 11500000, guid: a428cce96a79b7e438fee5d80f1ba8d9, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!65 &1278327733
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1278327727}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 0.9999999, y: 1, z: 0.99999994}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1001 &1285037978
PrefabInstance:
m_ObjectHideFlags: 0
......@@ -20710,6 +20711,7 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 1550995443}
- component: {fileID: 1550995444}
m_Layer: 0
m_Name: Camera Offset
m_TagString: Untagged
......@@ -20735,6 +20737,21 @@ Transform:
m_Father: {fileID: 89500987}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1550995444
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1550995442}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 26e22e3167b2dc6488c6951287bc76e0, type: 3}
m_Name:
m_EditorClassIdentifier:
gameOverHeight: 5
fallingTimeThreshold: 1
rb: {fileID: 89500991}
--- !u!1001 &1561526929
PrefabInstance:
m_ObjectHideFlags: 0
using UnityEngine;
[RequireComponent(typeof(Rigidbody))]
[RequireComponent(typeof(CapsuleCollider))]
public class MyCharacterController : MonoBehaviour
{
private Rigidbody rb;
private CapsuleCollider capsule;
void Start()
{
rb = GetComponent<Rigidbody>();
capsule = GetComponent<CapsuleCollider>();
// Initialize Rigidbody
rb.useGravity = true;
rb.isKinematic = false;
// Initialize CapsuleCollider
capsule.height = 2.0f;
capsule.radius = 0.5f;
capsule.center = new Vector3(0, 1, 0); // Center at 1 meter on the y-axis
}
}
using UnityEngine;
public class EndParkourDetection : MonoBehaviour
{
private void OnTriggerEnter(Collider other)
{
Debug.Log("Something touched The End Barrier:" + other.name);
if (other.CompareTag("XROriginTag"))
{
Debug.Log("Player finished the race!!");
gameObject.SetActive(false);
FindObjectOfType<GameTimerScript>().EndRace(true);
}
}
}
fileFormatVersion: 2
guid: f7319b4d530c0f541b9fb27b39861975
guid: a428cce96a79b7e438fee5d80f1ba8d9
MonoImporter:
externalObjects: {}
serializedVersion: 2
......
......@@ -11,7 +11,7 @@ public class HandRun : MonoBehaviour
private Vector3 lastPosition; // Last position of the right controller
private float movedDistance = 0.0f; // The distance moved by the right controller
private float thresholdDistance = 0.03f; // The threshold distance for movement
private float runSpeed = 2.0f; // The speed at which the player will move
public float runSpeed = 3.0f; // The speed at which the player will move
private bool buttonIsPressed = false; // Flag for button press
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment