Throw an axe at a object, how? **SOLVED**

I have a scene where you can throw an axe at a target (in 1st person.)

Here is the setup:

  1. Camera
  2. Target object
  3. Axe behind the camera with script

Here is what I do:

  1. Instantiate the axe where it’s at
  2. I do a transform.LookAt(target.transform) call in the Axe’s script

Here’s the question…What do I do from here? I’ve tried putting transform.Translate(Vector3.forward*10) plus tranform.Rotate(5,0,0) but the axe flies in a huge arc. I’ve tried reversing the calls to call rotate first and then translate but no dice.

I just want it to spin around it’s center axis while it flies towards the target. Any idea how to get it to do this? I’m sure I’m just doing something stupid here but am not sure what I’m missing.

Any help is appreciated.

Thanks!

tell the axe to move to its target with Space.World

eg: transform.Translate(Speed*Time.deltaTime, 0, 0, Space.World)the rotation will act on its own local axis by default but you need to tell it to move in worldspace or Global or it will move relative to its local rotation

That works perfectly. Thanks!

No problem :twisted: