Weapon not keeping transform in playmode

Klin

Member
Hi,
I made a shootable weapon.
I set the transform in playmode and copy/paste it back in editmode (as explained in the shootable/melee videos).

But when I hit play again, the transform resets to zero.

This is NOT a pickup item and does not happen with other weapons I've made.

Deactivating everything in the item itself (like animator or renderer) doesn't help.
When I set the transforms of the child "root", it also get reset to zero. The Fire Point, Muzzle Flash and Shell Eject Point keep their positions when I hit play, as well as the "Items" object (which defines the slot).
All item settings are at default and look very similiar to items that work.

Any ideas here where to look?

1625052136706.png
1625052176561.png

Thanks!
 
Last edited:
Hm, do you have any custom animations running on the bow? Is the bow object itself an instance of a prefab? Have you edited the spring position settings for the item?
 
Hm, do you have any custom animations running on the bow? Is the bow object itself an instance of a prefab? Have you edited the spring position settings for the item?
Ahh ok I deactivated the animator to test that but now I figured that deactivating it won't solve the repositioning, only removing the animator controller (or animation), then it won't reset. I guess the UCC is overwriting the deactivation?

Sorry but how would I tell the animator to not use root motion then?

Thanks.

1625142840813.png
 
The items do not use root motion from the animator. It will however reposition the item based on the animation and in order to change that you'll need a different animation.
 
Top