Gottfried kann sich bewegen und drehen
This commit is contained in:
parent
b7375f945f
commit
7097644bc2
|
@ -1,7 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 73951a4b66414d24999d439134425a40
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -38,7 +38,7 @@ RenderSettings:
|
|||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.14514297, g: 0.16106007, b: 0.16197146, a: 1}
|
||||
m_IndirectSpecularColor: {r: 0.1451428, g: 0.16105962, b: 0.16197124, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
|
@ -17222,269 +17222,6 @@ MeshFilter:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 550965789}
|
||||
m_Mesh: {fileID: 5993582798948802348, guid: 130b6028a08254146ac66813828ea5af, type: 3}
|
||||
--- !u!1 &552825307
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 552825313}
|
||||
- component: {fileID: 552825312}
|
||||
- component: {fileID: 552825311}
|
||||
- component: {fileID: 552825310}
|
||||
- component: {fileID: 552825308}
|
||||
- component: {fileID: 552825314}
|
||||
- component: {fileID: 552825316}
|
||||
- component: {fileID: 552825317}
|
||||
m_Layer: 0
|
||||
m_Name: Player
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &552825308
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 552825307}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 41df0369bf5d3b64cb9c32c46f2fe9f0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!136 &552825310
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 552825307}
|
||||
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: 2
|
||||
m_Radius: 0.5
|
||||
m_Height: 2
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &552825311
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 552825307}
|
||||
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 &552825312
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 552825307}
|
||||
m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!4 &552825313
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 552825307}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0.08372083, z: -0, w: 0.9964893}
|
||||
m_LocalPosition: {x: 26.49, y: 1.6609993, z: -4.67}
|
||||
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 20.395, z: 0}
|
||||
--- !u!54 &552825314
|
||||
Rigidbody:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 552825307}
|
||||
serializedVersion: 4
|
||||
m_Mass: 1
|
||||
m_Drag: 1
|
||||
m_AngularDrag: 0.05
|
||||
m_CenterOfMass: {x: 0, y: 0, z: 0}
|
||||
m_InertiaTensor: {x: 1, y: 1, z: 1}
|
||||
m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ImplicitCom: 1
|
||||
m_ImplicitTensor: 1
|
||||
m_UseGravity: 1
|
||||
m_IsKinematic: 0
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 112
|
||||
m_CollisionDetection: 0
|
||||
--- !u!82 &552825316
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 552825307}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!114 &552825317
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 552825307}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ef5183dac70a54b4cbed3e05d617524f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
context: office, gamedevelopement, coffee, spillage, questioning life
|
||||
gender: FEMALE
|
||||
speakingSpeed: 1.1
|
||||
playSound: 0
|
||||
generate: 0
|
||||
--- !u!1 &555469476
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -49101,6 +48838,86 @@ MeshFilter:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1572060562}
|
||||
m_Mesh: {fileID: 3284317394355905387, guid: 7292cbbcd062e3440b9895a64d229825, type: 3}
|
||||
--- !u!1 &1573807341 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 9017657623670109072, guid: 7c7f0805c6bdc4f41bd65ec128f6b658, type: 3}
|
||||
m_PrefabInstance: {fileID: 83611174122365960}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &1573807344
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1573807341}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 740b300bbbdc1fa4f9acfc855c8670de, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
moveSpeed: 3
|
||||
groundDrag: 1
|
||||
speed: 5
|
||||
turningRate: 600
|
||||
_targetRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
jumpKey: 32
|
||||
jumpForce: 4
|
||||
jumpCooldown: 0.5
|
||||
playerHeight: 2
|
||||
whatIsGround:
|
||||
serializedVersion: 2
|
||||
m_Bits: 8
|
||||
grounded: 0
|
||||
--- !u!54 &1573807345
|
||||
Rigidbody:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1573807341}
|
||||
serializedVersion: 4
|
||||
m_Mass: 1
|
||||
m_Drag: 0
|
||||
m_AngularDrag: 0.05
|
||||
m_CenterOfMass: {x: 0, y: 0, z: 0}
|
||||
m_InertiaTensor: {x: 1, y: 1, z: 1}
|
||||
m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ImplicitCom: 1
|
||||
m_ImplicitTensor: 1
|
||||
m_UseGravity: 1
|
||||
m_IsKinematic: 0
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 112
|
||||
m_CollisionDetection: 0
|
||||
--- !u!136 &1573807346
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1573807341}
|
||||
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: 2
|
||||
m_Radius: 0.5
|
||||
m_Height: 1.7
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.85, z: 0}
|
||||
--- !u!1 &1577864189
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -66813,7 +66630,16 @@ PrefabInstance:
|
|||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_AddedComponents:
|
||||
- targetCorrespondingSourceObject: {fileID: 9017657623670109072, guid: 7c7f0805c6bdc4f41bd65ec128f6b658, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 1573807344}
|
||||
- targetCorrespondingSourceObject: {fileID: 9017657623670109072, guid: 7c7f0805c6bdc4f41bd65ec128f6b658, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 1573807345}
|
||||
- targetCorrespondingSourceObject: {fileID: 9017657623670109072, guid: 7c7f0805c6bdc4f41bd65ec128f6b658, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 1573807346}
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 7c7f0805c6bdc4f41bd65ec128f6b658, type: 3}
|
||||
--- !u!23 &87716553343573121
|
||||
MeshRenderer:
|
||||
|
@ -87346,7 +87172,6 @@ SceneRoots:
|
|||
m_Roots:
|
||||
- {fileID: 963194228}
|
||||
- {fileID: 1887129442}
|
||||
- {fileID: 552825313}
|
||||
- {fileID: 1891423499}
|
||||
- {fileID: 83611174122365960}
|
||||
- {fileID: 1274270891}
|
||||
|
|
|
@ -15,6 +15,10 @@ public class Character : MonoBehaviour
|
|||
|
||||
public float speed = 2f;
|
||||
|
||||
[Header("Turning")]
|
||||
public float turningRate = 30f;
|
||||
public Quaternion _targetRotation = Quaternion.identity;
|
||||
|
||||
[Header("Keybindings")]
|
||||
public KeyCode jumpKey = KeyCode.Space;
|
||||
|
||||
|
@ -41,6 +45,8 @@ public class Character : MonoBehaviour
|
|||
MyInput();
|
||||
SpeedControl();
|
||||
|
||||
transform.rotation = Quaternion.RotateTowards(transform.rotation, _targetRotation, turningRate * Time.deltaTime);
|
||||
|
||||
if (grounded)
|
||||
{
|
||||
rb.drag = groundDrag;
|
||||
|
@ -62,7 +68,11 @@ public class Character : MonoBehaviour
|
|||
horizontalInput = Input.GetAxisRaw("Horizontal");
|
||||
verticalInput = Input.GetAxisRaw("Vertical");
|
||||
|
||||
|
||||
if(horizontalInput != 0f || verticalInput != 0f)
|
||||
{
|
||||
_targetRotation = Quaternion.Euler(new Vector3(0f, Mathf.Atan2(horizontalInput, verticalInput) * Mathf.Rad2Deg, 0f));
|
||||
}
|
||||
|
||||
if (Input.GetKey(jumpKey) && readyToJump && grounded)
|
||||
{
|
||||
readyToJump = false;
|
||||
|
|
Loading…
Reference in New Issue