Jump to content

Phaser - Bound two element


files___
 Share

Recommended Posts

Hi folks, 

I'm new on Phaser and I'm trying to do my best to learn. I was wondering how can I make bound two element. 

http://test.xapient.net/phaser/ALL/ropes.html

I need to attach a box to the end of that rope (for example) and I want my box moves naturally as it's attached to the rope.

Could someone explain me the process to get that or maybe some tutorial which helps me to get that?!
Thanks to everybody! : ]


P.S. Sorry for my bad english!

Link to comment
Share on other sites

Then you will need to recreate what the plugin does. There's a reason why there's a plugin for that. There is a lot of physics and programming involved. If you wish to go down this path you should research game physics.

Question though, why are you against using a plugin? Why reinvent the wheel?

Link to comment
Share on other sites

Mmh, I need to do that with no plugin (boss doesn't want).
Anyway, I'm new in Phaser so I'm not able to figure out how can I get that effect. (It's like I have a rope attached on the top of my game.world, and it swings from left to right slowly with the box in the same time, and then together stop in the middle naturally)

In the image below I simulate the effect. Each box is the step of the movement.

P.S. Sorry again for my bad english and thank you for the help!

 

effect-rope.png

Link to comment
Share on other sites

There is no simple way to do this you're going to have to write an entire physics plugin. There is just no simple or easy way that someone could write this for you and I Forum. There's just too much physics and logic involved which is why it is not prepackaged with phaser and is a plugin for phaser. And since no one else is responding I'm pretty sure they feel very similar. I am not trying to be mean or rude or anything like that as I really wish I could help you but I do not want to rewrite an entire plugin 11 Rd exists for that. Personally I would go back to your boss and tell him that he needs to rethink not using plugins when he's already using a framework on top of a Library. Unless he is wanting to test your skills. And in that case you are going up against a pretty hefty task.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...