BulletImpact Particals(noch nicht fertig)

This commit is contained in:
pbg2h23akl 2024-06-21 11:28:03 +02:00
parent d91ab65c06
commit 0cfce6e5ff
8 changed files with 5162 additions and 2 deletions

View File

@ -221,6 +221,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
dataBullet: {fileID: 11400000, guid: cafd241bae342f446ae8141cc5d72daf, type: 2} dataBullet: {fileID: 11400000, guid: cafd241bae342f446ae8141cc5d72daf, type: 2}
particalClash: {fileID: 380174200671927273, guid: f063995f35533054d8f370458ee30f57, type: 3}
lifetime: 3 lifetime: 3
--- !u!136 &5994619817623951055 --- !u!136 &5994619817623951055
CapsuleCollider: CapsuleCollider:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f8f979a36b6328942aaebf6fa87a59e3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: f063995f35533054d8f370458ee30f57
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -621,6 +621,168 @@ MeshFilter:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 940378051} m_GameObject: {fileID: 940378051}
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1001 &1030353343
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 939049122039926632, guid: 5bd04146a95212e41bc2c52b7079e131, type: 3}
propertyPath: m_Name
value: Bullet
objectReference: {fileID: 0}
- target: {fileID: 3286218375903244322, guid: 5bd04146a95212e41bc2c52b7079e131, type: 3}
propertyPath: m_LocalPosition.x
value: 4.35
objectReference: {fileID: 0}
- target: {fileID: 3286218375903244322, guid: 5bd04146a95212e41bc2c52b7079e131, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3286218375903244322, guid: 5bd04146a95212e41bc2c52b7079e131, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3286218375903244322, guid: 5bd04146a95212e41bc2c52b7079e131, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3286218375903244322, guid: 5bd04146a95212e41bc2c52b7079e131, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3286218375903244322, guid: 5bd04146a95212e41bc2c52b7079e131, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3286218375903244322, guid: 5bd04146a95212e41bc2c52b7079e131, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3286218375903244322, guid: 5bd04146a95212e41bc2c52b7079e131, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3286218375903244322, guid: 5bd04146a95212e41bc2c52b7079e131, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3286218375903244322, guid: 5bd04146a95212e41bc2c52b7079e131, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 5bd04146a95212e41bc2c52b7079e131, type: 3}
--- !u!1 &1062964497
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1062964501}
- component: {fileID: 1062964500}
- component: {fileID: 1062964499}
- component: {fileID: 1062964498}
m_Layer: 0
m_Name: Sphere
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!135 &1062964498
SphereCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1062964497}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &1062964499
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1062964497}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!33 &1062964500
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1062964497}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1062964501
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1062964497}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 1.497, y: 0.939, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &1091931327 stripped --- !u!4 &1091931327 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 6798321073873421098, guid: 4d3459d3c81134641b756c0c5205d59e, type: 3} m_CorrespondingSourceObject: {fileID: 6798321073873421098, guid: 4d3459d3c81134641b756c0c5205d59e, type: 3}
@ -1001,6 +1163,7 @@ MonoBehaviour:
xSensitivity: 300 xSensitivity: 300
ySensitivity: 300 ySensitivity: 300
cam: {fileID: 1261709729} cam: {fileID: 1261709729}
newDirY: 0
--- !u!54 &1475365806 --- !u!54 &1475365806
Rigidbody: Rigidbody:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1109,7 +1272,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1475365804} m_GameObject: {fileID: 1475365804}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0, y: -0.7071068, z: 0, w: 0.7071068} m_LocalRotation: {x: 0, y: 0.6770687, z: 0, w: 0.73591983}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
@ -1117,7 +1280,7 @@ Transform:
- {fileID: 322531733} - {fileID: 322531733}
- {fileID: 1261709731} - {fileID: 1261709731}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: -90, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 85.23, z: 0}
--- !u!1 &1651397764 --- !u!1 &1651397764
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1318,6 +1481,63 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1001 &1544909526857362950
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 380174200671927273, guid: f063995f35533054d8f370458ee30f57, type: 3}
propertyPath: m_Name
value: ClashPartical
objectReference: {fileID: 0}
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
propertyPath: m_LocalPosition.x
value: 1.497
objectReference: {fileID: 0}
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
propertyPath: m_LocalRotation.w
value: -0.8511778
objectReference: {fileID: 0}
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
propertyPath: m_LocalRotation.x
value: 0.52487755
objectReference: {fileID: 0}
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 296.68
objectReference: {fileID: 0}
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f063995f35533054d8f370458ee30f57, type: 3}
--- !u!1001 &2143748980832870478 --- !u!1001 &2143748980832870478
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1383,3 +1603,6 @@ SceneRoots:
- {fileID: 1475365810} - {fileID: 1475365810}
- {fileID: 1211352543} - {fileID: 1211352543}
- {fileID: 1134786306} - {fileID: 1134786306}
- {fileID: 1544909526857362950}
- {fileID: 1062964501}
- {fileID: 1030353343}

View File

@ -7,6 +7,8 @@ using UnityEngine;
public class BulletScript : MonoBehaviour public class BulletScript : MonoBehaviour
{ {
public DataBullet dataBullet; public DataBullet dataBullet;
public GameObject particalClash;
public float lifetime = 3f; public float lifetime = 3f;
private Rigidbody rb; private Rigidbody rb;
@ -30,6 +32,8 @@ public class BulletScript : MonoBehaviour
} }
private void OnCollisionEnter(Collision collision){ private void OnCollisionEnter(Collision collision){
Debug.Log(collision.gameObject.name); Debug.Log(collision.gameObject.name);
ContactPoint contact = collision.GetContact(0);
Instantiate(particalClash,transform.position,Quaternion.LookRotation(contact.normal));
GameObject.Destroy(this.gameObject); GameObject.Destroy(this.gameObject);
} }
// Start is called before the first frame update // Start is called before the first frame update

View File

@ -0,0 +1,28 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ParticalClash : MonoBehaviour
{
public float lifeTime = 2;
private float time = 0;
private void die(float time, float lifeTime){
if(time > lifeTime){
GameObject.Destroy(this.gameObject);
}
}
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
time += Time.deltaTime;
die(time, lifeTime);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4e78e7c61fba07742ae26607d4fa9390
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: