The hitbox doesn't have to be on the moving item itself. You can position it on the character so it's not animated.the main problem with the melee weapon is it uses a hit box, and it's really tricky to configure it to hit directly what's in front of the mouse, what I'd love is to have it work more like the half-life crowbar
Is there a tutorial for magic items?
Hi Justin,The hitbox doesn't have to be on the moving item itself. You can position it on the character so it's not animated.
So say I add the collider, wouldn't it then always be a part of my character, and conflict with movement and what not. Or if I set it as the collider for the melee weapon would it remove it unless equipped?You can add a new collider to the child of your character's rig, and then within the First/ThirdPersonMeleePerspectiveProperties you would point to that collider.
Hey Justin, I've done as you instructed however it wont let me set any collider to the hitboxes, except for the one that was part of the original knife model used to create the item.You should set the layer to the SubCharacter layer. This way the collider will not be used for collision detection.
It is a runtime melee weapon pick up. I've read about the object identifiers from your post, so would I set the object identifier on the collider with the sub character layer, then I'd put an id into there, but how do you then pick that to be your melee weapon hit box collider?You can use object identifiers if you are spawning the object at runtime:
Object Identifier - Opsive
Tthe Detect Object Ability Base ability can filter the found object based on a layer mask or an object identifier value. If an object identifier . . .opsive.com
If you aren't setting the item at runtime you can set the collider directly. The body item did this in the version prior to the latest (when everything was switched to runtime items).
You place that ID in the collider spot. You leave the collider field blank, select the element, and in the selected element you can specify the ID. In the latest version the Body item does this so it provides a good example.but how do you then pick that to be your melee weapon hit box collider?
ah brilliant, thanks JustinYou can either adjust the layermask for the raycasts that are causing the problem or change the collider layer.