'A simple component for making world props.
Simply add "World prop" as a component to any gameobject
It will add the needed components (animator, fixed joint, rigidbody) and set their settings and then remove itself.
FAQ:
Q: Unity crashes when "dropping in as a component"
A: Use "Add component" Button under the gameobject! I didn't foresee the fact dragging and dropping would crash since the component deletes itself.
Q: Why does this work?
A: Due to a change in either how vrchat or unity 2017 handels position / motion, root motion is not applied to childs of an avatar by default. However we can force it by doing an animator with rootmotion.
Q: Do i need the "EmptyController" Animator Controller?
A: No but you DO NEED a controller in the animator, and the animator MUST be set to apply root motion.
Q: My world prop is spazzing out.
A: Make sure all colliders are set to be a trigger ("Is trigger" is checked).
Credits to the method go to Lindesu for first discovering it.
'
Thanks for the feedback! I wasn't aware it crashed unity if you dragged and dropped it in. I figured everyone would add it like any other component (through the "Add component" button) where it works just fine. Also to address @lindesu 's question on the existence of this tool, this script / component was just meant to quickly configure the components needed, you can argue a prefab is faster but i personally find it more convenient to just add a component then having to find a prefab in my file explorer.
I was the one who came up with this particular method, which was based on a previous method that involved an entire humanoid avatar. Just tore everything down until it broke, because it didn't make sense to me why you needed the entire humanoid. Anyway, this does indeed crash unity when you drop the script into a component. I'm not so sure you need a script for this, in the first place! It's just a normal world fixed joint with a blank animator on it, and root motion checked. You could make a prefab of the world fixed joint object, as configured, and I think that would be more understandable for people
Comments
Porque o objeto fica preso no spawn do personagem ?
0Thanks for the feedback! I wasn't aware it crashed unity if you dragged and dropped it in. I figured everyone would add it like any other component (through the "Add component" button) where it works just fine.
0Also to address @lindesu 's question on the existence of this tool, this script / component was just meant to quickly configure the components needed, you can argue a prefab is faster but i personally find it more convenient to just add a component then having to find a prefab in my file explorer.
I was the one who came up with this particular method, which was based on a previous method that involved an entire humanoid avatar. Just tore everything down until it broke, because it didn't make sense to me why you needed the entire humanoid.
0Anyway, this does indeed crash unity when you drop the script into a component. I'm not so sure you need a script for this, in the first place! It's just a normal world fixed joint with a blank animator on it, and root motion checked. You could make a prefab of the world fixed joint object, as configured, and I think that would be more understandable for people
keeps crashing unity every time i drop the script in the component area
0