conveyor belt in box2d

Discuss issues specific to the Flash/AS3 port of Box2D
indusglyphs
Posts: 4
Joined: Fri Dec 18, 2009 11:15 pm
Location: India
Contact:

conveyor belt in box2d

Postby indusglyphs » Sat Dec 19, 2009 12:41 am

I want to create a conveyor belt with a real belt and wheel motion effect. I have found another thread with some example in this post viewtopic.php?f=3&t=2861 , which is a good example but i ned same effect with rotating wheel and a real belt. I have already built multiple circle with revolute joint and motor enambled but couldn't get a way to add a belt attached with this. Can anyone help me??

Warm Regards
Rajesh

Bingoboy
Posts: 73
Joined: Wed Dec 09, 2009 3:21 pm
Location: Denmark

Re: conveyor belt in box2d

Postby Bingoboy » Sat Dec 19, 2009 10:57 am

I've heard mention of 'ropes'. I no idea (well just a hint), if they actually act like ropes, but perhaps it's worth a serch or two.

Otherwise I'd consider 'just' hinging up many small bodies. So the conveyor belt would not exhibit a completely flexible belt-like behaviour, but be a band of connected plates, like the chains you put on car tires in the winter.

RunnerPack
Posts: 3
Joined: Mon Nov 02, 2009 7:00 pm

Re: conveyor belt in box2d

Postby RunnerPack » Fri Jan 01, 2010 6:31 pm

Why not just use a "friction motor" belt from that thread and do the wheels and links with graphics? It would save on physics overhead and could actually look better.

Or, you could use filtering to make the wheels and links ignore everything and just use them to animate the graphics for the "friction motor" belt. And, to make the wheels and links work, just add some teeth that can fit between the links on the belt.

Alvin32
Posts: 1
Joined: Fri Oct 30, 2015 4:21 am

Re: conveyor belt in box2d

Postby Alvin32 » Sun Nov 01, 2015 11:29 pm

I didn't get a reaction so here is the way I made my transport lines. I added a contact audience to plugins/box2d/game.js that contains a PreSolve capacity. At the point when the contact happens, If one of the contact focuses has a place with a transport, I apply a power to the focal point of mass of the other item.
A few focuses to note.
1) In plugins/box2d/game.js, include this.addContactListener(); to the loadLevel capacity. The addContactListener capacity is beneath.
2) For every substance, you will require a crash capacity
3) In the createBody capacity for every element include these properties:
a) this.body.userData = 'yourEntityName';
b) this.body.entity = this;
4) When making your transport in weltmeister, make a "dir" key with estimation of either "left" or "right" contingent upon which course you need your transport to roll.
Visit here


Return to “Flash”



Who is online

Users browsing this forum: No registered users and 4 guests