we think about to use the Bepuphsics in a Simulation for industrial plants.
So for Example we want to Simulate Conveyor. They have, like in the Reality some motors on it maybe for
moving the complete Conveyer on the X-Axel ore Turn it around.
Also they have a motor to move the things they have on here back.
The PLC Tell use when the Motor needs to be active ore not and some of them also give a speed value for driving.
The Problem that we have now is that we maybe do something totaly wrong.
We createt Entitys and Move them with the for Example the LinearVelocity ore AngularVelocity.
But now the Problem is that all that stuff that the Conveyer has on his back is a little bit sliding first when the motor
starts to turn for example. We settet a Mass for it of 180kg and also the friction we try in 1. But still
the Stuff don't wan't stand still on it and doe the same rotation like the moving conveyer..
We realy wanted to use Bepu because it's realy some exceptionally great enrichment.
I build a little Demo to show my problem...
I realy thing that mabye the way i try to do it is wrong, and realy hope that somebody can help me...
THX..

Code: Select all
using BEPUphysics;
using BEPUphysics.Entities;
using BEPUphysics.Entities.Prefabs;
using BEPUphysics.Materials;
using BEPUphysicsDrawer.Models;
using BEPUutilities;
using BEPUphysics.BroadPhaseEntries.Events;
using BEPUphysics.BroadPhaseEntries.MobileCollidables;
using BEPUphysics.BroadPhaseEntries;
using BEPUphysics.NarrowPhaseSystems.Pairs;
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
namespace BEPUphysicsDemos.Demos
{
class FrictionTest : StandardDemo
{
private Box payload;
private Box conveyor;
/// <summary>
/// Constructs a new demo.
/// </summary>
/// <param name="game">Game owning this demo.</param>
public FrictionTest(DemosGame game)
: base(game)
{
Console.Clear();
Entity ground = new Box(new Vector3(0, 0, 0), 50f, 1f, 50f);
ground.CollisionInformation.Tag = "ground";
Space.Add(ground);
// Conveyer
conveyor = new Box(new Vector3(-5f, 0f, 10), 30, 2f, 10f);
conveyor.CollisionInformation.Tag = "conveyor_1";
conveyor.Material = new Material(1,1,0);
// Payload
payload = new Box(new Vector3(-14f, 6, 10), 10, 1f, 1f, 10);
payload.Material = new Material(0, 0, 0);
payload.CollisionInformation.Tag = "payload_1";
payload.Material = new Material(1,1,0);
Space.Add(payload);
Space.Add(conveyor);
game.Camera.Position = new Vector3(-8, 20, 35);
}
public override void Update(float dt)
{
base.Update(dt);
// Emulate Start Turn - (From the PLC later)
if (Game.KeyboardInput.IsKeyDown(Keys.Up))
conveyor.AngularVelocity = new Vector3(0, -1, 0);
// Emulate Start Turn + (From the PLC later)
if (Game.KeyboardInput.IsKeyDown(Keys.Down))
conveyor.AngularVelocity = new Vector3(0, 1,0);
// Emulate STOP Turn 0 (From the PLC later)
if (Game.KeyboardInput.IsKeyDown(Keys.Space))
conveyor.AngularVelocity = new Vector3(0, 0, 0);
}
/// <summary>
/// Gets the name of the simulation.
/// </summary>
public override string Name
{
get { return "FrictionTest"; }
}
}
}