Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
Unity test
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
roysam
Unity test
Commits
2c9b7bb2
Commit
2c9b7bb2
authored
2 years ago
by
Samrendra Roy
Browse files
Options
Downloads
Patches
Plain Diff
physics test
parent
9c0605c4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Project/Assets/onsqueeze.cs
+22
-1
22 additions, 1 deletion
Project/Assets/onsqueeze.cs
Project/Assets/test physics.cs
+23
-0
23 additions, 0 deletions
Project/Assets/test physics.cs
Project/Assets/test physics.cs.meta
+11
-0
11 additions, 0 deletions
Project/Assets/test physics.cs.meta
with
56 additions
and
1 deletion
Project/Assets/onsqueeze.cs
+
22
−
1
View file @
2c9b7bb2
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine.XR.Interaction.Toolkit
;
public
class
onsqueeze
:
MonoBehaviour
{
public
GameObject
waterpour
;
public
GameObject
dropper
;
public
bool
squeez
;
public
bool
sdw
;
private
int
state
=
0
;
private
Vector3
rot
;
// Start is called before the first frame update
...
...
@@ -23,6 +25,25 @@ public class onsqueeze : MonoBehaviour
waterpour
.
SetActive
(
false
);
gameObject
.
transform
.
eulerAngles
=
rot
;
}
if
(
gameObject
.
transform
.
localEulerAngles
.
z
>
45
&&
squeez
)
{
waterpour
.
SetActive
(
true
);
}
else
{
waterpour
.
SetActive
(
false
);
}
}
public
void
OnButtonPress
(
XRBaseInteractor
interactor
)
{
squeez
=
true
;
}
public
void
OnButtonRelease
(
XRBaseInteractor
interactor
)
{
squeez
=
false
;
}
private
void
OnMouseOver
()
{
...
...
This diff is collapsed.
Click to expand it.
Project/Assets/test physics.cs
0 → 100644
+
23
−
0
View file @
2c9b7bb2
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
testphysics
:
MonoBehaviour
{
// Start is called before the first frame update
void
Start
()
{
}
// Update is called once per frame
void
Update
()
{
}
void
Abc
()
{
//physics
}
}
This diff is collapsed.
Click to expand it.
Project/Assets/test physics.cs.meta
0 → 100644
+
11
−
0
View file @
2c9b7bb2
fileFormatVersion: 2
guid: 88a7d9c80c1c58c499990200550cf64e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment