Sign in to follow this  

Phaser only going up Y axis

Recommended Posts

I am making a platformer game which I have implemented a weapon fire method to shoot some projectiles. I find that I am unable to fire these projectiles along the X axis rather than the Y. 


Here is a that section of the code within the create function:

	weapon =, 'bullet');
	weapon.bulletKillType = Phaser.Weapon.KILL_WORLD_BOUNDS;

and the code within create for the bullet:

    	weapon.bulletAngleOffset = 90; 
    	weapon.bulletSpeed = 300;
    	weapon.x = this.fNobleRanger.x;
    	weapon.y = this.fNobleRanger.y;;

The projectile is firing from my desired sprite, however the projectile shoots up and then falls back down. I want to shoot the projectile along the X axis instead.

Any tips?

I am silly. Found out about fireAngle, but to further this question: is it possible to have this item not be affected by game physic gravity?

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.