I am trying to spawn a Sprite as a Projectile. I’ve done this before with an Archer shooting an arrow along the X axis in both directions.
Now I am trying to change it to the Z-axis and I am having some problems. I can definitively hear that the projectile is spawned and I can see it too in the World Outliner.
I even played a sound when the projectile hit a wall, so it does spawn. But I can’t see it for some reason. I am in the Front Perspective when the game plays. My Character’s coordinates are:
- X 930
- Y 1
- Z -330
Everything else follows similar coordinates, except for the main camera showing the scene located at:
- X 929
- Y 4
- Z 820
My Background is placed at
- X 930
- Y -800
- Z 1120
So everything depends on the Y axis being 1 for everything that needs to interact with the player sprite. When I use my Fire
function, it’s set up like so:
http://puu.sh/hdUFS/6a53f4550d.jpg
The Make Transform
node looks like this:
http://puu.sh/hdUJs/537341944c.jpg
The Sprite
variable refers to the Player Sprite.
I found out that the projectiles were too small to see, so I made them bigger. But as soon as they spawn they turn invisible. You see them for a split second. Then if I pause the game and choose the projectile in the world outliner, I can suddenly see it until it leaves the screen and self-destructs. But not before I do this.
And if I play the game in a preview window, the projectiles show up just as they should??