Announcement

Collapse
No announcement yet.

Physics Interaction: Doors and Locks

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

  • started a topic [RELEASED] Physics Interaction: Doors and Locks

    Physics Interaction: Doors and Locks

    Hey everyone,

    Physics Interaction: Doors and Locks is a system for adding physics simulation based interactive elements to your project. It is compatible with VR as well.

    Marketplace link: https://www.unrealengine.com/marketp...hests-and-more

    Click image for larger version  Name:	PhysicsInteraction_DoorsAndLocks284x284.jpg Views:	1 Size:	20.6 KB ID:	1431559








    Preview:


    Features:
    • Easy to set up, easy to use, easy to extend
    • Ability to check if Interaction input got used for interacting. Can be used to use same key for both Interacting and any other action (e.g. firing a gun)
    • Supports First person, Third person, Top Down, full VR, and probably any other type
    • Multiple detection methods such as tracing, mouse cursor or custom mesh collision
    • Mesh collision detection prioritizes grabbing Lockset over Openable. Useful for preventing accidentally grabbing door when intended to grab handle in VR
    • Select any actor as a key
    • Basic inventory system for picking up keys (not visual, just a string array)
    • Ability to use custom Collision Profile for Openable and Lockset meshes
    • Basic, modifiable sound system for playing sounds when certain events happen e.g. door opened, lock got unlocked, etc.
    • Save created actors as templates (prefab of multiple actors) to spawn without needing to copy paste/rebuild
    • Easily access events from other actors and extend functionality of system itself







    Updates:
     
    Spoiler


    Extra Guides:

    Template First Person implementation
    This guide will show how to use same Fire input to both interact and fire the gun as default in First Person Template:
     
    Spoiler


    Template VirtualReality implementation
    This guide will show how to implement this system with UE4 default VR template:
     
    Spoiler


    Known problems/solutions:
     
    Spoiler


    Demo characters in the project are not meant to be used as starting point for your character because PlayerController used for them is very specific to the demo.

    Special thanks to Peter Ryan aka TorQue[MoD] for testing, making better models and sounds, and giving some ideas ​. He is the founder of Apeirogon Games, please check out his site: http://apeirogon-games.com/
    Last edited by Nicat; 04-11-2019, 03:13 AM.

  • replied
    Spring Sale - 30% OFF
    Marketplace link: https://www.unrealengine.com/marketp...hests-and-more

    Leave a comment:


  • replied
    Originally posted by tcla75 View Post
    Yep that fixed it. Sorry for jumping the gun there. Though that didn't explain why I was having a similar issue on the demo I downloaded from your marketplace page. I figured out what happened there. When I opened your demo I still had the editor open and I think steam VR was still set to that so when I tried to play your demo in VR it had those weird issues. In fairness, I should have followed the golden rule on this one. If no one else has complained about the issue and you are the only one experiencing it then very likely the issue is with something you are doing lol

    Glad it worked in the end! But that stutter got me really curious because I've never experienced something like while making+testing.
    Don't worry about it, you might actually be the first one to find the problem due to a very specific circumstance or it's just UE4 throwing a tantrum, haha.
    Have a great one!

    Leave a comment:


  • replied
    Originally posted by Nicat View Post

    Oh sorry about that, the naming is a bit off I guess. Here is a link to official documentation. In that tab click Preset to expand it and double click PhysicsActor to see how it is setup. Then create a new preset with same attributes as PhysicsActor except set Pawn (in case you've modified collision of your character, your character's collision component's Collision Type) to Ignore. Name it whatever you want, then in level select Drawer, in Details Panel -> Static Mesh - advanced -> Collision Profile type the name of newly created preset.
    Yep that fixed it. Sorry for jumping the gun there. Though that didn't explain why I was having a similar issue on the demo I downloaded from your marketplace page. I figured out what happened there. When I opened your demo I still had the editor open and I think steam VR was still set to that so when I tried to play your demo in VR it had those weird issues. In fairness, I should have followed the golden rule on this one. If no one else has complained about the issue and you are the only one experiencing it then very likely the issue is with something you are doing lol


    Leave a comment:


  • replied
    Originally posted by tcla75 View Post

    Hi can you explain a bit more about creating collision profile? I have never heard of this before and when I google the phrase I get no results. When I search without quotes I can't find anything that sounds like what you are describing.
    Click image for larger version

Name:	collision-profile.PNG
Views:	1
Size:	16.8 KB
ID:	1582472
    Oh sorry about that, the naming is a bit off I guess. Here is a link to official documentation. In that tab click Preset to expand it and double click PhysicsActor to see how it is setup. Then create a new preset with same attributes as PhysicsActor except set Pawn (in case you've modified collision of your character, your character's collision component's Collision Type) to Ignore. Name it whatever you want, then in level select Drawer, in Details Panel -> Static Mesh - advanced -> Collision Profile type the name of newly created preset.

    Leave a comment:


  • replied
    Originally posted by Nicat View Post

    Hi, in case you missed it I've sent a PM. For some reason my first post is breaking the page and I had set post count to 40, so I couldn't write here. Now I've set it to lower and at least can write.

    Anyway, I checked drawer in demo but didn't have any issues. Maybe you are standing in front of it while opening, which shouldn't create any stutters but would prevent drawer from opening all the way. However, for situations like that I've implemented the ability to set custom "Collision Profile". You just need to create a new collision profile which ignores your character's collision type, then enter the new Profile's name into drawer's Detail Panel -> Static Mesh - advanced -> Collision Profile.
    But if that is not the issue you are having, then I'm really curious what it could be. Please make a video so I can at least see what is going on.

    Also please use the support email(you have to sign in to see the address) since I'm not sure if sharing any pictures or videos would break forum or not. Thanks!
    Hi can you explain a bit more about creating collision profile? I have never heard of this before and when I google the phrase I get no results. When I search without quotes I can't find anything that sounds like what you are describing.
    Click image for larger version

Name:	collision-profile.PNG
Views:	1
Size:	16.8 KB
ID:	1582472
    Last edited by tcla75; 02-08-2019, 02:36 PM.

    Leave a comment:


  • replied
    Originally posted by DarkS474 View Post
    Could you add suppot for destructibles? I mean... if a door, closet or a lock gets hit and partially destroyed .. having the options to add sound and conditions on the blueprint to slow down the simulation.. having the a door or closet moving clunky and so on.. Or if you can't then point to code snippets that need modifications to achieve that. So I would avoid having to study all your code to do that.
    I just tried doing but unfortunately it seems impossible to achieve. It was a nice idea though. I'll add it to a private features list in case I stumble upon a way to do it in future. Thanks!

    Leave a comment:


  • replied
    Originally posted by tcla75 View Post
    Nicat The drawers don't work in VR!!! So a bit more info. When you try to open a drawer in VR it stutters badly and won't come out all the way. My 1st thought was that I must have gone wrong somewhere setting it up for my character so I took another look at your preview video because I remembered that you showed some VR footage in that but you had skipped the part (in VR) where you opened the drawer so then I downloaded the demo from the marketplace page to see how it is meant to work and it was worse and that was in your project demo so it couldn't have been something I had done. It barely opened at all. Nicat I can go to the trouble of uploading a video of this issue happening if I have to but I have a feeling you are aware of this issue so my question is, why is this happening and how can I fix it?
    Hi, in case you missed it I've sent a PM. For some reason my first post is breaking the page and I had set post count to 40, so I couldn't write here. Now I've set it to lower and at least can write.

    Anyway, I checked drawer in demo but didn't have any issues. Maybe you are standing in front of it while opening, which shouldn't create any stutters but would prevent drawer from opening all the way. However, for situations like that I've implemented the ability to set custom "Collision Profile". You just need to create a new collision profile which ignores your character's collision type, then enter the new Profile's name into drawer's Detail Panel -> Static Mesh - advanced -> Collision Profile.
    But if that is not the issue you are having, then I'm really curious what it could be. Please make a video so I can at least see what is going on.

    Also please use the support email(you have to sign in to see the address) since I'm not sure if sharing any pictures or videos would break forum or not. Thanks!

    Leave a comment:


  • replied
    Could you add suppot for destructibles? I mean... if a door, closet or a lock gets hit and partially destroyed .. having the options to add sound and conditions on the blueprint to slow down the simulation.. having the a door or closet moving clunky and so on.. Or if you can't then point to code snippets that need modifications to achieve that. So I would avoid having to study all your code to do that.

    Leave a comment:


  • replied
    Nicat The drawers don't work in VR!!! So a bit more info. When you try to open a drawer in VR it stutters badly and won't come out all the way. My 1st thought was that I must have gone wrong somewhere setting it up for my character so I took another look at your preview video because I remembered that you showed some VR footage in that but you had skipped the part (in VR) where you opened the drawer so then I downloaded the demo from the marketplace page to see how it is meant to work and it was worse and that was in your project demo so it couldn't have been something I had done. It barely opened at all. Nicat I can go to the trouble of uploading a video of this issue happening if I have to but I have a feeling you are aware of this issue so my question is, why is this happening and how can I fix it?

    Leave a comment:


  • replied
    Originally posted by David Chaseling View Post
    Could this plugin be used to control a joystick in VR? So like the door handle but on 2 axis instead of 1.
    That is a really interesting question . At first I thought it wasn't possible but looks like it is kind of possible but not perfect by any means. I built a demo because I think it is best way to explain why it isn't perfect. You can download it here: https://drive.google.com/open?id=19k...1bdAfKLnv_-JWj

    Few notes: Use left touchpad to move and trigger to grab; Only rotation of hand is used to control "joystick", location doesn't matter; I haven't done any modifications to blueprint to achieve this, except for showing text value. The two meshes are Openable and Lockset blueprints just like door and handle with certain properties; I've only tested it on Vive.

    I hope this answers your question.

    Leave a comment:


  • replied
    Could this plugin be used to control a joystick in VR? So like the door handle but on 2 axis instead of 1.

    Leave a comment:


  • replied
    It looks like none of the blueprints for this pack were nativized. Unless I turned them off. I think I just turned them off to get it to work.

    Leave a comment:


  • replied
    Architect3D hey, I wanted to let you know that I'm looking into it. I haven't tried nativization before and looks like there are some problems with my UE4+VS. So it might take a bit before I can determine what the cause is, if at all. It just looks like it is a bit deeper than simple blueprint script issue. However could you check if BPI_HABInteractable is on nativization list? If it isn't just add it too (by pressing + sign and choosing the BPI_HABInteractable) and if it helps.

    Leave a comment:


  • replied
    Hi Nicat, I am getting errors packaging my game in 4.18.3. I have exclusive Nativized Blueprints enabled. Getting following Error with your BP. Please help. I included an image.



    Attached Files

    Leave a comment:

Working...
X