How do I fix the wire physics correctly

0 favourites
  • 10 posts
From the Asset Store
Simple yet very life-like rag doll made with Physics!
  • I'm using the R0J0hound example of rope to do something to my game.

    Here is the example of what i'm trying to do.

    https://dl.dropboxusercontent.com/u/659 ... ueba3.capx

    Problems:

    The electric point is not ajusted correctly to the final part of the wire.

    When i press R to restart the layout the physics are not working ¿? .

    Things to improve:

    The first part of the wire/rope have to be by default inamovable. Actually i put a "blue-squared" that if is touched set inamovable. Works but will be great know how to do it automatically.

  • Not using the most beautiful method, but working..

    I was able to pick the first and the last link created by choosing their group and lowest and highest UID numbers, Using that to spawn the electricity on the right spot and setting the immovable attribute..

    Fixed Capx

  • Change tickcount=0 to "on start of layout" to fix the Restart issue.

  • Change tickcount=0 to "on start of layout" to fix the Restart issue.

    Thanks, forgot about that part of his question..

    Changed it in the linked capx..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks guys!

    But if i create another chain_box not works equal. The same if i import this into the game or erase the actual and create other :S .

    I think this is for the UniqueID that appears "7". And only works on that.

    How i can create all the chain_boxes i want and this one create the size of the wire depending of the chain_box like now and some instace number that say "electric" , and 1 for put the electricty and 0 to normal. I thought create a rope/wire was more easy .

    Maybe there is any other rope example more easy to use that can be capable to create all that you want of any size,etc.. ? I looked in the forums but the only that works good was this one by R0J0hound .

    Edit: Also how can i erase the wire colisions? i want the swing and move beetween them without collision.

    Edit2: Scirra, create a Rope Behaviour please!

  • Indeed in this case I just used the group variable of the links (which is the uid of the chainbox) straight from the editor..

    Making it a function and calling the function with chainboxes.uid as parameter, would solve this..

    You'd only have to decide which chainboxes to attach electricity to and which to close at both ends..

  • Edit: Also how can i erase the wire colisions? i want the swing and move beetween them without collision.

    You mean disable collisions with a certain object?

    There's an action for that in the physics actions of every object..

  • Yes, i deactivate the collisions in the "properties" but when runs the "link" the sprite that creates the wire collides with other from others chain_boxes ¿? Or i'm doing something wrong ¿?

  • There's a difference between the physics engine and the normal engine..

    To disable physics collisions add an action in the event sheet to do so, like I said in my previous post..

    If you deactivate collisions in the properties you will not be able to check for overlap with the object and I'm guessing that is not what you want..

  • Ah! i don't know that, now worked! thanks!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)