ElectricNightOwl / ArmSwinger

ArmSwinger is an artificial VR locomotion library developed on Unity 5.4. ArmSwinger allows you to use your arms to control your position in 3D space in a natural way with minimal disorientation.
http://electricnightowl.com/armswinger/
MIT License
101 stars 30 forks source link

Possible to Make Raycasting/Y Check a Toggle #33

Closed xEvoGx closed 7 years ago

xEvoGx commented 7 years ago

I'm currently have jumping/falling with physics which work fine, but with Arm Swinger added, I have unexpected instantaneous movement to the ground, and I'm uncomfortable gutting the code for fear of breaking what works beautifully in Arm Swinger.

Big Picture: The ideal setup would be to allow us to only keep what we need/want so we can hopefully use AS in conjunction with other scripts. In my case, I only need the swing-movement of course, and the wall clipping prevention methods, while I can work around slopes and terrain height adjustments easily, so I don't need climb/fall prevention or any checking/adjustments along Y.

Am I explaining this correctly? Hehe :smile:

Thank you!

xEvoGx commented 7 years ago

Just to add I do see the benefit of the Raycast and adjustments along Y for uneven, undulating terrain, so at the very least I'd like the option to toggle the checks on/off, perhaps through my scripts when the player is climbing/jumping/falling around the environment, and without the instant teleportation downward.

kjack9 commented 7 years ago

Hi Steven,

There is a public pause variable that will get you close to what you want.

https://github.com/ElectricNightOwl/ArmSwinger/blob/master/README.md#pause-variables

If you set playAreaHeightAdjustmentPaused to true, it will temporarily stop adjusting the play area height when you're not arm swinging. It sounds like you'll want it to pause even when arm swinging, so it won't get you all the way there.

I will work on a solution for you if you'll do me a favor, please? Can you create an Issue against the ArmSwinger repo so that I can track the changes based on your request?

Glad you're enjoying ArmSwinger, let me know if I can help with anything else.

Keller (KJack) Head Nerd Electric Night Owl

xEvoGx commented 7 years ago

I hate to admit this but I'm slowly learning the nuances of Github...

...and while I did a quick search, I'm not entirely sure where or how I'm specifically creating an issue against a particular repo. I've only ever created issues on the master repo page. :disappointed:

Otherwise I very much am enjoying it! I'm currently using the version I purchased off the Asset Store, for whatever that's worth, and assumed you were updating that concurrent with the branch here?

Thanks kjack!

kjack9 commented 7 years ago

First of all, thank you for purchasing ArmSwinger and helping support development! I very much appreciate it.

I figured you were using the GitHub version since you mailed me through GitHub. And to showcase how little I know about GitHub, I didn't realize I was getting these emails from you via an issue you already made - my mistake. Issue #33 works great.

As to your question, the GitHub version is very slightly ahead of the Asset Store one, only because Unity takes several days to approve each version. The fix I'm about to commit to GitHub I will also submit to the Asset Store, but it's on them to approve it. If you want, you can simply download the latest .zip file from GitHub and unzip it into your ArmSwinger folder.

The fix is pretty straightforward - you'll basically want to set anglePreventionsPaused and playAreaHeightAdjustmentPaused to true while you're handling the jumping movement. That will disable all the falling / climbing / wall walking prevention methods, will leave wall clip prevention enabled, and will keep the play area from adjusting at all. Once the jump is over, turn both back to false and ArmSwinger should start behaving normally. If that's not what happens, definitely let me know!

Thanks again for your support, let me know if I can help with anything else.

Keller (KJack) Head Nerd Electric Night Owl

xEvoGx commented 7 years ago

My pleasure absolutely. I want to pay for assets of this quality so you're encouraged to continue supporting it, and can afford to create new stuff! Speaking of which... #35