Jump to content

Search the Community

Showing results for tags 'comet'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Hello, First post there, little bit nervous I am currently developing a little game using PIXI, but got stucked with pixi-particle related problem. Link to game As anyone can see my player 'spells' aka particles, are changing their respective position with their emitter (emitter and particles are moving). What i want to achive is comet-like animation (like when mousemoving, using Pixi-particles-editor). Let's proceed to the code. import { ParticleContainer, loader } from 'pixi.js'; import { Emitter } from 'pixi-particles'; import { Spellbook as SPELLCONFIG } from './SpellTypes/Spellbook'; export default class Spell extends ParticleContainer { constructor(name, player) { super(); super.setProperties({ scale: true, position: true, rotation: true, uvs: true, alpha: true }); this.name = name; this.playerName = player.name; this.spellEmitter = new Emitter(this, loader.resources.basicparticle.texture, SPELLCONFIG[name].emitter); this.spellEmitter.updateOwnerPos(player.x, player.y); this.direction = player.rotation; this.velocity = SPELLCONFIG[name].velocity; } update(delta) { const newX = this.spellEmitter.ownerPos.x + Math.sin(this.direction) * this.velocity; const newY = this.spellEmitter.ownerPos.y - Math.cos(this.direction) * this.velocity; this.spellEmitter.updateOwnerPos(newX, newY); this.spellEmitter.update(delta); } } Was trying to add resetTrackingPosition() before updateOwnerPosition() after analyzing pixi-particles example code. (and dozen of other solutions, but nothings worked as i intended) Imho, theres something deeply misunderstood by me about pixi-particles system, so i have to ask here Oh, whole game code can be found at my github project page. (Folder Spells is the one with particles code) There are spells named "avada", "bariero", "stupefy" with their configuration (precisely - emitter settings) files. PS. i am aware of particleContainers not being destroyed. PS2. Sorry for my English, it's not my native. But tryin my best
×
×
  • Create New...