Search found 4281 matches

by Norbo
Sat Jun 15, 2019 5:50 pm
Forum: Questions and Help
Topic: Velocity damping
Replies: 2
Views: 20

Re: Velocity damping

OneBodyAngularMotor with a target velocity of zero sounds like it would do the trick. Notably, the "softness" parameter in MotorSettings is equivalent to the inverse damping constant. For cases where the door is attached to another body and you want the damping forces to correctly propagate, the Ang...
by Norbo
Fri Jun 14, 2019 9:53 pm
Forum: Questions and Help
Topic: Bepu v2 Character Controllers
Replies: 37
Views: 393

Re: Bepu v2 Character Controllers

I added a little example to the CharacterDemo showing one possible implementation: https://github.com/bepu/bepuphysics2/commit/3b790c292bd63567e919e0a0bcfc2f67376d5c73 (The pseudocode snippet I posted earlier had a sleepygoof- the target velocity should not be clamped against zero, the change should...
by Norbo
Fri Jun 14, 2019 9:09 pm
Forum: Questions and Help
Topic: OneBodyLinearServo does not seem to pull Body all the way to Target
Replies: 2
Views: 27

Re: OneBodyLinearServo does not seem to pull Body all the way to Target

For greater stiffness, you'll need to use a higher frequency on the SpringSettings. Try using spring settings of 30hz frequency and a damping ratio of 1. Higher frequencies make the spring more rigid, but be careful about pushing it higher than ~half your timestepping rate. (For example, a time step...
by Norbo
Tue Jun 11, 2019 11:30 pm
Forum: Questions and Help
Topic: [Bepu2] Belt conveyor
Replies: 4
Views: 42

Re: [Bepu2] Belt conveyor

You could do both pose and velocity in PositionFirstTimestepper.BeforeCollisionDetection. In the PositionFirstTimestepper, velocities and poses are integrated up front, so if you set the pose there it'll stick until the next frame. If using the PositionLastTimestepper instead of the PositionFirstTim...
by Norbo
Tue Jun 11, 2019 10:34 pm
Forum: Questions and Help
Topic: [Bepu2] Belt conveyor
Replies: 4
Views: 42

Re: [Bepu2] Belt conveyor

Any time the conveyor restarts, you could use Simulation.Awakener.AwakenBody to force it awake. Any bodies on the conveyor will be forced awake with it. By the way, unless the majority of bodies are conveyor belts, it would probably be simpler and faster to directly modify velocity and pose of the c...
by Norbo
Mon Jun 10, 2019 5:17 am
Forum: Questions and Help
Topic: Bepu v2 Character Controllers
Replies: 37
Views: 393

Re: Bepu v2 Character Controllers

In terms of air control though, I'm a little stuck. I don't want to overwrite any velocity the character receives from other sources (like an explosion for example), but adding a certain velocity to the existing one will result in drastic accelerations. Is using motion constraints the only solution...
by Norbo
Fri Jun 07, 2019 12:18 am
Forum: Questions and Help
Topic: Bepu v2 Character Controllers
Replies: 37
Views: 393

Re: Bepu v2 Character Controllers

Is there a property I can access to quickly check if the character is standing on something? CharacterController.Supported for a boolean, CharacterController.Support for the collidable it's standing on. The actual application of the damping implementation would happen in the IntegrateVelocity metho...
by Norbo
Thu Jun 06, 2019 10:43 pm
Forum: Questions and Help
Topic: how could i know if it run correctly with linux server no graphic
Replies: 9
Views: 116

Re: how could i know if it run correctly with linux server no graphic

The SimpleSelfContainedDemo might be helpful for that purpose- it strips away all demos infrastructure, leaving a single file that can run a simulation. You could take that and place it into a console application (plus the library dependencies, of course) and it would work without any graphical depe...
by Norbo
Wed Jun 05, 2019 11:04 pm
Forum: Questions and Help
Topic: Bepu v2 Character Controllers
Replies: 37
Views: 393

Re: Bepu v2 Character Controllers

I went ahead and added some BodyReference impulse helpers (and fixed another character bug): https://github.com/bepu/bepuphysics2/co ... 03a0adcc90
by Norbo
Wed Jun 05, 2019 10:00 pm
Forum: Questions and Help
Topic: Bepu v2 Character Controllers
Replies: 37
Views: 393

Re: Bepu v2 Character Controllers

I noticed that there's no air control. Is there a built-in way to implement this? Nope, that's one of the features I decided not to implement for the demos. You could modify the CharacterControllers to create a StaticCharacterMotionConstraint while the character is in the air and give it appropriat...
by Norbo
Wed Jun 05, 2019 9:25 pm
Forum: Questions and Help
Topic: how could i know if it run correctly with linux server no graphic
Replies: 9
Views: 116

Re: how could i know if it run correctly with linux server no graphic

I'm not sure I understand the question. Physics and graphics are completely independent; the physics do not depend on any graphical libraries or concepts. If you want to use the physics in a serverlike use case, then you probably would not include any graphics. If you're asking specifically about th...
by Norbo
Tue Jun 04, 2019 10:22 pm
Forum: Questions and Help
Topic: how could i know if it run correctly with linux server no graphic
Replies: 9
Views: 116

Re: how could i know if it run correctly with linux server no graphic

AllowContactGeneration(CollidableReference a, CollidableReference b) runs for every overlapping AABB pair found by the broad phase. It tells the narrow phase which pairs to actually work on. If you want information about actual collisions (and their associated contacts), you would need to use the Co...
by Norbo
Mon Jun 03, 2019 6:12 pm
Forum: Questions and Help
Topic: Orientation bepu1 to bepu2
Replies: 1
Views: 36

Re: Orientation bepu1 to bepu2

It's had some minor changes, but nothing significant. BepuUtilities.Quaternion still has functions like Concatenate, CreateFromRotationMatrix, Slerp, and so on. I avoided including that scale of change in the v1->v2 page since it would become hundreds of pages long :)
by Norbo
Sun Jun 02, 2019 10:34 pm
Forum: Questions and Help
Topic: Help with excluding a selection of Bodies from RayCast
Replies: 3
Views: 55

Re: Help with excluding a selection of Bodies from RayCast

Is this the correct/optimal way to do this, or does anyone know of another way to do this? That's a correct way to do it, yup. Another approach would be to make use of the CollidableReference's Packed field which packs the dynamic/kinematic/static type into the upper 2 bits. Since dynamic body coll...
by Norbo
Sun Jun 02, 2019 12:39 am
Forum: Questions and Help
Topic: Properly removing a body from the simulation (v2)
Replies: 9
Views: 130

Re: Properly removing a body from the simulation (v2)

Does BodyReference.Exists cause errors if the body has been removed? I was using it on a line which was part of the error's stack trace...I thought it would've simply returned false, not caused problems (or maybe it appears to cause problems, but doesn't actually)? It should just return false if th...