Jump to content

Strange problem in 2.0.3 and 2.0.4 whit contactMaterial


AlexArroyoDuque
 Share

Recommended Posts

Hi gamer!
I am upgrading from version 2.0.2. 
I tried version 2.0.4 and it seems that everything was fine until the player has collided with a material that makes a bounce. 
In version 2.0.2 worked perfectly. 
In 2.0.3 and 2.0.4 a strange thing happens. All sprites move to (0,0) and the game crashes, no error in console. 
The contact material is as follows:
 
    this.game.physics.p2.createContactMaterial(this.playerMaterial, this.material2, {
        friction: 0, // Friction to use in the contact of these two materials.
        restitution: 1.1, // Restitution (i.e. how bouncy it is!) to use in the contact of these two materials.
        stiffness: 1e7, // Stiffness of the resulting ContactEquation that this ContactMaterial generate.
        relaxation: 0, // Relaxation of the resulting ContactEquation that this ContactMaterial generate.
        frictionStiffness: 1e7, // Stiffness of the resulting FrictionEquation that this ContactMaterial generate.
        frictionRelaxation: 10, // Relaxation of the resulting FrictionEquation that this ContactMaterial generate.
        surfaceVelocity: 0.0
    });

 

Any idea what happens? The ruling is impossible to upgrade ... 
 
A greeting.
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...