beikul's Recent Forum Activity

  • Sorry for the slow reply and thank-you very much for posting that capx.

    I can see that you've added an additional test against the player's physics velocity being zero before setting it with the stored value. I can't really see why this is necessary (some quirk of the physics engine perhaps?) but I'm happy it's working.

  • Thanks for the suggestion - I had already tried moving the events around but it didn't seem to have any effect.

  • Hi,

    I want to be able to simulate the 'wrap' behaviour for an object that is being moved using a physics force. I understand that teleporting objects by changing their position directly can cause problems with the physics routines so I am trying the following approach:

    • when the object leaves the layout then

    - store its current physics velocity in instance variables

    - set its physics velocity to zero

    - teleport the object to the other side of the layout by setting its position

    • if the object has a stored physics velocity then

    - set its physics velocity to the stored value

    - set the stored value to zero

    The problem I have is that including the step in bold above causes the physics velocity to be set to zero after the object has been teleported for some reason. If I disable this step then the object gets the correct velocity following the teleport but the event will keep firing and restoring the stored value.

    Theres a simple capx showing my problem here.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Is there any chance you could post your capx or the images again somewhere? I'm interested to see how you resolved this.

    Thanks.

beikul's avatar

beikul

Member since 12 Jun, 2012

None one is following beikul yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies