Announcement

Collapse
No announcement yet.

Rama's Melee Weapon Plugin, Custom C++ PhysX Coding For You! ♥ Rama

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

    #31
    Full Sample Project

    In a recent post I've submitted a full 4.17 project you can use if you have my plugin already:

    Market Place Link
    https://www.unrealengine.com/marketp...-weapon-plugin

    Direct Link:
    http://www.lightningfitness.org/ue4c...tDemo_4_17.zip

    Enjoy!

    Rama
    100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

    UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

    Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

    Comment


      #32
      I', trying to figure out how to switch weapons for VR Player. I understand how to setup a character with melee weapon predefined but how do you swap melee weapons Mesh and DamageMap at runtime. The DamageMap struct can't be broken apart in Blueprint can this only be done through C++ code? It blueprint how?

      What I need is a SkeletalMeshActor but a RamaMeleeWeaponMeshActor. Is there a way to get SkeletalMeshActor to contain a RamaMeleeWeapon for the Mesh Component?
      Last edited by Sooth; 10-27-2017, 08:34 AM.

      Comment


        #33
        RamaMeleeWeapon is to slow to detect fast movement by VR Player holding a RamaMeleeWeapon. Collision events from what I can tell are lost. Tick rate is too low to keep up with VR Player. Any ideas how to fix this?

        Actually figured out turning the swing on and off caused most of the gaps I was seeing. To make it work, you need to have swing on when in VR Players hand and do other logic to handle the multiple hit events. I could not find any other way to get close to accurate hits.
        Last edited by Sooth; 11-08-2017, 02:58 PM.

        Comment


          #34
          Rama, are you able to handle Convex collision. Can't seem to mark them as doing damage.

          Comment


            #35
            VR

            Regarding VR: Yes you just have to continuously trace for the period of time when the user's weapon is able to do damage, because you don't have pre-created animations like in case of a non-VR game.


            Originally posted by Sooth View Post
            Rama, are you able to handle Convex collision. Can't seem to mark them as doing damage.
            I chose not to support convex for now for optimization reasons, I think it is far more efficient if you use simpler shapes. If you find you cannot approximate accurately enough with capsules, boxes, and spheres, I can reconsider this stance.

            Have fun making your game!



            Rama

            PS: Thank you for nice comment and the update in the marketplace comments section about these matters
            Last edited by Rama; 11-14-2017, 04:12 PM.
            100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

            UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

            Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

            Comment


              #36
              Rama, what i did to make items act more real is to setup two skeletal meshes with their own physics asset. One is the parent of the other. The physical asset in the world is a standard Skeletal Mesh which full convex hull collision but basic shapes to give realistic physics when item is thrown or dropped, ... The second skeletal mesh is a rama weapon which is hidden in game but setup with the simple collision shapes (parented to the visual representation of the weapon) [Its the same skeletal mesh but a different physics asset]. This provides the on hit events. Thought this would be useful for other to know.

              Comment


                #37
                Originally posted by Rama View Post
                VR

                Regarding VR: Yes you just have to continuously trace for the period of time when the user's weapon is able to do damage, because you don't have pre-created animations like in case of a non-VR game.
                And How? can u show a example? Thanks

                Comment


                  #38
                  Originally posted by Sooth View Post
                  I', trying to figure out how to switch weapons for VR Player. I understand how to setup a character with melee weapon predefined but how do you swap melee weapons Mesh and DamageMap at runtime. The DamageMap struct can't be broken apart in Blueprint can this only be done through C++ code? It blueprint how?

                  What I need is a SkeletalMeshActor but a RamaMeleeWeaponMeshActor. Is there a way to get SkeletalMeshActor to contain a RamaMeleeWeapon for the Mesh Component?
                  Did you ever figure out how to update the DamageMap (and uupdate the active arrays) when you change a mesh (For using multiple weapons on one component)?

                  Comment


                    #39
                    Originally posted by Notion View Post

                    Did you ever figure out how to update the DamageMap (and uupdate the active arrays) when you change a mesh (For using multiple weapons on one component)?
                    The DamageMap is something you can read/write in BP. You could simply store variables of FRamaMeleeDamageMap, one for each of your weapons, figure out your desired settings, and then load that map when you use SetSkeletalMesh to change your weapon.

                    More advanced: you could make a struct that has a weapon mesh as a variable, and also a FRamaMeleeDamageMap, then make an array of this struct. Now you can look up maps by the asset and retrieve the desired DamageMap.

                    Even More Avanced: You could use a Map (instead of an array), using the skeletal mesh asset as the key, and the FRamaMeleeDamageMap as the value, and store this map somewhere convenient, possibly your character BP itself.



                    Rama
                    100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

                    UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                    Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

                    Comment


                      #40
                      Hi Rama,

                      Great plugin! Works really well. However, I would like to port my game to Mac and I'm not sure how to do this or if it is even possible. I saw a hint in the marketplace comments that it might. My project is Blueprint only right now. So, is this possible? If so, how might I go about this? Can I compile your plugin with Xcode and drop it into the third party plugin folder? Do I need to compile my entire project and then re-compile with Xcode? I have messed around with C++ implementation before but I am a noob(to C++). Any assistance would be greatly appreciated.

                      Thanks!
                      LordPomp
                      Last edited by LordPomp; 11-11-2018, 07:56 PM.

                      Comment


                        #41
                        LordPomp It works on mac.... Just add plugin to project and build your game... may need to add it to whitelist to compile
                        https://www.casualdistractiongames.com

                        Comment


                          #42
                          Rama Launcher says Melee Plugin for 4.21 is live... but when I click link to install nothing happens....
                          https://www.casualdistractiongames.com

                          Comment


                            #43
                            Hi Rama, I getting a real strange issue in UE 4.22.2. Maybe it started earlier and I did not see it but now I get cases where

                            if(URamaMeleeCore::MeleeSweep(
                            GetWorld(),
                            Actor,
                            Hit,
                            EachMeleeSweep,
                            FCollisionObjectQueryParams(MeleeTraceObjectTypes)
                            )){

                            Sometimes fail. I hold a weapon hitting a cube which I have setup to allow weapon to hit. It will fire sometimes a hit and sometimes it fails to hit and then is fires a hit again. It looks like the function: SweepSingleByObjectType is not always returning a hit when called repeatedly.

                            Do you know why this is now happening?

                            Comment


                              #44
                              I can see from the collision analyzer this is in fact a failure of SweepSingleByObjectType not reporting a hit when it should. Just wondering if you every ran into this issue yourself.

                              Comment


                                #45
                                Originally posted by Sooth View Post
                                I can see from the collision analyzer this is in fact a failure of SweepSingleByObjectType not reporting a hit when it should. Just wondering if you every ran into this issue yourself.
                                Looks like Rama is not working on this plugin anymore, he doesn't answer emails or comments in the store and his last post here is from last year. If you find a way to fix the SweepSingleByObjectType problem, please share it (i have tried some things myself but nothing works).

                                Comment

                                Working...
                                X