Jump to content

Phaser.Weapon: Have a bullet track a sprite's X position AFTER it is fired


Disease
 Share

Recommended Posts

Title says it all really. I'm looking for the best way to have a bullet continue to have the same X value of the sprite the weapon is associated with AFTER it has been fired. I'm trying to make a DoDonPachi style beam that moves left and right with the player and it currently looks bad if the entire beam doesn't move with the player. Right now the best I can think of is when the player moves left or right, look for any beam bullets that exist and move them left and right as much as the player is moving. This feels a little ugly and inefficient though. Am I just splitting hairs or engaging in premature optimization? 

Link to comment
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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...