Quick question of an enemy shootin an object

There’s nothing wrong with using TransformPoint since it returns a Vector3.

Are you sure the origin point of both objects are the same? It sounds like your character’s origin is at their feet but the fireball’s origin is in the middle (or thereabouts). You might need to add some height to the fireball’s position when you spawn it:

fireball.transform.position = transform.TransformPoint (Vector3.forward * 1.5f) + new Vector3(0f, 2.0f, 0f); // change 2 to whatever the necessary height is for your character

Also, please use code tags going forward.

1 Like