mirror of
https://github.com/CrispyPin/ovr-utils.git
synced 2025-04-03 20:03:58 +02:00
Compare commits
131 commits
Author | SHA1 | Date | |
---|---|---|---|
b1098a13ec | |||
7edd005bb7 | |||
9f0b811d24 | |||
f892d4892b | |||
e6e003ca51 | |||
d83deb8721 | |||
8725763124 | |||
be9ceeef9c | |||
24ad04e262 | |||
899a3dce3d | |||
710b418970 | |||
23b37778b1 | |||
aaeed533da | |||
ef744db9ae | |||
2bac6afcdc | |||
08cb7dc283 | |||
9eea2a7c28 | |||
97fd916a87 | |||
e1944bcc25 | |||
20bf94d7ab | |||
dc6a9929b7 | |||
a073c19e9c | |||
b673410e70 | |||
f081a963a4 | |||
43d3ce3e16 | |||
a284c87792 | |||
b1eb8eb9d8 | |||
|
588f361f52 | ||
3a6d0469e5 | |||
73d9d9b88b | |||
284cfa3c2f | |||
774d678bd7 | |||
5fc14a3def | |||
bf3908de5c | |||
727e559396 | |||
01c11ffd32 | |||
b15c00f5f0 | |||
386465e8d9 | |||
078cd11e5e | |||
2ff72e5023 | |||
a0e6e932e4 | |||
d05880187a | |||
e0c7def52d | |||
f0b0bc84b5 | |||
2fefd5a03b | |||
9a5e58351f | |||
dd28bdcb54 | |||
f22efdea0a | |||
721c518bc3 | |||
eda8c8c06c | |||
0ad307d194 | |||
92feff4892 | |||
6f79709af5 | |||
7dd5a544ab | |||
64a51bdd7e | |||
|
80512957cc | ||
4a89de6af9 | |||
381be25af0 | |||
74f7caed5d | |||
8d21c4f424 | |||
18503e7648 | |||
a3778bea0f | |||
5468ffbe63 | |||
c6298484a1 | |||
d14e90bb3c | |||
7ab22b73d8 | |||
cf2b82b5fb | |||
670df66b38 | |||
6b18c51391 | |||
|
3993531f2d | ||
|
9e82cf7fcf | ||
aacc05243a | |||
|
cfd46beb67 | ||
|
55e8a99eda | ||
c09d60a245 | |||
1375ebbaeb | |||
271352bf16 | |||
33da1d0ff7 | |||
39f34344cd | |||
5766378651 | |||
6385d7c165 | |||
e50f85d970 | |||
4a5d1f02c3 | |||
6c15e9ff5f | |||
634ea013b7 | |||
7166f9899f | |||
78c6fd76c1 | |||
b4df1ff599 | |||
031a48ffdc | |||
97a3fb5e80 | |||
7634b952be | |||
3999f68b5d | |||
3c216bf885 | |||
0853b121b8 | |||
1b1902cadd | |||
70892dcb7b | |||
c51d4aa91d | |||
919319cc83 | |||
ba65c823f1 | |||
|
e5bd68d0ec | ||
d2e4c28a86 | |||
1c27c7f6b2 | |||
ac6f31aedf | |||
54f9e4f85c | |||
ddb59ed697 | |||
53ace41594 | |||
1cca61aac2 | |||
52a5e346f9 | |||
5b55d3ce81 | |||
37d982458a | |||
9f74010bc9 | |||
be6173ba83 | |||
|
5b949ee0c6 | ||
7d5dfa60d4 | |||
f1e03dc9bc | |||
0c34f6e0f2 | |||
e33ea49aaf | |||
34bf10eb18 | |||
900fc0809c | |||
7c255586db | |||
e28a1573d0 | |||
131a8aa798 | |||
3e2a6096bf | |||
71f6abe41a | |||
de806ff272 | |||
007eb6d5ba | |||
1d6502673a | |||
e5a8086983 | |||
40ae7b4295 | |||
4865f19bb6 | |||
0407fd297a |
210 changed files with 5912 additions and 18131 deletions
674
LICENSE
Normal file
674
LICENSE
Normal file
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
17
README.md
17
README.md
|
@ -1 +1,16 @@
|
|||
# ovr-utils
|
||||
# OVR Utils
|
||||
A cross-platform SteamVR overlay application that aims to have many useful tools available while in VR. Built using the Godot game engine, and the godot-openvr plugin to interact with the openvr SDK.
|
||||
|
||||
## Installation
|
||||
* Grab the latest release for your OS from the [releases section](https://github.com/CrispyPin/ovr-utils/releases)
|
||||
* Extract the contents to somewhere (make sure to mark `ovr-utils-linux-v###.x86_64` as executable on linux)
|
||||
* To start the overlay, just run the `.exe` or `.x86_64` file.
|
||||
### Add to steam (optional)
|
||||
* In steam, go to `Games`>`Add a non-steam game to my library`
|
||||
* Click browse and find the `ovr-utils` executable
|
||||
* Click `add` and then `add selected programs`
|
||||
* You should now be able to start it from steam (favourite it for easier access)
|
||||
|
||||
## Usage
|
||||
At the moment all interacions are done with the trigger buttons, this will use steamvr actions and be configurable in the future.
|
||||
|
||||
|
|
0
builds/.gitignore → builds/linux/.gitignore
vendored
0
builds/.gitignore → builds/linux/.gitignore
vendored
2
builds/windows/.gitignore
vendored
Normal file
2
builds/windows/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
35
docs/README.md
Normal file
35
docs/README.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# WIP documentation
|
||||
|
||||
## Hierarchy
|
||||
|
||||
```
|
||||
OverlayManager
|
||||
- MyOverlayInstance
|
||||
- [...]
|
||||
- OverlayViewport
|
||||
- Container
|
||||
- MyOverlay
|
||||
- [...]
|
||||
- OverlayInteraction
|
||||
- VR
|
||||
- [colliders for vr trackers etc]
|
||||
- Grabbable
|
||||
- Clickable
|
||||
- Touchable
|
||||
|
||||
```
|
||||
|
||||
|
||||
## overlay interaction types
|
||||
Each overlay instance has a OverlayInteraction node, which spawns the different interaction modules depending on what is defined in the OVERLAY_PROPERTIES.
|
||||
|
||||
The modules/interaction types are:
|
||||
- Grabbable
|
||||
- Touchable
|
||||
- Clickable
|
||||
|
||||
These modules connect signals from different places to the interaction manager (`OverlayInteraction`)
|
||||
Touchable connects collision signals to mouse inputs (potentially logic between to help prevent double presses)
|
||||
Clickable connects vr button signals to mouse inputs
|
||||
Grabbable connects vr button signals to grab logic, while telling the interaction manager to pause normal interaction
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
[gd_scene load_steps=7 format=2]
|
||||
|
||||
[ext_resource path="res://addons/openvr_overlay/OverlayInstance.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://overlays/FPSOverlay.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://overlays/TimeOverlay.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://temp.gd" type="Script" id=4]
|
||||
[ext_resource path="res://overlays/xyz_widget/zx.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://overlays/xyz_widget/yz.tscn" type="PackedScene" id=6]
|
||||
|
||||
[node name="Overlays" type="Node"]
|
||||
script = ExtResource( 4 )
|
||||
|
||||
[node name="OverlayInstance FPS" parent="." instance=ExtResource( 1 )]
|
||||
target = 1
|
||||
overlay_scene = ExtResource( 2 )
|
||||
offset_pos = Vector3( 0.05, -0.01, 0.15 )
|
||||
offset_rot = Vector3( 0, -90, -135 )
|
||||
|
||||
[node name="OverlayInstance Time" parent="." instance=ExtResource( 1 )]
|
||||
target = 1
|
||||
overlay_scene = ExtResource( 3 )
|
||||
offset_pos = Vector3( -0.05, 0.02, 0.15 )
|
||||
offset_rot = Vector3( 0, -90, -135 )
|
||||
width_meters = 0.1
|
||||
|
||||
[node name="XYZ Widget" type="Node" parent="."]
|
||||
|
||||
[node name="YZ" parent="XYZ Widget" instance=ExtResource( 1 )]
|
||||
target = 1
|
||||
overlay_scene = ExtResource( 6 )
|
||||
offset_pos = Vector3( 0, 0, 0 )
|
||||
offset_rot = Vector3( 0, -90, 0 )
|
||||
|
||||
[node name="ZX" parent="XYZ Widget" instance=ExtResource( 1 )]
|
||||
target = 1
|
||||
overlay_scene = ExtResource( 5 )
|
||||
offset_pos = Vector3( 0, 0, 0 )
|
||||
offset_rot = Vector3( 90, 0, 0 )
|
|
@ -1,9 +0,0 @@
|
|||
Contributors
|
||||
============
|
||||
|
||||
This plugin has mostly been developed by [Bastiaan Olij](https://github.com/BastiaanOlij).
|
||||
Special thanks to [Benedikt](https://github.com/beniwtv) for doing all the work on overlay support.
|
||||
|
||||
Other people who have helped out by submitting fixes, enhancements, etc are:
|
||||
- [RMKD](https://github.com/RMKD)
|
||||
- [Bruvzg](https://github.com/bruvzg)
|
|
@ -1,40 +0,0 @@
|
|||
# Godot OpenVR GDNative module
|
||||
This module is provided as is, all files are contained within the addons/godot-openvr-asset folder
|
||||
|
||||
This module requires **Godot 3.1 or newer** to run, **Godot 3.2** is highly recommended.
|
||||
|
||||
The scenes subfolder contains a number of godot scenes that help you set up your project.
|
||||
For basic functionality start with adding ovr_first_person.tcn to your project.
|
||||
Also make sure that vsync is turned off in your project settings.
|
||||
|
||||
Source code for this module can be found here:
|
||||
https://github.com/GodotVR/godot_openvr
|
||||
|
||||
Also note that we have a support asset containing a number of useful scenes to get you going building VR applications in Godot:
|
||||
https://github.com/GodotVR/godot-vr-common
|
||||
|
||||
Documentation on using this asset can be found here:
|
||||
https://github.com/GodotVR/godot-openvr-asset/wiki
|
||||
|
||||
HDR support
|
||||
-----------
|
||||
HDR support was added to OpenVR but requires the keep_3d_linear flag added to Godot 3.2. This will ensure rendering inside of the headset is correct. The preview on screen will look darker. You can solve this by using a separate viewport.
|
||||
|
||||
When using Godot 3.1 you need to either use the GLES2 renderer or turn HDR off on the viewport used to render to the HMD.
|
||||
|
||||
Licensing
|
||||
---------
|
||||
The Godot OpenVR module and the godot scenes in this add on are all supplied under an MIT License.
|
||||
|
||||
The dynamic libraries supplier by Valve fall under Valve's own license.
|
||||
For more information about this license please visit https://github.com/ValveSoftware/openvr
|
||||
|
||||
About this repository
|
||||
---------------------
|
||||
This repository was created by and is maintained by Bastiaan Olij a.k.a. Mux213
|
||||
|
||||
You can follow me on twitter for regular updates here:
|
||||
https://twitter.com/mux213
|
||||
|
||||
Videos about my work with Godot including tutorials on working with VR in Godot can by found on my youtube page:
|
||||
https://www.youtube.com/BastiaanOlij
|
|
@ -1,2 +0,0 @@
|
|||
!*.*
|
||||
.DS_Store
|
|
@ -1 +0,0 @@
|
|||
Versions/Current/Headers
|
|
@ -1 +0,0 @@
|
|||
Versions/Current/OpenVR
|
|
@ -1 +0,0 @@
|
|||
Versions/Current/Resources
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.valvesoftware.OpenVR.framework</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>OpenVR</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -1,2 +0,0 @@
|
|||
OSX support is currently untested as we have no contributor who is using Mac OSX for VR development.
|
||||
If you are able and willing to help out please contact us!
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,112 +0,0 @@
|
|||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[sub_resource type="PlaneMesh" id=1]
|
||||
|
||||
size = Vector2( 0.3, 0.15 )
|
||||
subdivide_width = 10
|
||||
subdivide_depth = 10
|
||||
|
||||
[sub_resource type="Shader" id=2]
|
||||
|
||||
code = "shader_type spatial;
|
||||
render_mode unshaded;
|
||||
|
||||
uniform sampler2D viewport_texture : hint_albedo;
|
||||
|
||||
void vertex() {
|
||||
VERTEX.y = 1.0 - cos(VERTEX.x + 0.3) * 0.5 - cos(VERTEX.z + 0.15) * 0.5;
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec4 col = texture(viewport_texture, vec2(1.0-UV.x, UV.y));
|
||||
ALBEDO = col.rgb;
|
||||
ALPHA = col.a;
|
||||
}"
|
||||
|
||||
[sub_resource type="ShaderMaterial" id=3]
|
||||
|
||||
render_priority = 0
|
||||
shader = SubResource( 2 )
|
||||
_sections_unfolded = [ "Resource", "shader_param" ]
|
||||
|
||||
[sub_resource type="GDScript" id=4]
|
||||
|
||||
script/source = "extends MeshInstance
|
||||
|
||||
func _ready():
|
||||
get_surface_material(0).set_shader_param(\"viewport_texture\", $Viewport.get_texture())
|
||||
|
||||
func _process(delta):
|
||||
$Viewport/World/Label.text = str(Engine.get_frames_per_second()) + \" FPS\""
|
||||
|
||||
[node name="FPS" type="MeshInstance" index="0"]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0 )
|
||||
layers = 1
|
||||
material_override = null
|
||||
cast_shadow = 1
|
||||
extra_cull_margin = 0.0
|
||||
use_in_baked_light = false
|
||||
lod_min_distance = 0.0
|
||||
lod_min_hysteresis = 0.0
|
||||
lod_max_distance = 0.0
|
||||
lod_max_hysteresis = 0.0
|
||||
mesh = SubResource( 1 )
|
||||
skeleton = NodePath("..")
|
||||
material/0 = SubResource( 3 )
|
||||
script = SubResource( 4 )
|
||||
_sections_unfolded = [ "Transform", "material" ]
|
||||
|
||||
[node name="Viewport" type="Viewport" parent="." index="0"]
|
||||
|
||||
arvr = false
|
||||
size = Vector2( 200, 100 )
|
||||
own_world = false
|
||||
world = null
|
||||
transparent_bg = true
|
||||
msaa = 0
|
||||
hdr = false
|
||||
disable_3d = false
|
||||
usage = 0
|
||||
debug_draw = 0
|
||||
render_target_v_flip = false
|
||||
render_target_clear_mode = 0
|
||||
render_target_update_mode = 3
|
||||
audio_listener_enable_2d = false
|
||||
audio_listener_enable_3d = false
|
||||
physics_object_picking = false
|
||||
gui_disable_input = false
|
||||
gui_snap_controls_to_pixels = true
|
||||
shadow_atlas_size = 0
|
||||
shadow_atlas_quad_0 = 2
|
||||
shadow_atlas_quad_1 = 2
|
||||
shadow_atlas_quad_2 = 3
|
||||
shadow_atlas_quad_3 = 4
|
||||
_sections_unfolded = [ "Render Target", "Rendering" ]
|
||||
|
||||
[node name="World" type="Node2D" parent="Viewport" index="0"]
|
||||
|
||||
_sections_unfolded = [ "Transform", "Z" ]
|
||||
|
||||
[node name="Label" type="Label" parent="Viewport/World" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 200.0
|
||||
margin_bottom = 100.0
|
||||
rect_scale = Vector2( 3, 3 )
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 4
|
||||
custom_colors/font_color = Color( 1, 1, 1, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
text = "FPS"
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
_sections_unfolded = [ "Anchor", "Grow Direction", "Margin", "Material", "Rect", "Visibility", "custom_colors" ]
|
||||
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
extends ARVRController
|
||||
|
||||
signal controller_activated(controller)
|
||||
|
||||
export var show_controller_mesh = true setget set_show_controller_mesh, get_show_controller_mesh
|
||||
|
||||
func set_show_controller_mesh(p_show):
|
||||
show_controller_mesh = p_show
|
||||
if $Controller_mesh:
|
||||
$Controller_mesh.visible = p_show
|
||||
|
||||
func get_show_controller_mesh():
|
||||
return show_controller_mesh
|
||||
|
||||
var ovr_render_model
|
||||
var components = Array()
|
||||
var ws = 0
|
||||
|
||||
func _ready():
|
||||
# instance our render model object
|
||||
ovr_render_model = preload("res://addons/godot-openvr/OpenVRRenderModel.gdns").new()
|
||||
|
||||
# set our starting vaule
|
||||
$Controller_mesh.visible = show_controller_mesh
|
||||
|
||||
# hide to begin with
|
||||
visible = false
|
||||
|
||||
func apply_world_scale():
|
||||
var new_ws = ARVRServer.world_scale
|
||||
if (ws != new_ws):
|
||||
ws = new_ws
|
||||
$Controller_mesh.scale = Vector3(ws, ws, ws)
|
||||
|
||||
func load_controller_mesh(controller_name):
|
||||
if ovr_render_model.load_model(controller_name.substr(0, controller_name.length()-2)):
|
||||
return ovr_render_model
|
||||
|
||||
if ovr_render_model.load_model("generic_controller"):
|
||||
return ovr_render_model
|
||||
|
||||
return Mesh.new()
|
||||
|
||||
func _process(delta):
|
||||
if !get_is_active():
|
||||
visible = false
|
||||
return
|
||||
|
||||
# always set our world scale, user may end up changing this
|
||||
apply_world_scale()
|
||||
|
||||
if visible:
|
||||
return
|
||||
|
||||
# became active? lets handle it...
|
||||
var controller_name = get_controller_name()
|
||||
print("Controller " + controller_name + " became active")
|
||||
|
||||
# attempt to load a mesh for this
|
||||
$Controller_mesh.mesh = load_controller_mesh(controller_name)
|
||||
|
||||
# make it visible
|
||||
visible = true
|
||||
emit_signal("controller_activated", self)
|
|
@ -1,8 +0,0 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/godot-openvr/scenes/ovr_controller.gd" type="Script" id=1]
|
||||
|
||||
[node name="OVRController" type="ARVRController"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="Controller_mesh" type="MeshInstance" parent="."]
|
|
@ -1,23 +0,0 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://addons/openvr_overlay/overlay_instance.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/godot-openvr/OpenVROverlay.gdns" type="Script" id=3]
|
||||
|
||||
[node name="OverlayInstance" type="Node"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="OverlayViewport" type="Viewport" parent="."]
|
||||
size = Vector2( 100, 100 )
|
||||
transparent_bg = true
|
||||
handle_input_locally = false
|
||||
msaa = 3
|
||||
hdr = false
|
||||
render_target_update_mode = 3
|
||||
script = ExtResource( 3 )
|
||||
overlay_width_in_meters = 0.4
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="OverlayViewport"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
[node name="Offset" type="Spatial" parent="."]
|
|
@ -1,21 +0,0 @@
|
|||
extends Node
|
||||
|
||||
var ovr_interface: ARVRInterface
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
var ovr_config = preload("res://addons/godot-openvr/OpenVRConfig.gdns").new()
|
||||
ovr_config.set_application_type(2) # Set to OVERLAY MODE = 2, NORMAL MODE = 1
|
||||
ovr_config.set_tracking_universe(1) # Set to SEATED MODE = 0, STANDING MODE = 1, RAW MODE = 2
|
||||
|
||||
# Find the OpenVR interface and initialise it
|
||||
ovr_interface = ARVRServer.find_interface("OpenVR")
|
||||
if ovr_interface and ovr_interface.initialize():
|
||||
pass
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
for i in ARVRServer.get_tracker_count():
|
||||
var tracker = ARVRServer.get_tracker(i)
|
||||
print(tracker.get_name(), ": hand ", tracker.get_hand())
|
||||
|
|
@ -1,94 +0,0 @@
|
|||
extends Node
|
||||
|
||||
enum TARGETS { head, left, right, world }
|
||||
export (TARGETS) var target = TARGETS.head setget _set_target
|
||||
export var overlay_scene = preload("res://addons/openvr_overlay/MissingOverlay.tscn") setget _set_overlay_scene
|
||||
export var offset_pos := Vector3(0, 0, -1) setget _set_offset_pos
|
||||
export var offset_rot: Vector3 setget _set_offset_rot
|
||||
export var width_meters = 0.4 setget _set_width_meters
|
||||
export var fallback_to_hmd = false # fallback is only applied if tracker is not present at startup
|
||||
|
||||
var _tracker_id: int = 0 setget ,get_tracker_id
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
ARVRServer.connect("tracker_added", self, "_tracker_changed")
|
||||
ARVRServer.connect("tracker_removed", self, "_tracker_changed")
|
||||
|
||||
$OverlayViewport.overlay_width_in_meters = width_meters
|
||||
$OverlayViewport.size = OverlayInit.ovr_interface.get_render_targetsize()
|
||||
if overlay_scene:
|
||||
$OverlayViewport/PanelContainer.add_child(overlay_scene.instance())
|
||||
|
||||
update_tracker_id()
|
||||
update_offset()
|
||||
|
||||
|
||||
func update_tracker_id() -> void:
|
||||
_tracker_id = -1
|
||||
|
||||
if target in [TARGETS.left, TARGETS.right]: # target is a controller
|
||||
for i in ARVRServer.get_tracker_count():
|
||||
var tracker = ARVRServer.get_tracker(i)
|
||||
if tracker.get_hand() == target:
|
||||
_tracker_id = int(tracker.get_name().split("_")[-1])
|
||||
|
||||
if _tracker_id == -1:
|
||||
# could not find controller, overlay will revert to fallback
|
||||
# only happens if controller is missing on startup, otherwise it will register as being at origin
|
||||
if fallback_to_hmd:
|
||||
_tracker_id = 0 # HMD
|
||||
else:
|
||||
_tracker_id = 63 # World origin
|
||||
|
||||
|
||||
func update_offset() -> void:
|
||||
$Offset.translation = offset_pos
|
||||
$Offset.rotation_degrees = offset_rot
|
||||
# print(_tracker_id)
|
||||
match target:
|
||||
TARGETS.head:
|
||||
$OverlayViewport.track_relative_to_device(0, $Offset.transform)
|
||||
TARGETS.world:
|
||||
$OverlayViewport.overlay_position_absolute($Offset.transform)
|
||||
_:
|
||||
$OverlayViewport.track_relative_to_device(_tracker_id, $Offset.transform)
|
||||
|
||||
|
||||
func _tracker_changed(tracker_name: String, type: int, id: int):
|
||||
print("tracker changed: ", tracker_name)
|
||||
update_tracker_id()
|
||||
update_offset()
|
||||
|
||||
|
||||
func get_tracker_id() -> int:
|
||||
return _tracker_id
|
||||
|
||||
|
||||
func _set_target(new: int):
|
||||
target = new
|
||||
update_tracker_id()
|
||||
update_offset()
|
||||
|
||||
|
||||
func _set_offset_pos(pos: Vector3):
|
||||
offset_pos = pos
|
||||
update_offset()
|
||||
|
||||
|
||||
func _set_offset_rot(rot: Vector3):
|
||||
offset_rot = rot
|
||||
update_offset()
|
||||
|
||||
|
||||
func _set_width_meters(width: float):
|
||||
width_meters = width
|
||||
$OverlayViewport.overlay_width_in_meters = width_meters
|
||||
|
||||
|
||||
func _set_overlay_scene(scene: PackedScene):
|
||||
overlay_scene = scene
|
||||
if $OverlayViewport/PanelContainer.get_children():
|
||||
$OverlayViewport/PanelContainer.get_child(0).queue_free()
|
||||
$OverlayViewport/PanelContainer.add_child(overlay_scene.instance())
|
||||
|
Binary file not shown.
Binary file not shown.
|
@ -1,107 +0,0 @@
|
|||
extends Node
|
||||
|
||||
signal setting_changed # emitted with name, value
|
||||
signal settings_loaded # emitted when settings are loaded from file, needs to be connected in _init()
|
||||
|
||||
const DEBUG_SETTINGS = true
|
||||
const SETTINGS_PATH = "user://settings.json"
|
||||
const SETTINGS_DEF = {
|
||||
"example_1": {
|
||||
"name": "Example Toggle",
|
||||
"description": "resets every restart", # optional
|
||||
"flags": ["no_save"], # optional
|
||||
"type": "bool",
|
||||
"default": false
|
||||
},
|
||||
"example_2": {
|
||||
"name": "Example Number",
|
||||
"type": "number",
|
||||
"default": 42,
|
||||
"min": 1, # optional
|
||||
"max": 100, # optional
|
||||
"step": 4 # optional
|
||||
},
|
||||
"example_3": {
|
||||
"name": "Example text",
|
||||
"type": "string",
|
||||
"default": "hello world"
|
||||
},
|
||||
"example_4": {
|
||||
"name": "Example Vector3",
|
||||
"type": "Vector3",
|
||||
"default": [1, 2, 3]
|
||||
}
|
||||
}
|
||||
|
||||
var _settings = {}
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
_init_settings()
|
||||
load_settings()
|
||||
emit_signal("settings_loaded")
|
||||
save_settings()
|
||||
|
||||
|
||||
func get_setting(key):
|
||||
return _settings[key]
|
||||
|
||||
|
||||
func set_setting(key, val):
|
||||
if _settings[key] == val:
|
||||
return
|
||||
_settings[key] = val
|
||||
|
||||
emit_signal("setting_changed", key, val)
|
||||
save_settings()
|
||||
|
||||
if DEBUG_SETTINGS:
|
||||
print("Settings changed: ", key, " -> ", val)
|
||||
|
||||
|
||||
func _init_settings():
|
||||
for key in SETTINGS_DEF:
|
||||
_settings[key] = SETTINGS_DEF[key].default
|
||||
if DEBUG_SETTINGS:
|
||||
print("Default settings: ", _settings)
|
||||
|
||||
|
||||
func save_settings():
|
||||
var to_save = {}
|
||||
for key in _settings:
|
||||
if not (SETTINGS_DEF[key].has("flags") and "no_save" in SETTINGS_DEF[key].flags):
|
||||
to_save[key] = _settings[key]
|
||||
|
||||
var file = File.new()
|
||||
file.open(SETTINGS_PATH, File.WRITE)
|
||||
file.store_line(to_json(to_save))
|
||||
file.close()
|
||||
|
||||
|
||||
func load_settings() -> void:
|
||||
var file = File.new()
|
||||
|
||||
if not file.file_exists(SETTINGS_PATH):
|
||||
if DEBUG_SETTINGS:
|
||||
print("No settings file exists, using defaults")
|
||||
return
|
||||
|
||||
file.open(SETTINGS_PATH, File.READ)
|
||||
var new_settings = parse_json(file.get_as_text())
|
||||
file.close()
|
||||
|
||||
# in case the settings format has changed, this is better than just clonging blindly
|
||||
for key in new_settings:
|
||||
if _settings.has(key):
|
||||
var value = new_settings[key]
|
||||
match SETTINGS_DEF[key].type:
|
||||
["Vector2", "vector2"]:
|
||||
_settings[key] = Vector2(value[0], value[1])
|
||||
["Vector3", "vector3"]:
|
||||
_settings[key] = Vector3(value[0], value[1], value[2])
|
||||
_:
|
||||
_settings[key] = value
|
||||
|
||||
if DEBUG_SETTINGS:
|
||||
print("Loaded settings from file")
|
||||
print(_settings)
|
|
@ -1,24 +0,0 @@
|
|||
[preset.0]
|
||||
|
||||
name="Linux/X11"
|
||||
platform="Linux/X11"
|
||||
runnable=true
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
include_filter=""
|
||||
exclude_filter=""
|
||||
export_path="../builds/ovr-utils.x86_64"
|
||||
script_export_mode=1
|
||||
script_encryption_key=""
|
||||
|
||||
[preset.0.options]
|
||||
|
||||
custom_template/debug=""
|
||||
custom_template/release=""
|
||||
binary_format/64_bits=true
|
||||
binary_format/embed_pck=true
|
||||
texture_format/bptc=false
|
||||
texture_format/s3tc=true
|
||||
texture_format/etc=false
|
||||
texture_format/etc2=false
|
||||
texture_format/no_bptc_fallbacks=true
|
|
@ -1,49 +0,0 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://overlays/fps.gd" type="Script" id=1]
|
||||
[ext_resource path="res://fonts/OpenSans-Regular.ttf" type="DynamicFontData" id=2]
|
||||
|
||||
[sub_resource type="DynamicFont" id=1]
|
||||
size = 48
|
||||
font_data = ExtResource( 2 )
|
||||
|
||||
[node name="Overlay" type="Control"]
|
||||
modulate = Color( 1, 1, 1, 0.490196 )
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -222.0
|
||||
margin_top = -32.0
|
||||
margin_right = 222.0
|
||||
margin_bottom = 32.0
|
||||
color = Color( 0, 0, 0, 0.392157 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Label" type="Label" parent="ColorRect"]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -512.0
|
||||
margin_top = -33.5
|
||||
margin_right = 512.0
|
||||
margin_bottom = 33.5
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
text = "Overlay FPS: 60"
|
||||
align = 1
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
extends Label
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
pass
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if delta > 0:
|
||||
text = "Overlay FPS: " + str(round(1/delta))
|
|
@ -1,21 +0,0 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://overlays/xyz_widget/yz_widget.png" type="Texture" id=1]
|
||||
|
||||
[node name="Control" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="AspectRatioContainer" type="AspectRatioContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="AspectRatioContainer"]
|
||||
margin_left = 212.0
|
||||
margin_right = 812.0
|
||||
margin_bottom = 600.0
|
||||
texture = ExtResource( 1 )
|
||||
expand = true
|
Binary file not shown.
Before Width: | Height: | Size: 101 B |
|
@ -1,21 +0,0 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://overlays/xyz_widget/zx_widget.png" type="Texture" id=1]
|
||||
|
||||
[node name="Control" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="AspectRatioContainer" type="AspectRatioContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="AspectRatioContainer"]
|
||||
margin_left = 212.0
|
||||
margin_right = 812.0
|
||||
margin_bottom = 600.0
|
||||
texture = ExtResource( 1 )
|
||||
expand = true
|
Binary file not shown.
Before Width: | Height: | Size: 111 B |
|
@ -1,38 +0,0 @@
|
|||
; Engine configuration file.
|
||||
; It's best edited using the editor UI and not directly,
|
||||
; since the parameters that go here are not all obvious.
|
||||
;
|
||||
; Format:
|
||||
; [section] ; section goes between []
|
||||
; param=value ; assign values to parameters
|
||||
|
||||
config_version=4
|
||||
|
||||
[application]
|
||||
|
||||
config/name="ovr-utils"
|
||||
run/main_scene="res://Main.tscn"
|
||||
config/use_custom_user_dir=true
|
||||
config/custom_user_dir_name="ovr-utils"
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[autoload]
|
||||
|
||||
OverlayInit="*res://addons/openvr_overlay/overlay_init.gd"
|
||||
Settings="*res://addons/settings-manager/settings.gd"
|
||||
|
||||
[editor_plugins]
|
||||
|
||||
enabled=PoolStringArray( "res://addons/openvr_overlay/plugin.cfg", "res://addons/settings-manager/plugin.cfg" )
|
||||
|
||||
[gdnative]
|
||||
|
||||
singletons=[ "res://addons/godot-openvr/godot_openvr.gdnlib" ]
|
||||
|
||||
[physics]
|
||||
|
||||
common/enable_pause_aware_picking=true
|
||||
|
||||
[rendering]
|
||||
|
||||
environment/default_environment="res://default_env.tres"
|
|
@ -1,5 +0,0 @@
|
|||
extends Node
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
OS.window_size = Vector2(16, 16)
|
6
src/Main.tscn
Normal file
6
src/Main.tscn
Normal file
|
@ -0,0 +1,6 @@
|
|||
[gd_scene format=2]
|
||||
|
||||
[node name="Main" type="Node"]
|
||||
__meta__ = {
|
||||
"_editor_description_": "Everything is loaded using autoloads so this scene is just a dummy"
|
||||
}
|
12
src/OverlayManager.tscn
Normal file
12
src/OverlayManager.tscn
Normal file
|
@ -0,0 +1,12 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://addons/openvr_overlay/OverlayInstance.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://OverlaySettingsSync.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://overlay_manager.gd" type="Script" id=4]
|
||||
|
||||
[node name="OverlayManager" type="Node"]
|
||||
script = ExtResource( 4 )
|
||||
|
||||
[node name="MainOverlay" parent="." instance=ExtResource( 2 )]
|
||||
|
||||
[node name="OverlaySettingsSync" parent="MainOverlay" instance=ExtResource( 3 )]
|
12
src/OverlaySettingsSync.tscn
Normal file
12
src/OverlaySettingsSync.tscn
Normal file
|
@ -0,0 +1,12 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://overlay_settings_sync.gd" type="Script" id=1]
|
||||
|
||||
[node name="OverlaySettingsSync" type="Node"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="SyncTimer" type="Timer" parent="."]
|
||||
wait_time = 0.2
|
||||
autostart = true
|
||||
|
||||
[connection signal="timeout" from="SyncTimer" to="." method="_on_SyncTimer_timeout"]
|
6
src/addons/gdvk/GDVK.tscn
Normal file
6
src/addons/gdvk/GDVK.tscn
Normal file
|
@ -0,0 +1,6 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/gdvk/gdvk.gdns" type="Script" id=1]
|
||||
|
||||
[node name="GDVK" type="Node"]
|
||||
script = ExtResource( 1 )
|
BIN
src/addons/gdvk/bin/win64/libgdvk.dll
Executable file
BIN
src/addons/gdvk/bin/win64/libgdvk.dll
Executable file
Binary file not shown.
BIN
src/addons/gdvk/bin/x11/libgdvk.so
Executable file
BIN
src/addons/gdvk/bin/x11/libgdvk.so
Executable file
Binary file not shown.
17
src/addons/gdvk/gdvk.gdnlib
Normal file
17
src/addons/gdvk/gdvk.gdnlib
Normal file
|
@ -0,0 +1,17 @@
|
|||
[general]
|
||||
|
||||
singleton=false
|
||||
load_once=true
|
||||
symbol_prefix="gdvk_"
|
||||
reloadable=true
|
||||
|
||||
[entry]
|
||||
|
||||
X11.64="res://addons/gdvk/bin/x11/libgdvk.so"
|
||||
Windows.64="res://addons/gdvk/bin/win64/libgdvk.dll"
|
||||
|
||||
[dependencies]
|
||||
|
||||
X11.64=[ ]
|
||||
Windows.64=[ ]
|
||||
OSX.64=[ ]
|
8
src/addons/gdvk/gdvk.gdns
Normal file
8
src/addons/gdvk/gdvk.gdns
Normal file
|
@ -0,0 +1,8 @@
|
|||
[gd_resource type="NativeScript" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/gdvk/gdvk.gdnlib" type="GDNativeLibrary" id=1]
|
||||
|
||||
[resource]
|
||||
resource_name = "gdvk"
|
||||
class_name = "GDVK"
|
||||
library = ExtResource( 1 )
|
10
src/addons/gdvk/gdvk_plugin.gd
Normal file
10
src/addons/gdvk/gdvk_plugin.gd
Normal file
|
@ -0,0 +1,10 @@
|
|||
tool
|
||||
extends EditorPlugin
|
||||
|
||||
|
||||
func _enter_tree() -> void:
|
||||
add_autoload_singleton("GDVK", "res://addons/gdvk/GDVK.tscn")
|
||||
|
||||
|
||||
func _exit_tree() -> void:
|
||||
remove_autoload_singleton("GDVK")
|
9
src/addons/gdvk/plugin.cfg
Normal file
9
src/addons/gdvk/plugin.cfg
Normal file
|
@ -0,0 +1,9 @@
|
|||
[plugin]
|
||||
|
||||
name="GDVK"
|
||||
description="Godot virtual keyboard plugin
|
||||
|
||||
see https://github.com/CrispyPin/gdvk"
|
||||
author="CrispyPin"
|
||||
version="0.1.0"
|
||||
script="gdvk_plugin.gd"
|
|
@ -4,10 +4,19 @@ Changes to the Godot OpenVR asset
|
|||
Note, version numbers listed here are the version number assigned to the asset. Each time a new version is uploaded to the asset store we will increase the version number.
|
||||
More frequent updates may be available on the source repository.
|
||||
|
||||
1.1.0 - In progress
|
||||
-------------------
|
||||
- Build for Godot 3.2
|
||||
- Added support for actions
|
||||
- Added support for request play area
|
||||
- Added skeleton support (finger tracking)
|
||||
|
||||
1.0.5 - 1 March 2019
|
||||
--------------------
|
||||
- Now using OpenVR 1.9.16
|
||||
- Added support for overlays
|
||||
- Proper asynchronious loading of controller meshes and textures
|
||||
- Rewrite to using godot_cpp classes
|
||||
|
||||
1.0.4 - 27 March 2019
|
||||
---------------------
|
25
src/addons/godot-openvr/EditorPlugin.gd
Normal file
25
src/addons/godot-openvr/EditorPlugin.gd
Normal file
|
@ -0,0 +1,25 @@
|
|||
tool
|
||||
extends EditorPlugin
|
||||
|
||||
var export_plugin
|
||||
|
||||
func _enter_tree():
|
||||
# Initialization of the plugin goes here
|
||||
export_plugin = preload("res://addons/godot-openvr/OpenVRExportPlugin.gd")
|
||||
|
||||
if export_plugin:
|
||||
# print("Loaded res://addons/godot-openvr/OpenVRExportPlugin.gd")
|
||||
|
||||
export_plugin = export_plugin.new()
|
||||
if export_plugin:
|
||||
# print("New res://addons/godot-openvr/OpenVRExportPlugin.gd")
|
||||
add_export_plugin(export_plugin)
|
||||
# else:
|
||||
# print("Failed to instance res://addons/godot-openvr/OpenVRExportPlugin.gd")
|
||||
#else:
|
||||
# print("Failed to load res://addons/godot-openvr/OpenVRExportPlugin.gd")
|
||||
|
||||
func _exit_tree():
|
||||
# Clean-up of the plugin goes here
|
||||
if export_plugin:
|
||||
remove_export_plugin(export_plugin)
|
8
src/addons/godot-openvr/OpenVRAction.gdns
Normal file
8
src/addons/godot-openvr/OpenVRAction.gdns
Normal file
|
@ -0,0 +1,8 @@
|
|||
[gd_resource type="NativeScript" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/godot-openvr/godot_openvr.gdnlib" type="GDNativeLibrary" id=1]
|
||||
|
||||
[resource]
|
||||
resource_name = "OpenVRAction"
|
||||
class_name = "OpenVRAction"
|
||||
library = ExtResource( 1 )
|
8
src/addons/godot-openvr/OpenVRController.gdns
Normal file
8
src/addons/godot-openvr/OpenVRController.gdns
Normal file
|
@ -0,0 +1,8 @@
|
|||
[gd_resource type="NativeScript" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/godot-openvr/godot_openvr.gdnlib" type="GDNativeLibrary" id=1]
|
||||
|
||||
[resource]
|
||||
resource_name = "OpenVRController"
|
||||
class_name = "OpenVRController"
|
||||
library = ExtResource( 1 )
|
40
src/addons/godot-openvr/OpenVRExportPlugin.gd
Normal file
40
src/addons/godot-openvr/OpenVRExportPlugin.gd
Normal file
|
@ -0,0 +1,40 @@
|
|||
tool
|
||||
extends EditorExportPlugin
|
||||
|
||||
func _export_begin(features: PoolStringArray, is_debug: bool, path: String, flags: int ):
|
||||
var dir = Directory.new()
|
||||
|
||||
# we just want the path
|
||||
var export_to = path.get_base_dir() + "/actions/"
|
||||
|
||||
# now determine which action files to export
|
||||
var export_from = ""
|
||||
if dir.file_exists("res://actions/actions.json"):
|
||||
export_from = "res://actions/"
|
||||
elif dir.file_exists("res://addons/godot-openvr/actions/actions.json"):
|
||||
export_from = "res://addons/godot-openvr/actions/"
|
||||
else:
|
||||
print("WARNING: Couldn't locate actions files to export")
|
||||
return
|
||||
|
||||
# print("Exporting " + export_from +" to " + export_to)
|
||||
if !dir.dir_exists(export_to):
|
||||
dir.make_dir(export_to)
|
||||
|
||||
if dir.open(export_from) == OK:
|
||||
dir.list_dir_begin(true, true)
|
||||
|
||||
var filename = dir.get_next()
|
||||
while filename != "":
|
||||
# print("Copy " + filename)
|
||||
dir.copy(export_from + filename, export_to + filename)
|
||||
|
||||
filename = dir.get_next()
|
||||
|
||||
dir.list_dir_end()
|
||||
|
||||
#func _export_end():
|
||||
# print("Export ended")
|
||||
|
||||
#func _export_file(path: String, type: String, features: PoolStringArray):
|
||||
# print("Export " + path)
|
8
src/addons/godot-openvr/OpenVRHaptics.gdns
Normal file
8
src/addons/godot-openvr/OpenVRHaptics.gdns
Normal file
|
@ -0,0 +1,8 @@
|
|||
[gd_resource type="NativeScript" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/godot-openvr/godot_openvr.gdnlib" type="GDNativeLibrary" id=1]
|
||||
|
||||
[resource]
|
||||
resource_name = "OpenVRHaptics"
|
||||
class_name = "OpenVRHaptics"
|
||||
library = ExtResource( 1 )
|
8
src/addons/godot-openvr/OpenVRPose.gdns
Normal file
8
src/addons/godot-openvr/OpenVRPose.gdns
Normal file
|
@ -0,0 +1,8 @@
|
|||
[gd_resource type="NativeScript" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/godot-openvr/godot_openvr.gdnlib" type="GDNativeLibrary" id=1]
|
||||
|
||||
[resource]
|
||||
resource_name = "OpenVRPose"
|
||||
class_name = "OpenVRPose"
|
||||
library = ExtResource( 1 )
|
10
src/addons/godot-openvr/OpenVRSkeleton.gdns
Normal file
10
src/addons/godot-openvr/OpenVRSkeleton.gdns
Normal file
|
@ -0,0 +1,10 @@
|
|||
[gd_resource type="NativeScript" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/godot-openvr/godot_openvr.gdnlib" type="GDNativeLibrary" id=1]
|
||||
|
||||
[resource]
|
||||
|
||||
resource_name = "OpenVRSkeleton"
|
||||
class_name = "OpenVRSkeleton"
|
||||
library = ExtResource( 1 )
|
||||
_sections_unfolded = [ "Resource" ]
|
107
src/addons/godot-openvr/actions/actions.json
Normal file
107
src/addons/godot-openvr/actions/actions.json
Normal file
|
@ -0,0 +1,107 @@
|
|||
{
|
||||
"action_set" : [
|
||||
{
|
||||
"name" : "/actions/godot",
|
||||
"usage" : "leftright"
|
||||
}
|
||||
],
|
||||
"actions" : [
|
||||
{
|
||||
"name" : "/actions/godot/in/trigger",
|
||||
"requirement" : "mandatory",
|
||||
"type" : "boolean"
|
||||
},
|
||||
{
|
||||
"name" : "/actions/godot/in/analog_trigger",
|
||||
"requirement" : "suggested",
|
||||
"type" : "vector1"
|
||||
},
|
||||
{
|
||||
"name" : "/actions/godot/in/grip",
|
||||
"requirement" : "suggested",
|
||||
"type" : "boolean"
|
||||
},
|
||||
{
|
||||
"name" : "/actions/godot/in/analog_grip",
|
||||
"requirement" : "suggested",
|
||||
"type" : "vector1"
|
||||
},
|
||||
{
|
||||
"name" : "/actions/godot/in/analog",
|
||||
"requirement" : "suggested",
|
||||
"type" : "vector2"
|
||||
},
|
||||
{
|
||||
"name" : "/actions/godot/in/analog_click",
|
||||
"requirement" : "suggested",
|
||||
"type" : "boolean"
|
||||
},
|
||||
{
|
||||
"name" : "/actions/godot/in/button_ax",
|
||||
"requirement" : "optional",
|
||||
"type" : "boolean"
|
||||
},
|
||||
{
|
||||
"name" : "/actions/godot/in/button_by",
|
||||
"requirement" : "optional",
|
||||
"type" : "boolean"
|
||||
},
|
||||
{
|
||||
"name" : "/actions/godot/out/haptic",
|
||||
"requirement" : "optional",
|
||||
"type" : "vibration"
|
||||
},
|
||||
{
|
||||
"name": "/actions/godot/in/left_hand",
|
||||
"type": "skeleton",
|
||||
"skeleton": "/skeleton/hand/left"
|
||||
},
|
||||
{
|
||||
"name": "/actions/godot/in/right_hand",
|
||||
"type": "skeleton",
|
||||
"skeleton": "/skeleton/hand/right"
|
||||
} ],
|
||||
"default_bindings" : [
|
||||
{
|
||||
"binding_url" : "bindings_index_controller.json",
|
||||
"controller_type" : "knuckles"
|
||||
},
|
||||
{
|
||||
"binding_url" : "bindings_oculus_touch.json",
|
||||
"controller_type" : "oculus_touch"
|
||||
},
|
||||
{
|
||||
"binding_url" : "bindings_vive_controller.json",
|
||||
"controller_type" : "vive_controller"
|
||||
},
|
||||
{
|
||||
"binding_url" : "bindings_holographic_controller.json",
|
||||
"controller_type" : "holographic_controller"
|
||||
},
|
||||
{
|
||||
"binding_url" : "bindings_generic.json",
|
||||
"controller_type" : "generic"
|
||||
},
|
||||
{
|
||||
"binding_url" : "bindings_gamepad.json",
|
||||
"controller_type" : "gamepad"
|
||||
}
|
||||
],
|
||||
"localization" : [
|
||||
{
|
||||
"/actions/godot" : "Godot actions",
|
||||
"/actions/godot/in/analog" : "Analog Input",
|
||||
"/actions/godot/in/analog_click" : "Analog Click",
|
||||
"/actions/godot/in/analog_grip" : "Analog Grip",
|
||||
"/actions/godot/in/analog_trigger" : "Analog Trigger",
|
||||
"/actions/godot/in/button_ax" : "A/X Button",
|
||||
"/actions/godot/in/button_by" : "B/Y Button",
|
||||
"/actions/godot/in/grip" : "Grip",
|
||||
"/actions/godot/in/trigger" : "Trigger",
|
||||
"/actions/godot/out/haptic" : "Haptic Feedback",
|
||||
"/actions/godot/in/left_hand" : "Left hand",
|
||||
"/actions/godot/in/right_hand" : "Right hand",
|
||||
"language_tag" : "en_US"
|
||||
}
|
||||
]
|
||||
}
|
112
src/addons/godot-openvr/actions/bindings_gamepad.json
Normal file
112
src/addons/godot-openvr/actions/bindings_gamepad.json
Normal file
|
@ -0,0 +1,112 @@
|
|||
{
|
||||
"action_manifest_version" : 0,
|
||||
"alias_info" : {},
|
||||
"bindings" : {
|
||||
"/actions/godot" : {
|
||||
"haptics" : [
|
||||
{
|
||||
"output" : "/actions/godot/out/haptic",
|
||||
"path" : "/user/hand/left/output/haptic"
|
||||
},
|
||||
{
|
||||
"output" : "/actions/godot/out/haptic",
|
||||
"path" : "/user/hand/right/output/haptic"
|
||||
}
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/trigger"
|
||||
}
|
||||
},
|
||||
"mode" : "button",
|
||||
"path" : "/user/hand/left/input/trigger"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/trigger"
|
||||
}
|
||||
},
|
||||
"mode" : "button",
|
||||
"path" : "/user/hand/right/input/trigger"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/grip"
|
||||
}
|
||||
},
|
||||
"mode" : "button",
|
||||
"path" : "/user/hand/right/input/grip"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/grip"
|
||||
}
|
||||
},
|
||||
"mode" : "button",
|
||||
"path" : "/user/hand/left/input/grip"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"position" : {
|
||||
"output" : "/actions/godot/in/analog"
|
||||
}
|
||||
},
|
||||
"mode" : "trackpad",
|
||||
"path" : "/user/hand/left/input/trackpad"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"position" : {
|
||||
"output" : "/actions/godot/in/analog"
|
||||
}
|
||||
},
|
||||
"mode" : "trackpad",
|
||||
"path" : "/user/hand/right/input/trackpad"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"pull" : {
|
||||
"output" : "/actions/godot/in/analog_trigger"
|
||||
}
|
||||
},
|
||||
"mode" : "trigger",
|
||||
"path" : "/user/gamepad/input/trigger_right"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/grip"
|
||||
}
|
||||
},
|
||||
"mode" : "button",
|
||||
"path" : "/user/gamepad/input/shoulder_right"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/analog_click"
|
||||
},
|
||||
"position" : {
|
||||
"output" : "/actions/godot/in/analog"
|
||||
}
|
||||
},
|
||||
"mode" : "joystick",
|
||||
"path" : "/user/gamepad/input/joystick_right"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"category" : "steamvr_input",
|
||||
"controller_type" : "gamepad",
|
||||
"description" : "Bindings for the Godot OpenVR plugin for a generic controller",
|
||||
"name" : "Godot bindings for Gamepad",
|
||||
"options" : {
|
||||
"returnBindingsWithRightHand" : true
|
||||
},
|
||||
"simulated_actions" : []
|
||||
}
|
75
src/addons/godot-openvr/actions/bindings_generic.json
Normal file
75
src/addons/godot-openvr/actions/bindings_generic.json
Normal file
|
@ -0,0 +1,75 @@
|
|||
{
|
||||
"bindings" : {
|
||||
"/actions/godot" : {
|
||||
"haptics" : [
|
||||
{
|
||||
"output" : "/actions/godot/out/haptic",
|
||||
"path" : "/user/hand/left/output/haptic"
|
||||
},
|
||||
{
|
||||
"output" : "/actions/godot/out/haptic",
|
||||
"path" : "/user/hand/right/output/haptic"
|
||||
}
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/trigger"
|
||||
}
|
||||
},
|
||||
"mode" : "button",
|
||||
"path" : "/user/hand/left/input/trigger"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/trigger"
|
||||
}
|
||||
},
|
||||
"mode" : "button",
|
||||
"path" : "/user/hand/right/input/trigger"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/grip"
|
||||
}
|
||||
},
|
||||
"mode" : "button",
|
||||
"path" : "/user/hand/right/input/grip"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/grip"
|
||||
}
|
||||
},
|
||||
"mode" : "button",
|
||||
"path" : "/user/hand/left/input/grip"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"position" : {
|
||||
"output" : "/actions/godot/in/analog"
|
||||
}
|
||||
},
|
||||
"mode" : "trackpad",
|
||||
"path" : "/user/hand/left/input/trackpad"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"position" : {
|
||||
"output" : "/actions/godot/in/analog"
|
||||
}
|
||||
},
|
||||
"mode" : "trackpad",
|
||||
"path" : "/user/hand/right/input/trackpad"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"controller_type" : "generic",
|
||||
"description" : "Bindings for the Godot OpenVR plugin for a generic controller",
|
||||
"name" : "Godot bindings for a generic controller"
|
||||
}
|
|
@ -0,0 +1,132 @@
|
|||
{
|
||||
"action_manifest_version" : 0,
|
||||
"alias_info" : {},
|
||||
"bindings" : {
|
||||
"/actions/godot" : {
|
||||
"haptics" : [
|
||||
{
|
||||
"output" : "/actions/godot/out/haptic",
|
||||
"path" : "/user/hand/left/output/haptic"
|
||||
},
|
||||
{
|
||||
"output" : "/actions/godot/out/haptic",
|
||||
"path" : "/user/hand/right/output/haptic"
|
||||
}
|
||||
],
|
||||
"skeleton" : [
|
||||
{
|
||||
"output" : "/actions/godot/in/left_hand",
|
||||
"path" : "/user/hand/left/input/skeleton/left"
|
||||
},
|
||||
{
|
||||
"output" : "/actions/godot/in/right_hand",
|
||||
"path" : "/user/hand/right/input/skeleton/right"
|
||||
}
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/grip"
|
||||
}
|
||||
},
|
||||
"mode" : "button",
|
||||
"path" : "/user/hand/right/input/grip"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/grip"
|
||||
}
|
||||
},
|
||||
"mode" : "button",
|
||||
"path" : "/user/hand/left/input/grip"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"pull" : {
|
||||
"output" : "/actions/godot/in/analog_trigger"
|
||||
}
|
||||
},
|
||||
"mode" : "trigger",
|
||||
"path" : "/user/hand/left/input/trigger"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/trigger"
|
||||
}
|
||||
},
|
||||
"mode" : "button",
|
||||
"path" : "/user/hand/left/input/trigger"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"pull" : {
|
||||
"output" : "/actions/godot/in/analog_trigger"
|
||||
}
|
||||
},
|
||||
"mode" : "trigger",
|
||||
"path" : "/user/hand/right/input/trigger"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/trigger"
|
||||
}
|
||||
},
|
||||
"mode" : "button",
|
||||
"path" : "/user/hand/right/input/trigger"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"value" : {
|
||||
"output" : "/actions/godot/in/analog_grip"
|
||||
}
|
||||
},
|
||||
"mode" : "scalar_constant",
|
||||
"path" : "/user/hand/left/input/grip"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"value" : {
|
||||
"output" : "/actions/godot/in/analog_grip"
|
||||
}
|
||||
},
|
||||
"mode" : "scalar_constant",
|
||||
"path" : "/user/hand/right/input/grip"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/analog_click"
|
||||
},
|
||||
"position" : {
|
||||
"output" : "/actions/godot/in/analog"
|
||||
}
|
||||
},
|
||||
"mode" : "joystick",
|
||||
"path" : "/user/hand/left/input/joystick"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/analog_click"
|
||||
},
|
||||
"position" : {
|
||||
"output" : "/actions/godot/in/analog"
|
||||
}
|
||||
},
|
||||
"mode" : "joystick",
|
||||
"path" : "/user/hand/right/input/joystick"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"category" : "steamvr_input",
|
||||
"controller_type" : "holographic_controller",
|
||||
"description" : "Bindings for the Godot OpenVR plugin for Windows Mixed Reality Controller",
|
||||
"name" : "Godot bindings for Windows Mixed Reality Controller",
|
||||
"options" : {},
|
||||
"simulated_actions" : []
|
||||
}
|
144
src/addons/godot-openvr/actions/bindings_index_controller.json
Normal file
144
src/addons/godot-openvr/actions/bindings_index_controller.json
Normal file
|
@ -0,0 +1,144 @@
|
|||
{
|
||||
"action_manifest_version" : 0,
|
||||
"alias_info" : {},
|
||||
"bindings" : {
|
||||
"/actions/godot" : {
|
||||
"haptics" : [
|
||||
{
|
||||
"output" : "/actions/godot/out/haptic",
|
||||
"path" : "/user/hand/left/output/haptic"
|
||||
},
|
||||
{
|
||||
"output" : "/actions/godot/out/haptic",
|
||||
"path" : "/user/hand/right/output/haptic"
|
||||
}
|
||||
],
|
||||
"skeleton" : [
|
||||
{
|
||||
"output" : "/actions/godot/in/left_hand",
|
||||
"path" : "/user/hand/left/input/skeleton/left"
|
||||
},
|
||||
{
|
||||
"output" : "/actions/godot/in/right_hand",
|
||||
"path" : "/user/hand/right/input/skeleton/right"
|
||||
}
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/trigger"
|
||||
},
|
||||
"pull" : {
|
||||
"output" : "/actions/godot/in/analog_trigger"
|
||||
}
|
||||
},
|
||||
"mode" : "trigger",
|
||||
"path" : "/user/hand/left/input/trigger"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/trigger"
|
||||
},
|
||||
"pull" : {
|
||||
"output" : "/actions/godot/in/analog_trigger"
|
||||
}
|
||||
},
|
||||
"mode" : "trigger",
|
||||
"path" : "/user/hand/right/input/trigger"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/analog_click"
|
||||
},
|
||||
"position" : {
|
||||
"output" : "/actions/godot/in/analog"
|
||||
}
|
||||
},
|
||||
"mode" : "joystick",
|
||||
"path" : "/user/hand/left/input/thumbstick"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/analog_click"
|
||||
},
|
||||
"position" : {
|
||||
"output" : "/actions/godot/in/analog"
|
||||
}
|
||||
},
|
||||
"mode" : "joystick",
|
||||
"path" : "/user/hand/right/input/thumbstick"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"pull" : {
|
||||
"output" : "/actions/godot/in/analog_grip"
|
||||
},
|
||||
"touch" : {
|
||||
"output" : "/actions/godot/in/grip"
|
||||
}
|
||||
},
|
||||
"mode" : "trigger",
|
||||
"path" : "/user/hand/left/input/grip"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"pull" : {
|
||||
"output" : "/actions/godot/in/analog_grip"
|
||||
},
|
||||
"touch" : {
|
||||
"output" : "/actions/godot/in/grip"
|
||||
}
|
||||
},
|
||||
"mode" : "trigger",
|
||||
"path" : "/user/hand/right/input/grip"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/button_by"
|
||||
}
|
||||
},
|
||||
"mode" : "button",
|
||||
"path" : "/user/hand/left/input/b"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/button_by"
|
||||
}
|
||||
},
|
||||
"mode" : "button",
|
||||
"path" : "/user/hand/right/input/b"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/button_ax"
|
||||
}
|
||||
},
|
||||
"mode" : "button",
|
||||
"path" : "/user/hand/left/input/a"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/button_ax"
|
||||
}
|
||||
},
|
||||
"mode" : "button",
|
||||
"path" : "/user/hand/right/input/a"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"category" : "steamvr_input",
|
||||
"controller_type" : "knuckles",
|
||||
"description" : "Bindings for the Godot OpenVR plugin for an index controller",
|
||||
"name" : "Godot bindings for an index controller",
|
||||
"options" : {},
|
||||
"simulated_actions" : []
|
||||
}
|
144
src/addons/godot-openvr/actions/bindings_oculus_touch.json
Normal file
144
src/addons/godot-openvr/actions/bindings_oculus_touch.json
Normal file
|
@ -0,0 +1,144 @@
|
|||
{
|
||||
"action_manifest_version" : 0,
|
||||
"alias_info" : {},
|
||||
"bindings" : {
|
||||
"/actions/godot" : {
|
||||
"haptics" : [
|
||||
{
|
||||
"output" : "/actions/godot/out/haptic",
|
||||
"path" : "/user/hand/left/output/haptic"
|
||||
},
|
||||
{
|
||||
"output" : "/actions/godot/out/haptic",
|
||||
"path" : "/user/hand/right/output/haptic"
|
||||
}
|
||||
],
|
||||
"skeleton" : [
|
||||
{
|
||||
"output" : "/actions/godot/in/left_hand",
|
||||
"path" : "/user/hand/left/input/skeleton/left"
|
||||
},
|
||||
{
|
||||
"output" : "/actions/godot/in/right_hand",
|
||||
"path" : "/user/hand/right/input/skeleton/right"
|
||||
}
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/analog_click"
|
||||
},
|
||||
"position" : {
|
||||
"output" : "/actions/godot/in/analog"
|
||||
}
|
||||
},
|
||||
"mode" : "joystick",
|
||||
"path" : "/user/hand/left/input/joystick"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/button_ax"
|
||||
}
|
||||
},
|
||||
"mode" : "button",
|
||||
"path" : "/user/hand/left/input/x"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/button_by"
|
||||
}
|
||||
},
|
||||
"mode" : "button",
|
||||
"path" : "/user/hand/left/input/y"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/analog_click"
|
||||
},
|
||||
"position" : {
|
||||
"output" : "/actions/godot/in/analog"
|
||||
}
|
||||
},
|
||||
"mode" : "joystick",
|
||||
"path" : "/user/hand/right/input/joystick"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/button_ax"
|
||||
}
|
||||
},
|
||||
"mode" : "button",
|
||||
"path" : "/user/hand/right/input/a"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/button_by"
|
||||
}
|
||||
},
|
||||
"mode" : "button",
|
||||
"path" : "/user/hand/right/input/b"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/trigger"
|
||||
},
|
||||
"pull" : {
|
||||
"output" : "/actions/godot/in/analog_trigger"
|
||||
}
|
||||
},
|
||||
"mode" : "trigger",
|
||||
"path" : "/user/hand/left/input/trigger"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/trigger"
|
||||
},
|
||||
"pull" : {
|
||||
"output" : "/actions/godot/in/analog_trigger"
|
||||
}
|
||||
},
|
||||
"mode" : "trigger",
|
||||
"path" : "/user/hand/right/input/trigger"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/grip"
|
||||
},
|
||||
"pull" : {
|
||||
"output" : "/actions/godot/in/analog_grip"
|
||||
}
|
||||
},
|
||||
"mode" : "trigger",
|
||||
"path" : "/user/hand/left/input/grip"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/grip"
|
||||
},
|
||||
"pull" : {
|
||||
"output" : "/actions/godot/in/analog_grip"
|
||||
}
|
||||
},
|
||||
"mode" : "trigger",
|
||||
"path" : "/user/hand/right/input/grip"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"category" : "steamvr_input",
|
||||
"controller_type" : "oculus_touch",
|
||||
"description" : "Bindings for the Godot OpenVR SDK plugin for the Oculus Touch",
|
||||
"name" : "Godot bindings for Oculus Touch",
|
||||
"options" : {},
|
||||
"simulated_actions" : []
|
||||
}
|
120
src/addons/godot-openvr/actions/bindings_vive_controller.json
Normal file
120
src/addons/godot-openvr/actions/bindings_vive_controller.json
Normal file
|
@ -0,0 +1,120 @@
|
|||
{
|
||||
"action_manifest_version" : 0,
|
||||
"alias_info" : {},
|
||||
"bindings" : {
|
||||
"/actions/godot" : {
|
||||
"haptics" : [
|
||||
{
|
||||
"output" : "/actions/godot/out/haptic",
|
||||
"path" : "/user/hand/left/output/haptic"
|
||||
},
|
||||
{
|
||||
"output" : "/actions/godot/out/haptic",
|
||||
"path" : "/user/hand/right/output/haptic"
|
||||
}
|
||||
],
|
||||
"skeleton" : [
|
||||
{
|
||||
"output" : "/actions/godot/in/left_hand",
|
||||
"path" : "/user/hand/left/input/skeleton/left"
|
||||
},
|
||||
{
|
||||
"output" : "/actions/godot/in/right_hand",
|
||||
"path" : "/user/hand/right/input/skeleton/right"
|
||||
}
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/analog_click"
|
||||
},
|
||||
"position" : {
|
||||
"output" : "/actions/godot/in/analog"
|
||||
}
|
||||
},
|
||||
"mode" : "trackpad",
|
||||
"path" : "/user/hand/left/input/trackpad"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/analog_click"
|
||||
},
|
||||
"position" : {
|
||||
"output" : "/actions/godot/in/analog"
|
||||
}
|
||||
},
|
||||
"mode" : "trackpad",
|
||||
"path" : "/user/hand/right/input/trackpad"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/grip"
|
||||
}
|
||||
},
|
||||
"mode" : "button",
|
||||
"path" : "/user/hand/left/input/grip"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/grip"
|
||||
}
|
||||
},
|
||||
"mode" : "button",
|
||||
"path" : "/user/hand/right/input/grip"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/trigger"
|
||||
},
|
||||
"pull" : {
|
||||
"output" : "/actions/godot/in/analog_trigger"
|
||||
}
|
||||
},
|
||||
"mode" : "trigger",
|
||||
"path" : "/user/hand/left/input/trigger"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"click" : {
|
||||
"output" : "/actions/godot/in/trigger"
|
||||
},
|
||||
"pull" : {
|
||||
"output" : "/actions/godot/in/analog_trigger"
|
||||
}
|
||||
},
|
||||
"mode" : "trigger",
|
||||
"path" : "/user/hand/right/input/trigger"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"value" : {
|
||||
"output" : "/actions/godot/in/analog_grip"
|
||||
}
|
||||
},
|
||||
"mode" : "scalar_constant",
|
||||
"path" : "/user/hand/left/input/grip"
|
||||
},
|
||||
{
|
||||
"inputs" : {
|
||||
"value" : {
|
||||
"output" : "/actions/godot/in/analog_grip"
|
||||
}
|
||||
},
|
||||
"mode" : "scalar_constant",
|
||||
"path" : "/user/hand/right/input/grip"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"category" : "steamvr_input",
|
||||
"controller_type" : "vive_controller",
|
||||
"description" : "Bindings for the Godot OpenVR SDK plugin for the Vive controller",
|
||||
"name" : "Godot bindings for Vive Controller",
|
||||
"options" : {},
|
||||
"simulated_actions" : []
|
||||
}
|
BIN
src/addons/godot-openvr/bin/win64/libgodot_openvr.dll
Normal file
BIN
src/addons/godot-openvr/bin/win64/libgodot_openvr.dll
Normal file
Binary file not shown.
BIN
src/addons/godot-openvr/bin/x11/libgodot_openvr.so
Executable file
BIN
src/addons/godot-openvr/bin/x11/libgodot_openvr.so
Executable file
Binary file not shown.
BIN
src/addons/godot-openvr/bin/x11/libopenvr_api.so
Normal file
BIN
src/addons/godot-openvr/bin/x11/libopenvr_api.so
Normal file
Binary file not shown.
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
7
src/addons/godot-openvr/plugin.cfg
Normal file
7
src/addons/godot-openvr/plugin.cfg
Normal file
|
@ -0,0 +1,7 @@
|
|||
[plugin]
|
||||
|
||||
name="Godot OpenVR"
|
||||
description="Godot OpenVR plugin"
|
||||
author="Bastiaan Olij and contributors"
|
||||
version="1.1.0"
|
||||
script="EditorPlugin.gd"
|
61
src/addons/godot-openvr/scenes/framecounter_in_3d.tscn
Normal file
61
src/addons/godot-openvr/scenes/framecounter_in_3d.tscn
Normal file
|
@ -0,0 +1,61 @@
|
|||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[sub_resource type="PlaneMesh" id=1]
|
||||
size = Vector2( 0.3, 0.15 )
|
||||
subdivide_width = 10
|
||||
subdivide_depth = 10
|
||||
|
||||
[sub_resource type="Shader" id=2]
|
||||
code = "shader_type spatial;
|
||||
render_mode unshaded;
|
||||
|
||||
uniform sampler2D viewport_texture : hint_albedo;
|
||||
|
||||
void vertex() {
|
||||
VERTEX.y = 1.0 - cos(VERTEX.x) * 0.5 - cos(VERTEX.z) * 0.5;
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec4 col = texture(viewport_texture, vec2(1.0 - UV.x, UV.y));
|
||||
ALBEDO = col.rgb;
|
||||
ALPHA = col.a;
|
||||
}
|
||||
"
|
||||
|
||||
[sub_resource type="ShaderMaterial" id=3]
|
||||
shader = SubResource( 2 )
|
||||
|
||||
[sub_resource type="GDScript" id=4]
|
||||
script/source = "extends MeshInstance
|
||||
|
||||
func _ready():
|
||||
get_surface_material(0).set_shader_param(\"viewport_texture\", $Viewport.get_texture())
|
||||
|
||||
|
||||
func _process(delta):
|
||||
$Viewport/Label.text = str(Engine.get_frames_per_second()) + \" FPS\"
|
||||
"
|
||||
|
||||
[node name="FPS" type="MeshInstance"]
|
||||
transform = Transform( 1, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0 )
|
||||
mesh = SubResource( 1 )
|
||||
material/0 = SubResource( 3 )
|
||||
script = SubResource( 4 )
|
||||
|
||||
[node name="Viewport" type="Viewport" parent="."]
|
||||
size = Vector2( 200, 100 )
|
||||
transparent_bg = true
|
||||
hdr = false
|
||||
usage = 0
|
||||
render_target_update_mode = 3
|
||||
|
||||
[node name="Label" type="Label" parent="Viewport"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
rect_scale = Vector2( 3, 3 )
|
||||
custom_colors/font_color = Color( 1, 1, 1, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
text = "FPS"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
32
src/addons/godot-openvr/scenes/ovr_controller.gd
Normal file
32
src/addons/godot-openvr/scenes/ovr_controller.gd
Normal file
|
@ -0,0 +1,32 @@
|
|||
extends ARVRController
|
||||
|
||||
signal controller_activated(controller)
|
||||
|
||||
export var show_controller_mesh = true setget set_show_controller_mesh, get_show_controller_mesh
|
||||
|
||||
func set_show_controller_mesh(p_show):
|
||||
show_controller_mesh = p_show
|
||||
if $OVRRenderModel:
|
||||
$OVRRenderModel.visible = p_show
|
||||
|
||||
func get_show_controller_mesh():
|
||||
return show_controller_mesh
|
||||
|
||||
func _ready():
|
||||
# set our starting vaule
|
||||
$OVRRenderModel.visible = show_controller_mesh
|
||||
|
||||
# hide to begin with
|
||||
visible = false
|
||||
|
||||
func _process(delta):
|
||||
if !get_is_active():
|
||||
visible = false
|
||||
return
|
||||
|
||||
if visible:
|
||||
return
|
||||
|
||||
# make it visible
|
||||
visible = true
|
||||
emit_signal("controller_activated", self)
|
9
src/addons/godot-openvr/scenes/ovr_controller.tscn
Normal file
9
src/addons/godot-openvr/scenes/ovr_controller.tscn
Normal file
|
@ -0,0 +1,9 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://addons/godot-openvr/scenes/ovr_controller.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/godot-openvr/scenes/ovr_render_model.tscn" type="PackedScene" id=2]
|
||||
|
||||
[node name="OVRController" type="ARVRController"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="OVRRenderModel" parent="." instance=ExtResource( 2 )]
|
|
@ -1,14 +1,10 @@
|
|||
[gd_scene load_steps=6 format=2]
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://addons/vr-common/misc/VR_Common_Shader_Cache.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://addons/godot-openvr/scenes/ovr_shader_cache.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://addons/godot-openvr/scenes/ovr_controller.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://addons/godot-openvr/scenes/ovr_main.gd" type="Script" id=3]
|
||||
|
||||
[sub_resource type="PlaneMesh" id=1]
|
||||
size = Vector2( 0.001, 0.001 )
|
||||
|
||||
[sub_resource type="SpatialMaterial" id=2]
|
||||
|
||||
[sub_resource type="GDScript" id=3]
|
||||
[sub_resource type="GDScript" id=1]
|
||||
script/source = "extends Spatial
|
||||
|
||||
func _physics_process(delta):
|
||||
|
@ -28,6 +24,7 @@ func _physics_process(delta):
|
|||
pass"
|
||||
|
||||
[node name="OVRFirstPerson" type="ARVROrigin"]
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="ARVRCamera" type="ARVRCamera" parent="."]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.85, 0 )
|
||||
|
@ -35,16 +32,11 @@ fov = 65.0
|
|||
near = 0.01
|
||||
far = 1000.01
|
||||
|
||||
[node name="shader_cache" parent="ARVRCamera" instance=ExtResource( 1 )]
|
||||
|
||||
[node name="Controller" type="MeshInstance" parent="ARVRCamera/shader_cache"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -2 )
|
||||
mesh = SubResource( 1 )
|
||||
material/0 = SubResource( 2 )
|
||||
[node name="ovr_shader_cache" parent="ARVRCamera" instance=ExtResource( 1 )]
|
||||
|
||||
[node name="HUD_Anchor" type="Spatial" parent="."]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.85, 0 )
|
||||
script = SubResource( 3 )
|
||||
script = SubResource( 1 )
|
||||
|
||||
[node name="Left_Hand" parent="." instance=ExtResource( 2 )]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.5, 1.25, 0 )
|
||||
|
@ -52,4 +44,3 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.5, 1.25, 0 )
|
|||
[node name="Right_Hand" parent="." instance=ExtResource( 2 )]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.5, 1.25, 0 )
|
||||
controller_id = 2
|
||||
|
68
src/addons/godot-openvr/scenes/ovr_main.gd
Normal file
68
src/addons/godot-openvr/scenes/ovr_main.gd
Normal file
|
@ -0,0 +1,68 @@
|
|||
extends ARVROrigin
|
||||
|
||||
# Add this script to your ARVROrigin node and it will initialise OpenVR for you automatically.
|
||||
|
||||
# Our plugin will now use the first actions.json found in the following locations
|
||||
# 1) in the actions folder alongside the executable
|
||||
# 2) in the actions folder within your project folder (i.e. "res://actions/actions.json")
|
||||
# 3) in the actions folder within the plugin (i.e. "res://addons/godot-openvr/actions/actions.json")
|
||||
# OpenVR can't read actions files within the exported datapack.
|
||||
|
||||
# The plugin always registers atleast one action set.
|
||||
# If you have renamed this action set you can specify the name here
|
||||
export (String) var default_action_set = "/actions/godot"
|
||||
|
||||
# If we render to a custom viewport give our node path here.
|
||||
export (NodePath) var viewport = null
|
||||
|
||||
# Convenience setting for setting physics update rate to a multiple of our HMDs frame rate (set to 0 to ignore)
|
||||
export var physics_factor = 2
|
||||
|
||||
var arvr_interface : ARVRInterface = null
|
||||
var openvr_config = null
|
||||
|
||||
func get_openvr_config():
|
||||
return openvr_config
|
||||
|
||||
func _ready():
|
||||
# Load our config before we initialise
|
||||
openvr_config = preload("res://addons/godot-openvr/OpenVRConfig.gdns");
|
||||
if openvr_config:
|
||||
print("Setup configuration")
|
||||
openvr_config = openvr_config.new()
|
||||
|
||||
openvr_config.default_action_set = default_action_set
|
||||
|
||||
# Find the interface and initialise
|
||||
arvr_interface = ARVRServer.find_interface("OpenVR")
|
||||
if arvr_interface and arvr_interface.initialize():
|
||||
# We can't query our HMDs refresh rate just yet so we hardcode this to 90
|
||||
var refresh_rate = 90
|
||||
|
||||
# check our viewport
|
||||
var vp : Viewport = null
|
||||
if viewport:
|
||||
vp = get_node(viewport)
|
||||
if vp:
|
||||
# We copy this, while the ARVRServer will resize the size of the viewport automatically
|
||||
# it can't feed it back into the node.
|
||||
vp.size = arvr_interface.get_render_targetsize()
|
||||
|
||||
|
||||
# No viewport? get our main viewport
|
||||
if !vp:
|
||||
vp = get_viewport()
|
||||
|
||||
# switch to ARVR mode
|
||||
vp.arvr = true
|
||||
|
||||
# keep linear color space, not needed and thus ignored with the GLES2 renderer
|
||||
vp.keep_3d_linear = true
|
||||
|
||||
# make sure vsync is disabled or we'll be limited to 60fps
|
||||
OS.vsync_enabled = false
|
||||
|
||||
if physics_factor > 0:
|
||||
# Set our physics to a multiple of our refresh rate to get in sync with our rendering
|
||||
Engine.iterations_per_second = refresh_rate * physics_factor
|
||||
|
53
src/addons/godot-openvr/scenes/ovr_render_model.gd
Normal file
53
src/addons/godot-openvr/scenes/ovr_render_model.gd
Normal file
|
@ -0,0 +1,53 @@
|
|||
extends MeshInstance
|
||||
|
||||
var ovr_render_model
|
||||
var ws = 0
|
||||
var controller_is_loaded = false
|
||||
|
||||
func apply_world_scale():
|
||||
var new_ws = ARVRServer.world_scale
|
||||
if (ws != new_ws):
|
||||
ws = new_ws
|
||||
scale = Vector3(ws, ws, ws)
|
||||
|
||||
func _load_controller_mesh(controller_name):
|
||||
if ovr_render_model.load_model(controller_name.substr(0, controller_name.length()-2)):
|
||||
return ovr_render_model
|
||||
|
||||
if ovr_render_model.load_model("generic_controller"):
|
||||
return ovr_render_model
|
||||
|
||||
return Mesh.new()
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
# instance our render model object
|
||||
ovr_render_model = preload("res://addons/godot-openvr/OpenVRRenderModel.gdns").new()
|
||||
|
||||
# we haven't loaded it
|
||||
controller_is_loaded = false
|
||||
|
||||
func _process(delta):
|
||||
var controller = get_parent();
|
||||
if !controller is ARVRController:
|
||||
return
|
||||
|
||||
if !controller.get_is_active():
|
||||
if controller_is_loaded:
|
||||
mesh = Mesh.new()
|
||||
controller_is_loaded = false
|
||||
return
|
||||
|
||||
# always set our world scale, user may end up changing this
|
||||
apply_world_scale()
|
||||
|
||||
if controller_is_loaded:
|
||||
return
|
||||
|
||||
# became active? lets handle it...
|
||||
var controller_name = controller.get_controller_name()
|
||||
print("Controller " + controller_name + " became active")
|
||||
|
||||
# attempt to load a mesh for this
|
||||
mesh = _load_controller_mesh(controller_name)
|
||||
controller_is_loaded = true
|
6
src/addons/godot-openvr/scenes/ovr_render_model.tscn
Normal file
6
src/addons/godot-openvr/scenes/ovr_render_model.tscn
Normal file
|
@ -0,0 +1,6 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/godot-openvr/scenes/ovr_render_model.gd" type="Script" id=1]
|
||||
|
||||
[node name="OVRRenderModel" type="MeshInstance"]
|
||||
script = ExtResource( 1 )
|
10
src/addons/godot-openvr/scenes/ovr_shader_cache.gd
Normal file
10
src/addons/godot-openvr/scenes/ovr_shader_cache.gd
Normal file
|
@ -0,0 +1,10 @@
|
|||
extends Spatial
|
||||
|
||||
var countdown = 2
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
countdown = countdown - 1
|
||||
if countdown == 0:
|
||||
visible = false
|
||||
set_process(false)
|
16
src/addons/godot-openvr/scenes/ovr_shader_cache.tscn
Normal file
16
src/addons/godot-openvr/scenes/ovr_shader_cache.tscn
Normal file
|
@ -0,0 +1,16 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://addons/godot-openvr/scenes/ovr_shader_cache.gd" type="Script" id=1]
|
||||
|
||||
[sub_resource type="PlaneMesh" id=1]
|
||||
size = Vector2( 0.001, 0.001 )
|
||||
|
||||
[sub_resource type="SpatialMaterial" id=2]
|
||||
|
||||
[node name="ovr_shader_cache" type="Spatial"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="Controller" type="MeshInstance" parent="."]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -2 )
|
||||
mesh = SubResource( 1 )
|
||||
material/0 = SubResource( 2 )
|
68
src/addons/openvr_overlay/OverlayInstance.tscn
Normal file
68
src/addons/openvr_overlay/OverlayInstance.tscn
Normal file
|
@ -0,0 +1,68 @@
|
|||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://addons/openvr_overlay/overlay_instance.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/openvr_overlay/OverlayInteraction.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://addons/godot-openvr/OpenVROverlay.gdns" type="Script" id=3]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=1]
|
||||
bg_color = Color( 0, 1, 1, 0.231373 )
|
||||
border_width_left = 24
|
||||
border_width_top = 24
|
||||
border_width_right = 24
|
||||
border_width_bottom = 24
|
||||
border_color = Color( 0, 0.784314, 1, 0.611765 )
|
||||
|
||||
[sub_resource type="ViewportTexture" id=2]
|
||||
flags = 4
|
||||
viewport_path = NodePath("OverlayViewport")
|
||||
|
||||
[node name="OverlayInstance" type="Spatial"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="OverlayViewport" type="Viewport" parent="."]
|
||||
size = Vector2( 2048, 2048 )
|
||||
transparent_bg = true
|
||||
hdr = false
|
||||
disable_3d = true
|
||||
usage = 0
|
||||
render_target_update_mode = 3
|
||||
shadow_atlas_quad_0 = 0
|
||||
shadow_atlas_quad_1 = 0
|
||||
shadow_atlas_quad_2 = 0
|
||||
shadow_atlas_quad_3 = 0
|
||||
|
||||
[node name="Container" type="Control" parent="OverlayViewport"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
[node name="Selected" type="Panel" parent="OverlayViewport"]
|
||||
visible = false
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
mouse_filter = 2
|
||||
custom_styles/panel = SubResource( 1 )
|
||||
|
||||
[node name="VROverlayViewport" type="Viewport" parent="."]
|
||||
size = Vector2( 100, 100 )
|
||||
transparent_bg = true
|
||||
handle_input_locally = false
|
||||
hdr = false
|
||||
disable_3d = true
|
||||
usage = 0
|
||||
render_target_update_mode = 3
|
||||
shadow_atlas_quad_0 = 0
|
||||
shadow_atlas_quad_1 = 0
|
||||
shadow_atlas_quad_2 = 0
|
||||
shadow_atlas_quad_3 = 0
|
||||
script = ExtResource( 3 )
|
||||
overlay_width_in_meters = 0.4
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="VROverlayViewport"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
texture = SubResource( 2 )
|
||||
expand = true
|
||||
stretch_mode = 5
|
||||
flip_v = true
|
||||
|
||||
[node name="OverlayInteraction" parent="." instance=ExtResource( 2 )]
|
24
src/addons/openvr_overlay/OverlayInteraction.tscn
Normal file
24
src/addons/openvr_overlay/OverlayInteraction.tscn
Normal file
|
@ -0,0 +1,24 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://addons/openvr_overlay/interaction/overlay_interaction.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/openvr_overlay/interaction/OverlayArea.tscn" type="PackedScene" id=2]
|
||||
|
||||
[node name="OverlayInteraction" type="Node"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="VR" type="ARVROrigin" parent="."]
|
||||
|
||||
[node name="left" type="ARVRController" parent="VR"]
|
||||
|
||||
[node name="right" type="ARVRController" parent="VR"]
|
||||
controller_id = 2
|
||||
|
||||
[node name="head" type="ARVRCamera" parent="VR"]
|
||||
visible = false
|
||||
|
||||
[node name="OverlayArea" parent="." instance=ExtResource( 2 )]
|
||||
|
||||
[connection signal="button_pressed" from="VR/left" to="." method="_on_LeftHand_button_pressed"]
|
||||
[connection signal="button_release" from="VR/left" to="." method="_on_LeftHand_button_release"]
|
||||
[connection signal="button_pressed" from="VR/right" to="." method="_on_RightHand_button_pressed"]
|
||||
[connection signal="button_release" from="VR/right" to="." method="_on_RightHand_button_release"]
|
25
src/addons/openvr_overlay/OverlayInteractionRoot.tscn
Normal file
25
src/addons/openvr_overlay/OverlayInteractionRoot.tscn
Normal file
|
@ -0,0 +1,25 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/openvr_overlay/interaction/HandCollider.tscn" type="PackedScene" id=1]
|
||||
|
||||
[node name="OverlayInteractionRoot" type="Node"]
|
||||
|
||||
[node name="VR" type="ARVROrigin" parent="."]
|
||||
|
||||
[node name="left" type="ARVRController" parent="VR"]
|
||||
|
||||
[node name="HandCollider" parent="VR/left" groups=[
|
||||
"left",
|
||||
] instance=ExtResource( 1 )]
|
||||
collision_layer = 20
|
||||
|
||||
[node name="right" type="ARVRController" parent="VR"]
|
||||
controller_id = 2
|
||||
|
||||
[node name="HandCollider" parent="VR/right" groups=[
|
||||
"right",
|
||||
] instance=ExtResource( 1 )]
|
||||
collision_layer = 10
|
||||
|
||||
[node name="head" type="ARVRCamera" parent="VR"]
|
||||
visible = false
|
23
src/addons/openvr_overlay/interaction/Cursor.tscn
Normal file
23
src/addons/openvr_overlay/interaction/Cursor.tscn
Normal file
|
@ -0,0 +1,23 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/openvr_overlay/interaction/cursor.png" type="Texture" id=1]
|
||||
|
||||
[node name="Cursor" type="Control"]
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 600.0
|
||||
mouse_filter = 2
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
margin_left = -70.0
|
||||
margin_top = -70.0
|
||||
margin_right = 70.0
|
||||
margin_bottom = 70.0
|
||||
mouse_filter = 2
|
||||
texture = ExtResource( 1 )
|
||||
expand = true
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
13
src/addons/openvr_overlay/interaction/HandCollider.tscn
Normal file
13
src/addons/openvr_overlay/interaction/HandCollider.tscn
Normal file
|
@ -0,0 +1,13 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[sub_resource type="SphereShape" id=1]
|
||||
margin = 0.001
|
||||
radius = 0.01
|
||||
|
||||
[node name="HandCollider" type="Area"]
|
||||
monitoring = false
|
||||
collision_layer = 30
|
||||
collision_mask = 0
|
||||
|
||||
[node name="Collision" type="CollisionShape" parent="."]
|
||||
shape = SubResource( 1 )
|
27
src/addons/openvr_overlay/interaction/OverlayArea.tscn
Normal file
27
src/addons/openvr_overlay/interaction/OverlayArea.tscn
Normal file
|
@ -0,0 +1,27 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[sub_resource type="BoxShape" id=1]
|
||||
resource_local_to_scene = true
|
||||
extents = Vector3( 0.2, 0.2, 0.1 )
|
||||
|
||||
[sub_resource type="BoxShape" id=2]
|
||||
resource_local_to_scene = true
|
||||
extents = Vector3( 0.2, 0.2, 0.01 )
|
||||
|
||||
[node name="OverlayArea" type="Spatial"]
|
||||
|
||||
[node name="AreaNear" type="Area" parent="."]
|
||||
monitorable = false
|
||||
collision_layer = 0
|
||||
collision_mask = 6
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape" parent="AreaNear"]
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="AreaTouch" type="Area" parent="."]
|
||||
monitorable = false
|
||||
collision_layer = 0
|
||||
collision_mask = 24
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape" parent="AreaTouch"]
|
||||
shape = SubResource( 2 )
|
BIN
src/addons/openvr_overlay/interaction/cursor.png
Normal file
BIN
src/addons/openvr_overlay/interaction/cursor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 90 B |
|
@ -2,15 +2,15 @@
|
|||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/zx_widget.png-b7f8f97d1c970429dd17d72af3b467a5.stex"
|
||||
path="res://.import/cursor.png-7f24cea8864d49e2d004ac92503853e7.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://overlays/xyz_widget/zx_widget.png"
|
||||
dest_files=[ "res://.import/zx_widget.png-b7f8f97d1c970429dd17d72af3b467a5.stex" ]
|
||||
source_file="res://addons/openvr_overlay/interaction/cursor.png"
|
||||
dest_files=[ "res://.import/cursor.png-7f24cea8864d49e2d004ac92503853e7.stex" ]
|
||||
|
||||
[params]
|
||||
|
6
src/addons/openvr_overlay/interaction/mod/Clickable.tscn
Normal file
6
src/addons/openvr_overlay/interaction/mod/Clickable.tscn
Normal file
|
@ -0,0 +1,6 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/openvr_overlay/interaction/mod/clickable.gd" type="Script" id=1]
|
||||
|
||||
[node name="Clickable" type="Node"]
|
||||
script = ExtResource( 1 )
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue