files___ Posted January 16, 2017 Share Posted January 16, 2017 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 More sharing options...
phreaknation Posted January 16, 2017 Share Posted January 16, 2017 Have you seen the box2d chain example on the phaser website? Link to comment Share on other sites More sharing options...
files___ Posted January 17, 2017 Author Share Posted January 17, 2017 18 hours ago, phreaknation said: Have you seen the box2d chain example on the phaser website? Yep! But I need to get the effect without use plugin! Link to comment Share on other sites More sharing options...
phreaknation Posted January 17, 2017 Share Posted January 17, 2017 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 More sharing options...
files___ Posted January 17, 2017 Author Share Posted January 17, 2017 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! Link to comment Share on other sites More sharing options...
phreaknation Posted January 18, 2017 Share Posted January 18, 2017 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 More sharing options...
phreaknation Posted January 18, 2017 Share Posted January 18, 2017 Even with me being unable to help you I am in a way still help you indirectly by replying to your thread. Each time I do that it brings it back to the top so I honestly do wish you the best of luck with this. Link to comment Share on other sites More sharing options...
Recommended Posts