VR Expansion Plugin

There is a function that calculates the relative velocities and runs them through a low pass filter, look for it in the locomotion section, I can’t remember the name right now and am away from my pc.

Ill have to try tomorrow. I thought i had it and my oculus crashed. Rebooted and the drive was gone.

I just lost a 2nd hardrive.im 2 down of 5 and i dont trust my internal backup drive. And im afraid to boot my pc until i get an external drive to back everything up. Then i can see if im just unlucky. Or something is causing my drives to malfunction.

I fortunately have all the content i saved from the last drive death. And theres less import things on drive. But ue4 was installed there…and my projects that i spent 2 hours getting everything reimpoted and stuff.

im having a very bad week.

ok i got lucky and i pulled the drive and ue4 wasnt on the drive like i thought. and i rewired the controlls from a fresh start, and i think i found the problem. if i flail my hands and click the run button rapidly, it bumps me a bit forward and stops. im useing a regular button input that i added. is it looking for a repeating input every tick to run the code correctly.

boom. i think i figured it out. i should have been using an axis mapping instead of a button press. i didnt know the difference untill now.
ive isolated the code out by its self. but for some reason it still only works when the movement mode is set. but i think i know how to fix that.

note: ill clean that up when i get it all working. thank you so far for the help.

edit: i got it. there was a movement mode check inside of CalculateRelativeVelocities. once i deleted it. it works all the time now. many thanks. now i can focus on a concept build, and get things moving again. ill shoot you a peak at it once its in a show able state. plug in and all of its exsample codes are fantastic. albeit interwoven pretty tightly. alot for a new guy to wrap his head around.

edit: i see now what i had mistaken. i didnt understand “get relative velocitys for locomotion” because i never could find “CalculateRelativeVelocities” after that. all of it make perfect sence. and i can learn from it and figure out how to make use of it. thank you again for pointing me in the right direction.

I downloaded latest pre-compiled version and it has fixed the issue. Thanks for quick fix and awesome plugin.

Thanks,

Pushed some commits to the plugin, been a little slow due to constant sickness flu season :rolleyes:


 
 Fixed up inlines in the Motion Controller (PS4 support fixes). May  
 slightly decrease speed of the grip updates, but it is literally only two  
 non virtual function calls worth of difference so it is negligible.  
     
 Added bIsPaused to the grip structure and a SetGripPaused node to the motion controller.  
 Is not replicated by default (on purpose) as I felt that it is generally more useful  
 when additional data is passed through with it (snap location, ect.).     
 Added SetPausedTransform node to set the location of a paused grip (including a physics constraint if it is left on).   
 Expanded on SetGripPaused with additional options.  

Hi!
First of all, thanks for your hard work!
I have problem with simple physics enabled world objects. Is expected behavior for player - actor collisions?
You can see here just a simple streched cube with physics enabled and few constraints.
I would like to achieve similar result to default FPS character, is it possible?

[quote=“GregFTW, post:2213, topic:68709”]

Hi!
First of all, thanks for your hard work!
I have problem with simple physics enabled world objects. Is expected behavior for player - actor collisions?
You can see here just a simple streched cube with physics enabled and few constraints.
I would like to achieve similar result to default FPS character, is it possible?Physics - YouTube

By default I have the characters ignoring simulating objects in floor checks as it can toss player characters around wildly. Its a safety check and at point is kind of less useful than when initially added.

Its a boolean option in the character movement component though, if you turn it off you should get default behavior.


    // If true will never count a physicsbody channel component as the floor, to prevent jitter / physics problems.
    // Make sure that you set simulating objects to the physics body channel if you want  to work correctly
    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VRMovement")
        bool** bIgnoreSimulatingComponentsInFloorCheck;**

, do you have any thoughts about what to do if a physics heavy, VR experience needs to take place on a moving platform? I’m still trying to figure some options out, but it didn’t really dawn on me what that might actually mean till I got deeper into my project. Of course something like a high-speed train sequence or a space ship could probably fake it by looping its background around the play area, but I’m trying to do more of a cable car sequence with a fairly expansive view.
I swear I’ve seen some VR train games like Derail Valley that had a physics sim on a vehicle that moved through the world. I’m just trying to figure out if I’m asking too much for a current gen system and I need to think about my experience differently.

Thanks for any insight you might have.

I dont think its to much for a current gen system. But in my opinion. it probably comes down to coding skill. It sounds really technical. But his template already has code for moving objects and you moving with them.

Well constraints are always going to be effected by momentum, so…say your train car were to turn left fairly fast, all constraint based grips or hanging lights (ect) would bounce as they would have a sudden change of force from forward to left/forward. is actually fairly correct though? You would want constraints in relative space to the parent object and they wouldn’t have a problem keeping up.

If you are talking about simulation objects being left behind…well you would likely have to impart the velocity on to them in order to keep their momentum correct, gets more complicated with sweeping turns and the like, fairly simple I would imagine on straight track, just AddImpulse for the velocity, however I can’t see being a quick method (cpu cost would inflate with number of simulating objects), so you would want to batch updates into a volume that gathers simulating objects inside of it and imparts the momentum to them at once, or you would want to force sleep objects that are an effective rest and attach them in place.

The character itself should be fine as it is based movement, grips for the character would need to be placed to tick after the base moves though so that they have the correct location, (IE: Base moves->character moves->grip moves), the default is already Character->Grip so you would have to add a tick req to the character for the base.

Outside of that there are a few options that are more complex:

  1. Localized physics volumes (not default engine supported), possible but a lot of work.
  2. Create a new physics scene separate from the main one and place objects in that, (not engine supported) fairly simple to achieve afaik, they already have an additional async scene for destructibles and objects that don’t need to interact in gameplay, but would require engine source edits.
  3. Fake it

There may be more options, I haven’t tried to do something like , its just off the top of my head.

Added new game to the use case list

Frol Blok

Hi,

Just wanted to say that plugin is amazing. The out of body navigation is something we’ve wanted to use. The implementation of multiplayer is also a plus.

I was wondering however how the gestures are supposed to be detected on your example project? I’ve tried tracing the shape of the image but nothing seems to happen.

It activates with the wand and holding trigger, but that is just the demo setup, can just attach the gesture tracking component to anything (like the motion controller).

You’ll have to keep in mind that unless I specifically enabled mirror mode on a gesture, I am left handed so the starting direction of things is typically reversed from normal. Also the starting location matters, drawing the circle from bottom won’t match the circle drawn from top, it isn’t a glyph recognizer, it is a path recognizer.

Also I left all settings default for those example ones, tolerances can be adjusted to make gestures easier or harder to detect.

Hello.
First of all, great plugin!
But I am having trouble on the gripping object interacting with physics simulating object.
In your example project, I have created a Tennis racquet blueprint. It is under the class of grippable static mesh.
I have also created a tennis ball blueprint as a normal actor.
After gripping the tennis racquet. I am able to hit the tennis ball with physics interaction (meaning the collision channels are set correctly) but when I move my motion controller very fast (like doing a strike) the physics interaction between the racquet and the ball fails to register and the racquet just pass through the ball without doing anything.
When I move the racquet slow it is able to hit the ball again. I am guess it is the movement being not registered because the racquet was moving so fast.
Is there any way to solve problem? Thank you very much in advance!

You need to turn on continuous collision detection in the project settings / physics (if it is set to disabled).

Its not a plugin (problem?), its how physx works by default in the engine, CCD is more expensive and without it enabled you will get physics tunneling at high velocities. You can also enable substepping which will step physics movements in discrete intervals and should help with it as well.

If all that fails, then you can manually handle collision, there are a lot of complaints about CCD even after the Kinematic body allowance in 4.14.

Edit It also kind of depends on the grip that you are using, I would assume that one of the interactive physics grips would work better here, though it would be harder to remain 1:1 with the motion controller. Also late updates will show visually an offset from where the racquet actually is in the game thread, so you may want to turn off late updates on the racquet.

Hi!
I have disabled “Ignore Simulating Components in Floor Check” so my character can walk on simulated objects.
When angle between player and simulated component im walking on is higher than VRMovementReference / Walkable floor angle (25 in test) simulated component behaves like it was weightless. When angle breaks i was expecting character to slide off of simulated body pushing that body like before.
Any collision between VRRootReference and simulated component other than walking on it, acts like that (pushing constrained and unconstrained simulated components, while walking and clibming).
Is there any way i can change in blueprints?

I just got the 4.19 plugin and example working. Everything works fine with the vive, except, I can’t push any red buttons. I can slide sliders and teleport/navigate, I can pickup and throw things. But I can’t push buttons.

For a test, I set up a trigger box, and moved my controller through it, and nothing triggered.

I did download the latest example demo, and I am able to push all the buttons in the demo just fine (although it crashes on occasion (maybe because of the 4.19 bug?))

Any thoughts?

Mmm, hand sphere overlaps got set to Query only overlaps somehow. I set them back to query and physics collision.

You can download it again, or just change that collision setting on the OverlapSpheres.

Must have happened when I converted to passing in any component for overlap in the template.

[quote=“GregFTW, post:2223, topic:68709”]

Hi!
I have disabled “Ignore Simulating Components in Floor Check” so my character can walk on simulated objects.
When angle between player and simulated component im walking on is higher than VRMovementReference / Walkable floor angle (25 in test) simulated component behaves like it was weightless. When angle breaks i was expecting character to slide off of simulated body pushing that body like before.
Any collision between VRRootReference and simulated component other than walking on it, acts like that (pushing constrained and unconstrained simulated components, while walking and clibming).
Is there any way i can change in blueprints?

Are you really sure you want to be able to be slowed by physics objects? It generates a stutter when walking into them that induces near instant motion sickness even in tolerant players.

I can set up a toggle for you to revert to default behavior…but you will have to be very careful with how you use it.

The current behavior is a normally unattainable “fix” for the slowdown / stutter when walking into them…well, outside of a separate collision component that is.

Edit I did go ahead and add a toggle boolean though: bAllowSimulatingCollision in the root component / VRRootReference controls the behavior.

I’ve been adding more options to things like as the plugin grows to make it more generic. Really early on I made some “best choice” decisions for people that were hard coded in, was one of the, if not THE last one that I hadn’t made optional yet.

having some trouble with the auto step up when climbing. i don’t understand what triggers or how i can change it. the step up is occurring very inconsistently for me.

Resolved: increasing the "player step up height variable solved for me