Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
GameDevWeek
S
Sommersemester 2019
Unity
Touch me if you can
Commits
58d10300
Commit
58d10300
authored
Sep 21, 2019
by
Sven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcc update
parent
17f8d808
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
Assets/_Game/Scripts/SvensBSscripts/PlayerCenterCam.cs
Assets/_Game/Scripts/SvensBSscripts/PlayerCenterCam.cs
+22
-0
Assets/_Game/Scripts/SvensBSscripts/PlayerCenterCam.cs.meta
Assets/_Game/Scripts/SvensBSscripts/PlayerCenterCam.cs.meta
+11
-0
No files found.
Assets/_Game/Scripts/SvensBSscripts/PlayerCenterCam.cs
0 → 100644
View file @
58d10300
using
System
;
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
PlayerCenterCam
:
MonoBehaviour
{
[
SerializeField
]
private
Transform
head
,
body
;
private
void
Update
()
{
PlayerCenterView
();
}
public
void
PlayerCenterView
()
{
transform
.
position
=
new
Vector3
(
0
,
80
,
50
);
transform
.
LookAt
((
head
.
position
+
body
.
position
)/
2
);
transform
.
rotation
=
Quaternion
.
Euler
(
60
,
0
,
0
);
}
}
Assets/_Game/Scripts/SvensBSscripts/PlayerCenterCam.cs.meta
0 → 100644
View file @
58d10300
fileFormatVersion: 2
guid: a253c5d838e09234a99dff802cd465c8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment