Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
WidowmakerSimulator
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
15박보승
WidowmakerSimulator
Commits
f9b94557
Commit
f9b94557
authored
Sep 23, 2019
by
15박보승
Committed by
Merseong
Sep 23, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Configurable Joint 를 통한 Grapple 구현
parent
73a9c6fe
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
461 additions
and
16 deletions
+461
-16
SampleScene.unity
Grapplers/Assets/Scenes/SampleScene.unity
+379
-13
Scripts.meta
Grapplers/Assets/Scripts.meta
+8
-0
DistanceJoint3D.cs
Grapplers/Assets/Scripts/DistanceJoint3D.cs
+30
-0
DistanceJoint3D.cs.meta
Grapplers/Assets/Scripts/DistanceJoint3D.cs.meta
+11
-0
PlayerController.cs
Grapplers/Assets/Scripts/PlayerController.cs
+19
-0
PlayerController.cs.meta
Grapplers/Assets/Scripts/PlayerController.cs.meta
+11
-0
ProjectSettings.asset
Grapplers/ProjectSettings/ProjectSettings.asset
+3
-3
No files found.
Grapplers/Assets/Scenes/SampleScene.unity
View file @
f9b94557
This diff is collapsed.
Click to expand it.
Grapplers/Assets/Scripts.meta
0 → 100644
View file @
f9b94557
fileFormatVersion: 2
guid: c78b775545d133843affccaaf7348e6b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Grapplers/Assets/Scripts/DistanceJoint3D.cs
0 → 100644
View file @
f9b94557
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
DistanceJoint3D
:
MonoBehaviour
{
public
Rigidbody
ConnectedRigidbody
;
public
float
distance
;
private
Rigidbody
rb
;
private
void
Awake
()
{
rb
=
GetComponent
<
Rigidbody
>();
}
private
void
Start
()
{
distance
=
Vector3
.
Distance
(
rb
.
position
,
ConnectedRigidbody
.
position
);
}
private
void
FixedUpdate
()
{
var
connection
=
rb
.
position
-
ConnectedRigidbody
.
position
;
// var distanceDiscrepancy = distance - connection.magnitude;
rb
.
velocity
=
connection
.
normalized
*
Physics
.
gravity
.
y
+
Physics
.
gravity
;
}
}
Grapplers/Assets/Scripts/DistanceJoint3D.cs.meta
0 → 100644
View file @
f9b94557
fileFormatVersion: 2
guid: e179ac458e6d7c94284ef49322fa5428
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Grapplers/Assets/Scripts/PlayerController.cs
0 → 100644
View file @
f9b94557
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
PlayerController
:
MonoBehaviour
{
public
float
distance
=
10.0f
;
private
void
Start
()
{
}
private
void
Update
()
{
if
(
Input
.
GetKey
(
KeyCode
.
A
)){
GetComponent
<
Rigidbody
>().
AddForce
(-
transform
.
right
*
100
);
}
}
}
Grapplers/Assets/Scripts/PlayerController.cs.meta
0 → 100644
View file @
f9b94557
fileFormatVersion: 2
guid: 2875488fce740ff478556f0ecd33994c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Grapplers/ProjectSettings/ProjectSettings.asset
View file @
f9b94557
...
...
@@ -4,7 +4,7 @@
PlayerSettings
:
m_ObjectHideFlags
:
0
serializedVersion
:
18
productGUID
:
00000000000000000000000000000000
productGUID
:
1648db810acc3c041938b2d93e4f2d87
AndroidProfiler
:
0
AndroidFilterTouchesWhenObscured
:
0
AndroidEnableSustainedPerformanceMode
:
0
...
...
@@ -12,8 +12,8 @@ PlayerSettings:
targetDevice
:
2
useOnDemandResources
:
0
accelerometerFrequency
:
60
companyName
:
productName
:
companyName
:
DefaultCompany
productName
:
Grapplers
defaultCursor
:
{
fileID
:
0
}
cursorHotspot
:
{
x
:
0
,
y
:
0
}
m_SplashScreenBackgroundColor
:
{
r
:
0.13725491
,
g
:
0.12156863
,
b
:
0.1254902
,
a
:
1
}
...
...
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