- Home /
Shooting an Arrow (Blender Model issue?)
I went through the process of creating my own model for an Arrow inside blender (not a big deal, but something I'm in the process of learning.)
I've went into Unity and created a script that allows me to shoot a prefab whenever I press the mouse button. If I create a Cube, add a rigidbody to it, and then assign the cube as my projectile - it correctly shoots out cubes for me and seems to work fine..
When I assign my Arrow prefab (also has a rigidbody) as the projectile, it instantiates the prefab whenever I press the mouse button - but it appears to be creating them somewhere else (ex, they are falling off of the map instead of shooting out in front of the camera like the cubes)... No code changes whatsoever, simply re-assigning the prefab to use...
I'm sure I'm missing something simple, but I don't know what. I scaled down the model upon import to .001 to make it about the correct size - not sure if that could cause any problems.
[UPDATE] I finally figured out the cause of my problem. Unity was attempting to import an animation (even though I hadn't created one...) and it kept setting the object's position to 0,0,0...
By telling Unity to not import an animation for my asset, it started working exactly how I thought it should..
Answer by Owen-Reynolds · Jun 13, 2012 at 05:31 PM
Check the (0,0,0) for the model. In Blender, go to Edit mode and look for the orange(?) dot, or select one vert and read the x/y/z. It should be somewhere on the arrow, with x/y coords all very close to 0 (should face +Z.)
Or, in Unity, set its position to a known location and see where the model is.
What can happen is, during modelling, you mistakenly grab all the verts and move them off to the side, instead of grabbing it in Object mode to do a big move. The same thing can happen with animation -- to shift the model, you grab the root bone, which merely "animates" it out of the way.
Plus, when you scale it by a lot, sometimes a small off-center of a picot point can be blown up to be way off (doesn't completely make sense -- they should all scale the same -- but I've seen it.)
Your answer
Follow this Question
Related Questions
Getting Blender scale to correspond with Unity scale 1 Answer
Blender to Unity Animations 1 Answer
Blender model import 2 Answers