Commit 7670c96
authored
Added possibility to lock the objects rotation while dragging it
When u drag a object via HandDraggable and move your head the rotation of the object changes.
At least in my case I don't want that, it somehow feels unnatural, so I implemented a public flag to prevent this behaivour (lock the rotation of the object).
Also I added a Header and Space for grouping the different rotation modes in the inspector (probably change the text there a bit?)
And I grouped the handling of the rotation modes (upright, towards user, lock orientation) into an if-else if-else if construct. If nothing applies (when IsRotationLocked == true) the rotation of the object isn't changed at all (my desired behaivour).
Any opinions?1 parent 3f3cafb commit 7670c96
File tree
1 file changed
+14
-8
lines changed- Assets/HoloToolkit/Input/Scripts/Interactions
1 file changed
+14
-8
lines changedLines changed: 14 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
41 | 47 | | |
42 | 48 | | |
43 | 49 | | |
| |||
198 | 204 | | |
199 | 205 | | |
200 | 206 | | |
201 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
202 | 213 | | |
203 | 214 | | |
204 | 215 | | |
| |||
207 | 218 | | |
208 | 219 | | |
209 | 220 | | |
| 221 | + | |
210 | 222 | | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | 223 | | |
218 | 224 | | |
219 | 225 | | |
| |||
0 commit comments