Hi, I am trying to create combat system but i cannot figure how to enable collision on my weapon. When i equip my weapon from inventory I can see it but the collision is just not working. I even created a little debug system:
Well I wanted to have it on overlap so when it will overlap another collision it will deal damage. Just simple combat system. But the weird fact is that I dont have ANY Collision when i equip weapon. Maybe it is something in Equip function? I really dont have any idea.
I think i now where is problem but i dont know how to solve it. So i figured out that when i equip my weapon it will enable collision but the collision is set to the center of the world and wont move. When i placed there object it said SwordOverlaping so it is that Collision but why is it in the middle of a World?
Well that is almost the same as guy from Titanic Games did on his tutorials but a improwed version. Still i will need to change a little my Inventory System for this I dont think there is other solution for this
I might be being obtuse and not seeing something but your inventory system shouldn’t have any effect on your weapon collisions. They are distinct pieces are the overall system and shouldn’t inter-mix. Otherwise you lose your modularity of the game system.
Your inventory tells you what items you have. The weapon collision is part of the game combat system. Maybe try starting a test project without any inventory system just the bare bones of what you need to build your combat system. Whenever I start work on a particular system I always use a test project to design it seperate from any other system if possible. That way I am only dealing with issues in that particular system.
This weekend I can lit together a project with equip and inequip capabilities and see what I come up with. Thenpronecr I’ve been working on for five months has weapons created at runtime during construction and they can’t be equipped or in equipped during gameplay. But I’d think the attachment would be similar. We use child actor components to hold out weapons set to sockets on the parent skeleton and we haven’t had any issues. But may be it’s the equip and unequip like you’re thinking.
Can you post pics of your character rig and the equip and unequip functions?
I used Virtus technique and its Working all perfect!! Even collision. Yeah Finally i can create that combat system. That was the last and the hardest thing i need to do to create my game. Really thanks for help mate.