Announcement

Collapse
No announcement yet.

[VIVE] - and probably occulus - VR intereractable physic objects

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

    [VIVE] - and probably occulus - VR intereractable physic objects

    Hi guys

    let me introduce that little pack I've worked on. It's an essential kit of basic VR mechanisms, compatible with Epic VR template.

    it is composed of 3 customizable blueprints :

    - interactable physically simulated objects (can be used for door, drawers, levers, chests etc ...)
    - slots (usable for any kind of locks)
    - pickables objects (can be use as keys, coins, gear etc ... they fit into slots to unlock the interactable objects.

    here a little demo on how it works



    feature list :

    **************************
    *** BP_PickupObject actor ***
    **************************

    Click image for larger version

Name:	PO_1.jpg
Views:	1
Size:	39.4 KB
ID:	1203943

    Similar to epic's BP_PickupCube actor but with additional features.

    - can be place in a slot

    - has a "type" variable picked up from the enumeration "ENUM_PickupObjectType"
    If the type of the PickedupObject doesn't match the "type" of the slot he's dropped on, it won't collide and fallto the ground.

    - has a "ID" integer variable
    If the type matches but not the ID, the PickupObject will be place into the slot (aligning its pivot to the slot's pivot) but the slot will remain "locked"(slot's "Locked" variable is still set to true)
    If Both ID and type match, PickupObject will be place into the slot (aligning its pivot to the slot's pivot) and the slot will be "unlocked"(slot's "Locked" variable is still set to false

    ******************
    *** BP_Slot actor ***
    ******************
    Click image for larger version

Name:	SL_2.jpg
Views:	1
Size:	56.1 KB
ID:	1203945

    Click image for larger version

Name:	SL_1.jpg
Views:	1
Size:	16.2 KB
ID:	1203944

    actor with a customizable apparence (static mesh component), Slot can hold BP_PickupObject.

    - has a "Full" boolean variable set to true when it contains an object
    - has a "type" variable picked up from the enumeration "ENUM_PickupObjectType"
    - has a "ID" integer variable

    ******************************
    *** BP_InteractableObject actor ***
    ******************************

    Click image for larger version

Name:	IO_2.jpg
Views:	1
Size:	63.5 KB
ID:	1203946

    Click image for larger version

Name:	IO_1.jpg
Views:	1
Size:	43.0 KB
ID:	1203947

    Gameplay related actor with a customizable apparence (static mesh component), they can rotate or translate, be physically simulated, have a limited or unlimited range of motion etc ...

    - "type" from "ENUM_InteractableActorType", currently can do 1 rotation or 1 translation

    - "Limit" defines how far the object can move, can be positive or negative (affect the direction), if type is rotation, limite can be more then 360° or less then -360°, in that case, the object can do multiple turns. If set to 0, the range of motion is unlimited.

    - "Snap when closed" use this to prevent object from bouncing when returning to initial position (both by autoreturn or by hand), it alos prevent an object from pushed by a dynamic object.

    - "Snap Limit" how far the magnetism from the snap feature extend, expressed in % (usually less then 10%)

    - "Is Physic" if checked the object is physically simulated, otherwise it isn't (when release the object stay in place)

    - "damping" define the damping if the object is physic

    - "Autoreturn" if checked, the object will return to its initial position when released

    - "Return Duration" defines the speed of the return, in second for a full motion (from max position to initial position), if object isn't limited the duration is base on 100 cm or 360°.

    - "Return Delay" defines hos long it takes for the autoreturn to start once the object is released (in second)

    - "Linked to" Interactable object can be linked to slot or other interactable object, in that case it read the "locked" state of all their linked objects, if at least one of them is set to true, the object cannont be grabbed or move, neither by hand or simulated. if the autoreturn is true, it will be activated immediatly.

    - "Attached Object" slots or other non dynamic Blueprint objects can be parented to the interactable actor. Note that it CAN'T be another interactable actor Neither a simple static mesh (a simple blueprint with a static mesh component will work perfectly.

    https://www.dropbox.com/s/3nxjpmqwg1...l_Kit.rar?dl=0

    it was supposed to be for the marketplace but it didn't pass the quality check, so instead of let it die somewhere on my HD, I prefer to share it with the community,

    feel free to use it, share it, modify it, enjoy it

    if you think it could have been designed in a more efficient way, please let discuss it here, I always appreciate to learn more !

    if you use it in your project, a little credit is always appreciated

    enjoy guys.

    #2
    Quite an amazing amount of very useful stuff, thanks for sharing
    ENTER REALITY

    VR Solutions

    Contact us for more informations

    Comment


      #3
      you're welcome

      any feedbacks ?

      Comment


        #4
        That's a lot of work you put there , thanks a lot for sharing i am currently working on different project but if i work in VR i will defiantly use most of your mechanic .

        i will give you my feedback when i test them .

        Comment


          #5
          This looks like what I have been looking for a while. I will check it out when I got some time.
          I am currently using the open VR plugin, it works and allows physics constraints to be used with VR interaction.

          However the plugin is a little heavy for my requirements. Your project looks much more light weight.

          Why did it not pass quality checks if you don’t mind me asking?

          Comment


            #6
            Hi,

            I've had a little play with this, just trying the basics and then getting it into another project.

            1. The base system in your template is excellent!

            2. But! It's missing the normal pickup object from the template, I can only find yours. I added in one BP_Slot with an ID of 1 and two BP_PickupObjects (your version) with ID of 0 and 1. I expected only the item with the same ID (1) to snap, but they both did. Whats the solution if I want to use a normal pickup item from the standard template and don't want it to snap. I can't see an option to do this. I don't want every item I create to snap to a slot.

            2. So, I setup a standard template from the launcher, added your project on top of it. Now the standard pickup object from the base template is there, but I can't pick it up now. It doesn't attach, I can only push it around when trigger is pressed.

            3. I think this should have been bolted on top of the normal template, some helpful things are deleted (the standard motioncontroller map for example as well as the standard pickupobject). Because of the missing items, this can't function on its own, and it has problems when its merged on top of the standard VR template.
            Last edited by GruntosUK; 02-24-2017, 07:53 AM.
            Level Designer: Available for work if needed.

            http://www.grantegglestone.com

            Comment


              #7
              I fixed the item always snapping problem with a simple bool added to pickup and drop. It should be easier to merge with a standard template now, I'm going to test that out.



              EDIT: Yes it merges fine, the standard pickup item works, but that doesn't matter now with the new bool on your version (cuts down on the amount of different objects to be placed in the scene).
              Last edited by GruntosUK; 02-24-2017, 08:39 AM.
              Level Designer: Available for work if needed.

              http://www.grantegglestone.com

              Comment


                #8
                Hi guys,

                thanks for the feedbacks

                Originally posted by superme2015 View Post
                Why did it not pass quality checks if you don’t mind me asking?
                various reasons, some I could easily fix (naming convention, non PBR materials), but the main one is that epic said "to easy to reproduce" ... (wich is a shame because I saw far simpler blueprints in the marketplace ... but I assume they have been submitted when the market needed to be filled up ...


                Originally posted by GruntosUK View Post
                2. But! It's missing the normal pickup object from the template, I can only find yours. I added in one BP_Slot with an ID of 1 and two BP_PickupObjects (your version) with ID of 0 and 1. I expected only the item with the same ID (1) to snap, but they both did. Whats the solution if I want to use a normal pickup item from the standard template and don't want it to snap. I can't see an option to do this. I don't want every item I create to snap to a slot.
                hey... read carefully the description :
                Originally posted by jamis View Post
                **************************
                *** BP_PickupObject actor ***
                **************************

                Similar to epic's BP_PickupCube actor but with additional features.

                - can be place in a slot

                - has a "type" variable picked up from the enumeration "ENUM_PickupObjectType"
                If the type of the PickedupObject doesn't match the "type" of the slot he's dropped on, it won't collide and fallto the ground.

                - has a "ID" integer variable
                If the type matches but not the ID, the PickupObject will be place into the slot (aligning its pivot to the slot's pivot) but the slot will remain "locked"(slot's "Locked" variable is still set to true)
                If Both ID and type match, PickupObject will be place into the slot (aligning its pivot to the slot's pivot) and the slot will be "unlocked"(slot's "Locked" variable is still set to false
                in another words if the item type's is "Key" and the slot wait for a "key" item, the item will snap, regardless its ID, in addition, if ID's of the slot and the item match, the slot variable "locked" will be set to false
                (you can add custom types by editing the corresponding ENUM

                Originally posted by GruntosUK View Post
                2. So, I setup a standard template from the launcher, added your project on top of it. Now the standard pickup object from the base template is there, but I can't pick it up now. It doesn't attach, I can only push it around when trigger is pressed.

                3. I think this should have been bolted on top of the normal template, some helpful things are deleted (the standard motioncontroller map for example as well as the standard pickupobject). Because of the missing items, this can't function on its own, and it has problems when its merged on top of the standard VR template.
                regular pickup objects from epic template should be pickable too ... they are not included in the package... because this is the way epic want stuff to be submitted to the markeplace.

                be carefull using the default VR template from epic... you may run into issues if you swap objects from my package from one hand to another. this is caused by the way the checks before firing the grab and drop event are done in their player controller.. those checks have to be adapted... I recommend to have a look at the modification I made in the player controller and the motion controller.

                or if you don't want to bother... just migrate the pickup object from epic template into a new project created from the template I've provided.

                Comment


                  #9
                  Originally posted by jamis View Post

                  hey... read carefully the description :


                  in another words if the item type's is "Key" and the slot wait for a "key" item, the item will snap, regardless its ID, in addition, if ID's of the slot and the item match, the slot variable "locked" will be set to false
                  (you can add custom types by editing the corresponding ENUM
                  Hey, thanks for the reply, I read all of this and then started playing and it slipped my mind completely!

                  Originally posted by jamis View Post
                  regular pickup objects from epic template should be pickable too ... they are not included in the package... because this is the way epic want stuff to be submitted to the markeplace.

                  be carefull using the default VR template from epic... you may run into issues if you swap objects from my package from one hand to another. this is caused by the way the checks before firing the grab and drop event are done in their player controller.. those checks have to be adapted... I recommend to have a look at the modification I made in the player controller and the motion controller.

                  or if you don't want to bother... just migrate the pickup object from epic template into a new project created from the template I've provided.
                  I imported your version on top of the template and overwrote files, I've checked the differences and it seems I have your version instead of Epic's standard one!

                  The system for interacting with stuff really is excellent! I'm still playing but will definitely get back to you once I do.
                  Level Designer: Available for work if needed.

                  http://www.grantegglestone.com

                  Comment


                    #10
                    Thank you for the response. I will spend some time with it over the weekend.

                    I will test it out over the weekend and give you some feedback.

                    Comment


                      #11
                      Originally posted by superme2015 View Post
                      Thank you for the response. I will spend some time with it over the weekend.

                      I will test it out over the weekend and give you some feedback.
                      Hi jamis,

                      I just tested out the examples, they feel and work very good.

                      I started to create my own custom interaction, so I created the BP_InteractibleActor, then I was a little lost after that point.
                      Could not work out how to enable the physics and constraints?

                      Comment


                        #12
                        Hi guys,

                        yeah, I can imagine it's a bit confusion. my plan was to make a tutorial video for the marketplace... but for now we should go for some screenshots

                        - your mesh has to be modeled Z-up and with its pivot point centered to the world
                        Click image for larger version

Name:	tuto_1.jpg
Views:	1
Size:	287.6 KB
ID:	1123973

                        - import in the engine
                        Click image for larger version

Name:	tuto_2.jpg
Views:	1
Size:	295.8 KB
ID:	1123974
                        - in order to be grabbed, your mesh must have a colision mesh. Custom collisions are probably the best way to go, but you can give a try to the auto collision mesh generation

                        - drop a blanck BP_InteractableActor in your scene
                        Click image for larger version

Name:	tuto_3.jpg
Views:	1
Size:	309.5 KB
ID:	1123975

                        - select the type of motion (rotation or translation)
                        - set wich mesh/material will be used by the interactable actor
                        Click image for larger version

Name:	tuto_4.jpg
Views:	1
Size:	362.5 KB
ID:	1123977
                        Click image for larger version

Name:	tuto_4_bis.jpg
Views:	1
Size:	350.0 KB
ID:	1123980

                        - in case of a rotation : the red arrow is for the rotation axis, the blue arrow is the default position, and the green one is the limit position
                        Click image for larger version

Name:	tuto_5.jpg
Views:	1
Size:	225.2 KB
ID:	1123978

                        - in case of a translation : the blue arrow is for the translation axis, the red arrow is the default position, and the green one is the limit position
                        Click image for larger version

Name:	tuto_6.jpg
Views:	1
Size:	244.5 KB
ID:	1123979

                        - if the limit is set to zero : no limit
                        - if rotation the limit is expressed in °, if translation limit is expressed in cm.

                        auto return and physic feature are pretty much self explanatory

                        I'll make another wuick tuto for the linked and attached to feature

                        I hope it's gonna make things easier to figure out.

                        cheer guys
                        Last edited by jamis; 02-25-2017, 04:55 PM.

                        Comment


                          #13
                          Thanks for the info, will take another look at it.

                          Comment


                            #14
                            Great Stuff, I am just getting my head around it. But keep up the great work mate.

                            Sorry for my naive knowledge of blueprints, but is there an easy way to set a triggered off event when a lever reaches the maximum amount?

                            Comment


                              #15
                              Just wonder if can do rotation and location motion at the same time ?

                              Comment

                              Working...
                              X