Conveyor Belt

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
greengiant83
Posts: 5
Joined: Thu Dec 15, 2011 2:10 pm

Conveyor Belt

Post by greengiant83 »

How would I go about settings up a conveyor belt? Basically i want to have a surface that when objects are on it they moved along at a constant speed in a specific direction.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Conveyor Belt

Post by Norbo »

One option would be to remove friction between the objects, as in your other thread (http://www.bepu-games.com/forum/viewtop ... f=4&t=1488), or by using an event handler to remove the friction as in the BEPUphysicsDemos CharacterController.

Once the friction is gone, you have full control over motion tangential to the surface. You could then push objects around which are touching the conveyor belt's surface. The sideways motion would have to be stopped manually though.

Another easier (but arguably hackier) option is to take advantage of friction to do the work for you. If the belt is a kinematic entity, you can set its velocity to move in the direction you'd like the conveyor belt to push. After every time step, you'll need to set the position of the conveyor back to its original location to prevent it from flying through your map. The end effect will be that any objects placed on the top of the conveyor will be pushed in the direction of the velocity. Note that bumping up against any other surface of the object will do the exact same thing. If you use this method, avoid allowing objects to come into contact with the sides or bottom of the conveyor belt.
greengiant83
Posts: 5
Joined: Thu Dec 15, 2011 2:10 pm

Re: Conveyor Belt

Post by greengiant83 »

Thanks for the quick response, Norbo. Your second suggestion is intriguing. I will give that a shot.
greengiant83
Posts: 5
Joined: Thu Dec 15, 2011 2:10 pm

Re: Conveyor Belt

Post by greengiant83 »

That works like a charm. I can't tell you how awesome I think bepu is (sans the name, i think the name is a little weird)
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Conveyor Belt

Post by Norbo »

I can't tell you how awesome I think bepu is (sans the name, i think the name is a little weird)
:D
Fe_Yoshi
Posts: 397
Joined: Tue Jul 04, 2006 5:05 pm
Location: New Tower!

Re: Conveyor Belt

Post by Fe_Yoshi »

name is best part bEST pART
It's simple, just take the hydraulic phase ship emulator and attach it to the photon particle emitter, BAM, new tower!
Post Reply