Edit little platforms rigidbody

This commit is contained in:
haitem 2022-01-30 11:32:44 +01:00
parent 816b51b439
commit 37d93416a6
12 changed files with 181 additions and 4 deletions

View File

@ -1604,9 +1604,9 @@ Rigidbody:
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Interpolate: 2
m_Constraints: 112
m_CollisionDetection: 1
m_CollisionDetection: 2
--- !u!114 &3244356566819001086
MonoBehaviour:
m_ObjectHideFlags: 0

View File

@ -179,6 +179,7 @@ GameObject:
- component: {fileID: 411423064055404482}
- component: {fileID: 459485775853362848}
- component: {fileID: 2187729912207573111}
- component: {fileID: -6601052459336252156}
m_Layer: 0
m_Name: Platform Start
m_TagString: platform
@ -278,3 +279,19 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 61dae18984b7ff147ab1d77fb817687a, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!54 &-6601052459336252156
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2628890434173161082}
serializedVersion: 2
m_Mass: 50
m_Drag: 0
m_AngularDrag: 0
m_UseGravity: 0
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 126
m_CollisionDetection: 2

View File

@ -99,6 +99,7 @@ GameObject:
- component: {fileID: 8238111678033492397}
- component: {fileID: -5509448037057392871}
- component: {fileID: 2527761051471871889}
- component: {fileID: 4240483973579556787}
m_Layer: 0
m_Name: Platform_Blue
m_TagString: platform
@ -328,3 +329,19 @@ AudioSource:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!54 &4240483973579556787
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8768991388683709947}
serializedVersion: 2
m_Mass: 50
m_Drag: 0
m_AngularDrag: 0
m_UseGravity: 0
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 126
m_CollisionDetection: 2

View File

@ -114,6 +114,7 @@ GameObject:
- component: {fileID: 3339862426328537977}
- component: {fileID: 3865253352867341094}
- component: {fileID: -7597049073915248875}
- component: {fileID: 3278078638141404736}
m_Layer: 0
m_Name: Platform_Green
m_TagString: platform
@ -229,6 +230,22 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 61dae18984b7ff147ab1d77fb817687a, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!54 &3278078638141404736
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8768991388683709947}
serializedVersion: 2
m_Mass: 50
m_Drag: 0
m_AngularDrag: 0
m_UseGravity: 0
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 126
m_CollisionDetection: 2
--- !u!1 &8985668614484660023
GameObject:
m_ObjectHideFlags: 0

View File

@ -115,6 +115,7 @@ GameObject:
- component: {fileID: 6218203028538785626}
- component: {fileID: 1204402889283165505}
- component: {fileID: 7973800414101489524}
- component: {fileID: 6165408165884203318}
m_Layer: 0
m_Name: Platform_Orange
m_TagString: platform
@ -329,3 +330,19 @@ AudioSource:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!54 &6165408165884203318
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6650340373999088090}
serializedVersion: 2
m_Mass: 50
m_Drag: 0
m_AngularDrag: 0
m_UseGravity: 0
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 126
m_CollisionDetection: 2

View File

@ -115,6 +115,7 @@ GameObject:
- component: {fileID: 5316890779910729157}
- component: {fileID: -142748814437030588}
- component: {fileID: 5862113707430629064}
- component: {fileID: -6889792310482815023}
m_Layer: 0
m_Name: Platform_Red
m_TagString: platform
@ -328,3 +329,19 @@ AudioSource:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!54 &-6889792310482815023
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8768991388683709947}
serializedVersion: 2
m_Mass: 50
m_Drag: 0
m_AngularDrag: 0
m_UseGravity: 0
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 126
m_CollisionDetection: 2

View File

@ -115,6 +115,7 @@ GameObject:
- component: {fileID: 4344779564172896453}
- component: {fileID: 5433657018731068073}
- component: {fileID: 8383421295717427161}
- component: {fileID: 3996111038030861644}
m_Layer: 0
m_Name: Platform_yellow
m_TagString: platform
@ -329,3 +330,19 @@ AudioSource:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!54 &3996111038030861644
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8768991388683709947}
serializedVersion: 2
m_Mass: 50
m_Drag: 0
m_AngularDrag: 0
m_UseGravity: 0
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 126
m_CollisionDetection: 2

View File

@ -97,6 +97,7 @@ GameObject:
- component: {fileID: 6189155224637060765}
- component: {fileID: -443919199017515566}
- component: {fileID: -731181381576803345}
- component: {fileID: 3389900204265069980}
m_Layer: 0
m_Name: platform 2 power
m_TagString: Untagged
@ -211,3 +212,19 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 61dae18984b7ff147ab1d77fb817687a, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!54 &3389900204265069980
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7678802340880963262}
serializedVersion: 2
m_Mass: 50
m_Drag: 0
m_AngularDrag: 0
m_UseGravity: 0
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 126
m_CollisionDetection: 2

View File

@ -177,6 +177,7 @@ GameObject:
- component: {fileID: 2665829151930005690}
- component: {fileID: 7025617415223936346}
- component: {fileID: 991026633550732616}
- component: {fileID: -3679359786245750542}
m_Layer: 0
m_Name: platform 3 neutral
m_TagString: platform
@ -231,3 +232,19 @@ MeshCollider:
m_Convex: 1
m_CookingOptions: 30
m_Mesh: {fileID: 4300000, guid: db9955a831b9d1a49a8d725397ad8326, type: 3}
--- !u!54 &-3679359786245750542
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7308296215773848360}
serializedVersion: 2
m_Mass: 50
m_Drag: 0
m_AngularDrag: 0
m_UseGravity: 0
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 126
m_CollisionDetection: 2

View File

@ -94,6 +94,7 @@ GameObject:
- component: {fileID: 1121309705137920178}
- component: {fileID: 526948428540975981}
- component: {fileID: 5794058540197003412}
- component: {fileID: 8763404315579740833}
m_Layer: 0
m_Name: platform 3 speed
m_TagString: platform
@ -148,6 +149,22 @@ MeshCollider:
m_Convex: 1
m_CookingOptions: 30
m_Mesh: {fileID: 4300000, guid: db9955a831b9d1a49a8d725397ad8326, type: 3}
--- !u!54 &8763404315579740833
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7834549091241900869}
serializedVersion: 2
m_Mass: 50
m_Drag: 0
m_AngularDrag: 0
m_UseGravity: 0
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 126
m_CollisionDetection: 2
--- !u!1 &8214805574275809151
GameObject:
m_ObjectHideFlags: 0

View File

@ -95,6 +95,7 @@ GameObject:
- component: {fileID: 6715234968966001404}
- component: {fileID: 5071310171994536778}
- component: {fileID: 8372693939530454457}
- component: {fileID: 458963570543655786}
m_Layer: 0
m_Name: platform 4 neutral
m_TagString: platform
@ -161,6 +162,22 @@ MonoBehaviour:
speed: 5
audioSource: {fileID: 0}
audioClips: []
--- !u!54 &458963570543655786
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1560962678462888388}
serializedVersion: 2
m_Mass: 50
m_Drag: 0
m_AngularDrag: 0
m_UseGravity: 0
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 126
m_CollisionDetection: 2
--- !u!1 &1560962679917322222
GameObject:
m_ObjectHideFlags: 0

View File

@ -4,9 +4,16 @@ using UnityEngine;
public class BGRotation : MonoBehaviour
{
void Update()
private Vector3 rotation;
private void Start()
{
transform.Rotate(new Vector3(Random.Range(0,360), Random.Range(0, 360), Random.Range(0, 360)));
rotation = new Vector3(Random.Range(0, 360), Random.Range(0, 360), Random.Range(0, 360));
}
void FixedUpdate()
{
transform.Rotate(rotation);
}
private void OnTriggerEnter(Collider other)