OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Is there any way i can get both Matter and Arcade physic in Player object

  • Thread starter Thread starter Viễn Thông Điện tử
  • Start date Start date
V

Viễn Thông Điện tử

Guest
I tried to create a player object

Code:
export default class Player extends Phaser.Physics.Matter.Sprite {
    constructor(data) {
        let { scene, x, y, texture, frame } = data;
        super(scene.matter.world, x, y, texture, frame);
        this.scene.add.existing(this);

But then i need to move my character by mouse, not dragging him. Is there any solution for this?

<p>I tried to create a player object</p>
<pre><code>export default class Player extends Phaser.Physics.Matter.Sprite {
constructor(data) {
let { scene, x, y, texture, frame } = data;
super(scene.matter.world, x, y, texture, frame);
this.scene.add.existing(this);

</code></pre>
<p>But then i need to move my character by mouse, not dragging him. Is there any solution for this?</p>
 
Top