Announcement

Collapse
No announcement yet.

VR Expansion Plugin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by mordentral View Post
    The client may not have the replicated object yet when you are saying that it has been gripped. Replication isn't guaranteed to be in the order you send them in and the object has to be initialized first. This is expected behavior with non attachment "grips". The client side "GripNotify" function is probably failing due to the object not existing on the client yet.

    Just to be sure, for a game that a client can join at any time and objects are already beign held from other players I should use "attach to" instead of the VrGrip if I want them to be visible as held in that client?

    Comment


      Originally posted by UE4Hobbyist View Post
      Just to be sure, for a game that a client can join at any time and objects are already beign held from other players I should use "attach to" instead of the VrGrip if I want them to be visible as held in that client?
      No, if the object is already replicated my plugin checks the array of held objects when it is updated over the network and if it finds a new grip (like if connecting in) then it sets up the grip.

      Your issue with instantly spawning and calling grip is that the array of gripped items is probably sent before the actual object is sent over so the client can't actually grip anything.

      *Edit* I could technically add a flag and check held items for if they have been processed yet every frame but I think gripping after the replication is better (or spawning the object client side instead for things that don't need to be server side, generally side arms and the like won't need to be).
      Last edited by mordentral; 12-28-2016, 03:19 PM.


      Consider supporting me on patreon

      My Open source tools and plugins
      Advanced Sessions Plugin
      VR Expansion Plugin

      Comment


        Originally posted by mordentral View Post
        No, if the object is already replicated my plugin checks the array of held objects when it is updated over the network and if it finds a new grip (like if connecting in) then it sets up the grip.

        Your issue with instantly spawning and calling grip is that the array of gripped items is probably sent before the actual object is sent over so the client can't actually grip anything.

        *Edit* I could technically add a flag and check held items for if they have been processed yet every frame but I think gripping after the replication is better (or spawning the object client side instead for things that don't need to be server side, generally side arms and the like won't need to be).
        Our client is unable to grab anything. Based on our particle effects not showing as well (particle system and light attached to our VRcharacter) Work's otherwise tho, it tracks the players movement and controllers.

        Originally posted by UE4Hobbyist View Post
        Just to be sure, for a game that a client can join at any time and objects are already beign held from other players I should use "attach to" instead of the VrGrip if I want them to be visible as held in that client?
        Are you able to grab things client side?

        either attached to your client player/spawned in the world

        Comment


          Originally posted by Shanowzer View Post
          Our client is unable to grab anything. Based on our particle effects not showing as well (particle system and light attached to our VRcharacter) Work's otherwise tho, it tracks the players movement and controllers.



          Are you able to grab things client side?

          either attached to your client player/spawned in the world

          Then you aren't grabbing things server side, check the log for errors.


          Consider supporting me on patreon

          My Open source tools and plugins
          Advanced Sessions Plugin
          VR Expansion Plugin

          Comment


            Originally posted by mordentral View Post
            Then you aren't grabbing things server side, check the log for errors.
            Well we've got it gripping server side but not client now. Progress!

            Multicast something right?

            Comment


              However, if I run two instances in editor and join, the client is able to pick things up.

              If I package it and try to use it on another computer (testing on static ip network) it doesn't replicate in clients view

              Comment


                Originally posted by Shanowzer View Post
                Well we've got it gripping server side but not client now. Progress!

                Multicast something right?
                Is the object actually replicated to the client?


                Consider supporting me on patreon

                My Open source tools and plugins
                Advanced Sessions Plugin
                VR Expansion Plugin

                Comment


                  It's attached to our VrCharacter. Would it inherit replication from there?

                  Comment


                    Originally posted by Shanowzer View Post
                    It's attached to our VrCharacter. Would it inherit replication from there?
                    The object has to be marked as always relevant or replicated, does the client even see the object?


                    Consider supporting me on patreon

                    My Open source tools and plugins
                    Advanced Sessions Plugin
                    VR Expansion Plugin

                    Comment


                      Originally posted by mordentral View Post
                      The object has to be marked as always relevant or replicated, does the client even see the object?
                      The object is set to always relevant and replicates.

                      The server is still the only one seeing it gripped

                      Comment


                        Originally posted by Shanowzer View Post
                        The object is set to always relevant and replicates.

                        The server is still the only one seeing it gripped
                        Well not much more I can tell you unless you look in the logs for error messages, because it doesn't have that problem even in the template which is unfinished for multiplayer so you are doing something weird.


                        Consider supporting me on patreon

                        My Open source tools and plugins
                        Advanced Sessions Plugin
                        VR Expansion Plugin

                        Comment


                          Originally posted by mordentral View Post
                          Well not much more I can tell you unless you look in the logs for error messages, because it doesn't have that problem even in the template which is unfinished for multiplayer so you are doing something weird.
                          Closed and re opened project... works

                          Bug?

                          Comment


                            Originally posted by Shanowzer View Post
                            Closed and re opened project... works

                            Bug?
                            Not likely to be with the plugin, that would be a BP problem.


                            Consider supporting me on patreon

                            My Open source tools and plugins
                            Advanced Sessions Plugin
                            VR Expansion Plugin

                            Comment


                              Hey Mordentral!

                              Hope you are enjoying the holidays! I had 2 questions I was hoping to get some advice on!

                              Question 1 - Spawning objects in the player's hand, already gripped
                              Explanation: In your Template the player has a "body" cylinder that the potion can be stored in.
                              I am hoping to have functionality where:
                              -Player puts hand 'inside' the body cylinder
                              -Player presses the grab button
                              -The potion is spawned at the player's hand and the player is now gripping the potion

                              I was wondering the best way to implement this.
                              Should the body cylinder be a standard actor that uses the VRGripInterface, deny gripping, but "onGrip" check to see if it is the player's controller? If so, spawn potion and attach to player's hand?


                              Question 2 - fire event every time player grabs a 'grippable box'.
                              Explanation: In your template there is the Gun with a 'grippable box' that can be moved on one axis.
                              I want to play a sound every time the grippable box is 'gripped'.
                              How would be the best way to do that?

                              Do I have a branch on the "On child grip" event that checks if the child was the gripabble box, if so -> play sound ?

                              As an extension - If there happen to be many components on an actor that can be "Child gripped", should we set up an 'on child grip' with a few branches for each of the child components? Or is there a better way to do this?


                              Thanks for any advice. Love the plugin, it's the best
                              Michael Wentworth-Bell
                              Espire 1: VR Operative: Espire1.com
                              Melbourne, Australia

                              Comment


                                Originally posted by michaelwbell View Post
                                Hey Mordentral!

                                Hope you are enjoying the holidays! I had 2 questions I was hoping to get some advice on!

                                Question 1 - Spawning objects in the player's hand, already gripped
                                Explanation: In your Template the player has a "body" cylinder that the potion can be stored in.
                                I am hoping to have functionality where:
                                -Player puts hand 'inside' the body cylinder
                                -Player presses the grab button
                                -The potion is spawned at the player's hand and the player is now gripping the potion

                                I was wondering the best way to implement this.
                                Should the body cylinder be a standard actor that uses the VRGripInterface, deny gripping, but "onGrip" check to see if it is the player's controller? If so, spawn potion and attach to player's hand?

                                No I would just have the trigger event branch at where it detects the object and if it is an "Inventory object" use different logic. Deny gripping totally denies attempting to grip at all and it will fail out. Making an enum of "BaseObjectTypes" and branching the trigger logic based on which base it is would likely be best. It also future proofs it for when you want to do more custom logic like climbing or special actions that don't involve gripping.


                                Question 2 - fire event every time player grabs a 'grippable box'.
                                Explanation: In your template there is the Gun with a 'grippable box' that can be moved on one axis.
                                I want to play a sound every time the grippable box is 'gripped'.
                                How would be the best way to do that?

                                Do I have a branch on the "On child grip" event that checks if the child was the gripabble box, if so -> play sound ?

                                As an extension - If there happen to be many components on an actor that can be "Child gripped", should we set up an 'on child grip' with a few branches for each of the child components? Or is there a better way to do this?

                                You can actually subclass the grippable component and do it "OnGrip" in that if it makes more sense to you. The Child gripped event is a convenience but things like that would likely be better done in the component itself.



                                Thanks for any advice. Love the plugin, it's the best

                                Replies in bold in the quote.

                                I have been writing down things I want to do next week all this week (ended up being at work over my vacation a bit >.< and my son was sick). Should be more than free over the next few days, I want to look over multiplayer logic some more and try and streamline it.


                                Consider supporting me on patreon

                                My Open source tools and plugins
                                Advanced Sessions Plugin
                                VR Expansion Plugin

                                Comment

                                Working...
                                X