Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Attaching weapons to hand very tedious.

Ok so Im having trouble with attaching weapons. Sure I can set up a socket to attach one weapon to but what happens when I want to attach a different weapon that has a different point of origin and rotation. Do I have to model the weapon with the required location and rotation? That seems very tedious and not very precise. Does anyone have any way for efficient weapon attaching?

Lemmi try explain a little better, say I have a rifle, and a socket on my characters palm that has the required location and rotation to attach that rifle to the palm. But now the character wants to pick up a spear and the palm socket is not rotated properly for the spear. And then all the other weapons that are in the game...

How the heck does any one get past this problem. And how can I attach different weapons in an accurate way (so that reload animations work properly).

Product Version: UE 4.18
more ▼

asked Feb 13 '18 at 05:03 PM in Everything Else

avatar image

3 2 2 4

avatar image ThompsonN13 Feb 13 '18 at 05:27 PM

change the rotation of your spear when imported. if you already have it imported open the mesh and in the details panel you will find a section to change rotation, location and scale on re-import. just change those.

avatar image CurryCo. Feb 13 '18 at 05:59 PM

Is that really the way its done? That seems really tedious and inaccurate. And also wouldnt it mean that when placing the weapon into the world or spawning the weapon in it would have that angle as well. Hmh...

avatar image Alex O ♦♦ STAFF Feb 13 '18 at 09:28 PM

Yes, although if you dont want to change your source asset another(slightly hacky) option would be to Add an offset and rotation to your mesh when interacting/attaching it.

Another good option would be to create custom socket inside of your Static Mesh (socket manager tab)

avatar image CurryCo. Feb 13 '18 at 10:42 PM

Would rotating the root bone in an animation work well? Is this REALLY the way its done? You guys should totally make this way better. There might be something I dont get, how do the pros do it where they can have really complex animations. And also how would creating a socket in the selected mesh help?

IDEA: What if instead of the preview mesh moving the socket, it moves the selected mesh and when finished it saves the location and rotation of that specific preview mesh in the preview meshs class and then when attaching the mesh to that socket it would get the information from the mesh and applying it to the attaching process so that there could be custom attachments for different meshs (and skeletal meshs).

avatar image ThompsonN13 Feb 13 '18 at 11:20 PM

the proper way to fix things would be to go into a modeling program and fix the rotation and origin point of your models. then you would also make different animations for different item types (pistol, rifle, sword).

if you want to see some examples check out the infinity blade weapons and the anim starter pack.

the solutions your proposing are a bit complex and would be a nightmare to implement. its better to have a standard when making your item assets and stick to it.

avatar image CurryCo. Feb 14 '18 at 01:02 AM

I still think that if there was an option like the one I said as an additional feature it would be better, but I suppose Ill do it like you said. So what your saying is to make the origin point for each weapon the location of where its going to be held. I took a look at the infinity blade pack but I dont get how that works, the socket is waaay out in the open and not even in the hand.

alt text

alt text

So I would have to make an animation for the weapon and the character to play simultaneously? Infinity blade: weapons doesn't have any animations but is that the way they would have done it? I get making the weapons origin the location at which it will be held and then rotate each weapon in the modeling program so that it fits the hold animation but gosh I think it would be a lot easier to have that done in the engine and to have it done in a way that doesn't affect the base model.

and like I said from then on whenever the weapons will be spawned and having them all rotated on import it would spawn them with that rotation unless you counter acted it inside blueprints and also whenever you would place them in the world they would be all rotated and in a bad position. I also saw a trailer for a game in the unreal engine and a weapon was clipping through a characters hand.

avatar image CurryCo. Feb 14 '18 at 01:04 AM

Look this is what I mean by implementing another method for equipping stuff. (Elf like handwriting)

alt text

avatar image ThompsonN13 Feb 14 '18 at 01:22 AM

you should never need to move the socket. the origin for a gun would be where the grip is and the origin for the spear would be where the hand holds it.

and yes you would play animations for the character mesh and the gun at the same time. for example fire gun input pressed -> play gun firing animation on the gun -> play recoil animation on the character.

over all its pretty simple. most items will sit in the players hand in one of two ways, either up or down. so when you import a melee weapon you would have it in the same orientation as the ib weps pack with the pointy end up. and for guns with a pistol grip you would orient the grip in an up down direction and the barrel would fall along the x axis for instance.

avatar image CurryCo. Feb 14 '18 at 01:49 AM

Ok. But what about idle animations? like giving the item an idle animation and the character an idle animation, coz how did infinity blade get that working? Anyway Ill just do it the way ur saying.

avatar image ThompsonN13 Feb 14 '18 at 02:39 AM

for idle animations for the character you would just have to take into account if the socket is populated. so you may have a different idle for holding a gun vs empty handed. or you could sheath/ holster the wep. as for the wep animation just have it set to where if its not doing a firing animation its doing its idle just like a character would do.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Before you export your weapon make sure the have a proper point of origin and rotation (At the handle). And make different sockets for the weapons that can't use the same socket, If a pistol can use the same socket as a rifle then fine, if it can't then make a different socket for the pistol. If you really don't want to deal with multiple sockets then you'll have to deal with every single mesh's point of origin to suit with your 1 socket and that's even more tedious. If you think about it even in real life you wouldn't hold spear the same way you hold a rifle, it just wouldn't work out so you'd have to change the way you hold it to something completely different. It's the same in the game world.

more ▼

answered Feb 14 '18 at 07:27 AM

avatar image

I Create Art!
317 17 18 29

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question