How Do I map DS4 or PSMove Tilt Orientation 1:1 Not Tilt Direction/Speed?
Is there a way to get the tilt orientation of the DS4 and map it to an object 1:1. All I can get is the tilt direction and speed which even with dampening on all axis maxed out leads to the controlled object overspinning and I need to constantly counter it with an opposite tilt. Which makes for extremely difficult controls. I'm guessing we don't yet have access to the PS Moves yet either. This would work best with them but would be doable with the DS4 wireless.
-
Would an angle sensor help prevent overspinning, you could stop the tilt once the object reaches a certain angle.
You my also be able to remap the tilt output with a signal remapper to reduce the strength of the signal. Combined with the angle sensor it may give you more control. -
I looked at signal manipulator and didn't see a way it could help me. Though it is perhaps a bit over my head. I want to be able to tilt the object 360 degrees on X and Z so I can flip it all the way around. But to use an angle sensor to limit how far out of tilt orientation it goes from the actual controller would still require I have the controllers tilt orientation over the tilt direction/speed that I am currently getting.
-
If you're looking for a set 360 degrees maybe keyframes are the way to go. If you use multiple keyframes on a timeline with a default position frame at 5 seconds, rotated left 360 frame at zero seconds and rotated right 360 frame at 10 seconds. Blend the keyframes together. Set the timeline playhead at 5 seconds (default position).
Now wire a timer set to speed into the timeline and run the timer with the tilt control. Tilt left and the timer counts down and moves the timeline backwards towards the rotate left keyframe, slowly blended in. The object rotates in a controlled fashion and stops at 360 dergee rotation. Tilt right for the opposite effect. The length of time the timer is set to adjusts the sensitivity or speed of rotation. -
Trying the timeline idea. I tried a whole bunch of other stuff first and just couldn't get the behavior I need. I'm trying to make Kororinpa: Marble Mania style game. You rotate the world using the angle of the controller. It requires the world to respond to the controllers position with no noticeable delay. Or the gameplay will suffer greatly. I camera stays at a fixed distance and orientation from the marble as it follows it and controls are from the camera point of view. I can't tell while playing the game however if the world on an axis that it rotates around or if the axis is the marble. If it were from the point of the marble as it travels then I would imagine some trickery would be needed to keep it from walking out of its original position. For no matter how much tilting you do in the game from whatever position in the scene the level does seem to remain in place. But as you are playing it does feel like the tilting is centered around the marble. This could be due to the perspective. But I am also unable to even pull the world away from the marble fast enough to be able to bounce it without the aid of ledge or ramp. Im my version it is super easy to do that and I don't want it. My version of the game will be different and unique but I have to get the core idea down first.
-
I think I'm getting pretty close to figuring out my Kororinpa: Marble Mania like world tilt logic. I split the DS4 tilt controls again into positive and negative. I'm running each into their own signal manipulator and then into its own time line. One path is for tilting in the positive degrees of the axis which is counter clockwise and the other for tilting in the negative degrees of the axis. The timelines each have the associated frames. Both timelines can't have power at the same time so I still need to figure out how I want that to work. Each frame is set to permanent while it has power. Each is blended linearly. No way to blend frames from to separate time lines but hopefully I won't need to. So far aside from glitches where there is overlap because I still need to work that logic out it does track the DS4 tilt 1:1 with just a little bit of lag. Nothing horrendous. Oh yeah from @NeonTheCoder cars 2 video I was given enough of a hint on the signal manipulator to figure it out a bit with tons of trial and error. The tilt sensor tracks -3.15 to +3.15. That was the highest or lowest range I could map and it takes a steady hand and patience to eek out those last couple of points. It sucked because Neon was about to go more in depth on the signal manipulator when he decided it was too advanced and to save it for another time lol. At least I got enough to brute force enough of an understanding to get something useful out of it. I don't think what I am doing would be possible without it.
-
I want to thank NeonTheCoder on YouTube and Discord as well as CLOUD1985 for sharing their knowledge. https://www.youtube.com/watch?v=Gq2BJZ3rJek&t=3s
-
Great stuff, Neon has some fantastic vids all worth a watch. Please send me your level when it's published so I can try it out.
Please sign in to leave a comment.