How do I work with the controller's 'Motion Sensor'?
OK: here's the concept, simple enough:
map the DualShock's rotation in the real world to an object in a Dream scene.
So however you pitch, roll and yaw your controller, the thing in the scene follows suit, probably somewhat dampened and with an option to limit the degree of rotation.
A neat piece of logic with a hundred fun uses.
So after failing for a while, I investigate.
I take the output from the Motion Sensor gizmo (page two of the Controller Sensor's settings), wire it to a splitter and thence to number outputs.
Apart from the signal type, there are three outputs, which I assume will relate to X, Y and Z axis rotation.
Sure enough:
'A' maps to pitch
'B' maps to yaw
'C' maps to roll.
But the actual values are pretty unusable - they seen to be a combination of speed AND angle.
For example, if I place the DS4 on a flat surface, zero it by holding Options, and then rotate it clockwise very gently, the signal goes from 0 to roughly -0.35 as I go from North to North East. Then, to my curiosity, the signal stays around -0.35 if I continue a gentle turning. Doesn't matter for how long, how many revolutions, it sticks at -0.35.
OK, I could work with that except that the INSTANT you reverse direction, the signal returns to zero over a yaw angle of 40 degrees or so.
I can't even describe what happens for the pitch angle, except to say that the controller knows when it's almost upside down and does change its signal at that point, and that the maximum is 0.27 instead of 0.35.
Roll is the only one signal that appears to be usable, going from 0 to 3.00 when upside down then back from -3.00 to 0 and doing so in relation to the real world, not just its own recent history.
To make pitch and yaw particularly useless, their outputs include some sort of rotation speed factor, so the faster you spin them, the stronger the output.
I give up. Is this just the way things are, a hardware limitation, a bug, am I missing a better solution?
If you've got this far, kudos. 👍
-
I’m not at my PS4 right now so can’t check this out in much detail but for a slightly cheeky, but very simple solution, use the tilt controls on the default puppet.
Set it’s movement speed, rotation speed and jump height to 0, probably hide all the bits you don’t want to see and then attach any object to the puppets torso. You can limit the angle of the tilt in the puppets tweak settings.
Sorry this isn’t the neatest answer, but it’ll at least unblock you for now. :) - Peter -
I did a testrun with my ds4 and the logic of my dream 'Motion sensor - Movement test' and i can say that i get signals from -3.00 to 3.00 for all rotations (pitch, yaw, roll) in a neutral controller position.
But to get these values (-3 to +3) for one rotation, the other two values have to be at around 0.00
If you try to turn in more than one way OR you try to turn the controller while not in a neutral position, the values you get aren't consistent anymore.
Those are my experiences though, so my results might not be correct. -
More curious and more more curious.
I'll have a look at the puppet trick, thanks Peter. A proper bodge job by the sounds of it, but if it works... :D
As for your tests Weezerz I'll have a look at your scene and try to reproduce your conditions. I tried two (old original) DS4s and got the same results. I'm using a phat old PS4 standard. Did you not get signal spikes when you moved the controller faster? I'll also see if the new DS4 makes a difference.
For the purpose of pondering, I note when I zero the DS4 with the options button, it resets pitch and yaw to zero but not roll. Presumably because it's treating roll as an absolute value throughout.
Rotation is weird. Not like translation. For instance if you roll 90 degrees, then pitch 90 degrees, then roll back 90 degrees, it's the equivalent of yawing 90 degrees. That might be why mixed non-zero signals limit each others' maxima. And might be somewhere underlying my problem. -
OK, Weezerz, your little demo works like a dream (no pun intended). What can be the difference?
For one thing I was using remote control rather than a possessed sculpt. I shall investigate further and keep updating this thread...
Anyone else, see the level https://indreams.me/scene/ZCGPIHBdODs for a neat demo. -
Hunh. I just changed my existing problem logic from remote control to imp possession and suddenly it was well behaved again.
OK, so there's something I don't understand about the remote control option - I assumed it was just reading the same values from the DS4.
Thanks for help, folks. I don't know why my problem is resolved but it is. ? -
Can confirm, had the same issue yesterday. Using the motion sensor data when the gadget is in remote control puts out weird data I can't make sense off and can't really guess at the intended use. I'd like it, if the three values behaved exactly as they do when in possession mode. Thanks for the tip about that, using that setting they put out -3 to 3 for all three axis.
-
Ive try the puppet option and works quite well, but u have to posess it.
https://indreams.me/element/ojHGLsfviwD -
Just to update this, it's not +/- 3.0, it's +/- pi.
For whatever reason, the motion sensor output is given in radians instead of degrees. It's the only rotational output given in radians in dreams.
It would be nice to receive the output in degrees for precision reasons.
댓글을 남기려면 로그인하세요.