Comments (4)
I have done exactly that. Works really wel.
I'll post details when i get home.
El 19 nov. 2016 7:00 p. m., "mungewell" [email protected] escribió:
While in Cinematic mode, finding the key/using the mouse to re-center the
screen is a pain.Can the toolbox sense a double tap on the accelerometers to recenter the
screen?
Simon—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#38, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABhEzpOz-9BnB_WE9ISCQqvjCinpop-Zks5q_zlWgaJpZM4K3UeH
.
from psvrframework.
@dproldan Nice!, any help is welcome.
@mungewell Was thinking about it these days, not only to detect a tap but "clicks", with the correct algorithms, from the sensor readings in theory these can be detected, I've used in the past acceleromters with this functionality integrated and they detect it based on the force curve, so this must be achievable in code. We can use these clicks to different functions, I was thinking on the mouse emulator, single-click left mouse button, double-click right mouse button.
We can start with a simple tamp detect based on the @dproldan code (or maybe the code already detects clicks, that would be wonderful) and with time advance to a more complex click detection.
from psvrframework.
This is what I've been using to recenter the mouse, I'm not a sw developer, so this is probably too crude, but maybe you can use it as a proof of concept.
// Used both axis so the knock has to be on the chamfered edge of the headset.
device.on("data", function(data) {
acc.yaw = -data.yaw * 0.00080;
acc.pitch = -data.pitch * 0.00080;
knock= data.yAccel1+data.xAccel1;
doThings();
});
var doThings = function() {
mouse.Place(ptX, ptY);
ptX = 720+acc.yaw;
ptY = 450+acc.pitch;
if (ptX>1960) {ptX=1960};
if (ptY>1080) { ptY=1080};
if (knock>=30000) {device.resetYaw();device.resetPitch()}
};
resetYaw() {
this._yaw = 0;
}
resetPitch() {
this._pitch = 0;
}
from psvrframework.
I've tested the code and was too unreliable, some taps were detected when moving the head fast in diagonal.
So, I rolled my own tap detector and seems to work quite well.
It detects a double tap in any direction as I'm using the force vector magnitude, it must be a fast double tap, I use two fingers to do it and nearly 100% of the taps are correctly detected, and unless you remove the hmd it does not detect false taps.
Some important thig is when the toolbox boots if the hmd is powered on it must be stable, else if it's powered on after the toolbox it must remain in that time stable, in that interval the gravity magnitude is computed. If the tests are good I will do as the PS4 does, wait until the helmet is worn and stabilizes to measure the gravity to avoid false calibrations.
Test and share results.
from psvrframework.
Related Issues (20)
- Singleton Implementation HOT 2
- Flickering when using Framework HOT 2
- Gimbal Lock with Euler Angels
- Maybe usefull info about psvr
- Port to OS X
- Notification should appear on first run.
- Issue with display in VR mode HOT 1
- Status of PSVR on PC ? HOT 1
- It seems like it doesn't support the ps vr framework 2.5 since ps4 v4.5 HOT 1
- Enable mouse tracking with the movement of the PS VR HOT 1
- sound problem on vr mode HOT 1
- PSVR 65,70 and 75Hz mode? Video routing and EDIDs
- Requires Run As Administrator to save settings?
- Feature? A perma-Shutdown option would go a long way on Windows
- Brightness actually works independent of Cinema Mode
- Release binaries report impossible values for SIXAXIS on Windows?
- DELETED HOT 1
- is not recognized as an internal or external command, operable program or batch file.
- Installation Help HOT 2
- Drift is not properly set
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from psvrframework.