So basically, I’m trying to reproduce the bow and arrow example you have, and I’m having a problem where when I try to use rigidbody.applyImpulse(), it doesn’t work. In the console, it tells me “rigidbody doesn’t exist, cannot apply impulse”. I even saw that in your code you have a comment about this:
// workaround Rigidbody not yet created in the physics engine (it gets created in onEnable)
await delayForFrames(1);
But it still doesn’t work. I also tried using an arrow from the Unity Store, and I have the same problem. I tried changing the insantiate objetct to a cube, and it works perfectly fine .
Hi, please provide more information about your scene setup (which materials, please show the hierarchy in Unity etc) and how you reference the Rigidbody. Otherwise it’s not possible to help you.
Make sure your object is actually included in the export (e.g. not tagged with EditorOnly)
Is it possible that your arrow prefab is disabled / inactive in Unity so it gets instantiated but “visible” is still false? Or some part of the child hierarchy?
Is the arrow a real “prefab” in Unity or is it part of your scene?
So right now I have it active in the scene and is both is a real prefab en unity and that prefab is part of my scene . i can see the arrow it gets instantited but the rigidbody.aplyImpulse doenst work the arrow stay in the scene . I’m debugging, and it shows that the rigid body exists