Conveyor Belt
-
- Posts: 5
- Joined: Thu Dec 15, 2011 2:10 pm
Conveyor Belt
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.
Re: Conveyor Belt
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.
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.
-
- Posts: 5
- Joined: Thu Dec 15, 2011 2:10 pm
Re: Conveyor Belt
Thanks for the quick response, Norbo. Your second suggestion is intriguing. I will give that a shot.
-
- Posts: 5
- Joined: Thu Dec 15, 2011 2:10 pm
Re: Conveyor Belt
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)
Re: Conveyor Belt
I can't tell you how awesome I think bepu is (sans the name, i think the name is a little weird)
Re: Conveyor Belt
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!