Search found 4180 matches

by Norbo
Wed Nov 28, 2018 11:48 pm
Forum: Questions and Help
Topic: Collision event, normal direction
Replies: 2
Views: 47

Re: Collision event, normal direction

It's been long enough that I'm not 100% confident in this, but I believe all normals in v1 are calibrated to point from A to B in a pair. So if you have the body reference and the pair, you can conditionally negate the normal. It's possible that I didn't hold to this consistently in every pair type-...
by Norbo
Sat Nov 24, 2018 9:33 pm
Forum: Questions and Help
Topic: Static Group can get smaller but not bigger
Replies: 2
Views: 49

Re: Static Group can get smaller but not bigger

I'd assume this is related to the fact that StaticGroups do not automatically refit their acceleration hierarchies when children are changed. You should be able to fix the issue by calling: staticGroup.Shape.CollidableTree.Refit(); staticGroup.UpdateBoundingBox(); after you make modifications. You c...
by Norbo
Sat Oct 27, 2018 4:19 am
Forum: Questions and Help
Topic: Remove elastic when free fall
Replies: 3
Views: 96

Re: Remove elastic when free fall

Sorry, I'm not sure what you're asking about. All material combinations work as expected in the provided code snippet when run in the BEPUphysicsDemos. If you're asking about how the bounciness of two bodies interacts to create the collision response, the material property of each body is combined u...
by Norbo
Sat Oct 27, 2018 1:44 am
Forum: Questions and Help
Topic: Remove elastic when free fall
Replies: 3
Views: 96

Re: Remove elastic when free fall

The remaining elastic effect is caused by penetration correction. You can adjust its speed in the CollisionResponseSettings, but if you eliminate it entirely it means that objects won't separate from deep penetration. Other options include a) enable continuous collision detection (entity.PositionUpd...
by Norbo
Mon Oct 22, 2018 8:59 pm
Forum: Questions and Help
Topic: Prediction and Physics
Replies: 8
Views: 222

Re: Prediction and Physics

You can use Space.Update on both, yes; just be careful about the amount of integrated time. Each parameterless Space.Update call performs a time step equal to Space.TimeStepSettings.TimeStepDuration, so you'll need to take a number of time steps equal to the accumulated time divided by the time step...
by Norbo
Sun Oct 21, 2018 9:13 pm
Forum: Questions and Help
Topic: Prediction and Physics
Replies: 8
Views: 222

Re: Prediction and Physics

One option would be to combine the six substep inputs into a single representative update. This is approximate, but it'll be better than just teleporting things. Updating the physics at a higher rate would also be much more reliable. In fact, it's unlikely that a 10hz update rate will produce usable...
by Norbo
Sat Oct 20, 2018 10:11 pm
Forum: Questions and Help
Topic: Prediction and Physics
Replies: 8
Views: 222

Re: Prediction and Physics

Sorry, I'm having trouble understanding the details of the question. If you are asking about how this form of clientside prediction works, it typically involves: 1) The client sends a steady stream of input packets to the server at a high rate. 2) The client predicts the result of those inputs while...
by Norbo
Fri Oct 19, 2018 9:33 pm
Forum: Questions and Help
Topic: Prediction and Physics
Replies: 8
Views: 222

Re: Prediction and Physics

Setting the Position or Orientation properties of an entity is a form of teleportation. There is no velocity associated with the movement, so collision detection and contact constraints can't stop it. At best, penetration recovery will gradually correct the error, but this will be very squishy compa...
by Norbo
Wed Oct 17, 2018 12:03 am
Forum: Questions and Help
Topic: How to use for a 2D game?
Replies: 2
Views: 121

Re: How to use for a 2D game?

There is no '2d mode', so you have to somehow control objects so that they sit on a 2d plane and only rotate around one axis. The easiest approach is setting two of the rows of the local inverse inertia tensor in every dynamic body to all zeroes. That gives the body effectively infinite inertia arou...
by Norbo
Tue Oct 16, 2018 11:55 pm
Forum: Questions and Help
Topic: Set Orientation from other point
Replies: 5
Views: 196

Re: Set Orientation from other point

The LocalPosition serves as a local offset from the center of mass to the center of the collision shape. In other words, collisionShapeLocation = LocalPosition * entity.Orientation + entity.Position So yes, that can be used to make the collision shape rotate around a point that is not the same as th...
by Norbo
Mon Oct 15, 2018 11:26 pm
Forum: Questions and Help
Topic: Set Orientation from other point
Replies: 5
Views: 196

Re: Set Orientation from other point

If you want to rotate an object that is offset from the origin of rotation, you need to rotate the offset. offset = previousCenterOfBody - centerOfRotation rotatedOffset = offset * rotation newCenterOfBody = centerOfRotation + rotatedOffset newOrientation = orientation * rotation More robustly, if y...
by Norbo
Wed Oct 10, 2018 11:03 pm
Forum: Questions and Help
Topic: Rotate Gun to target
Replies: 1
Views: 104

Re: Rotate Gun to target

There are a variety of ways to handle this depending on the kind of behavior you want. There is no single 'correct' way to point the gun, both in terms of math (an infinite number of valid rotations) and in terms of gameplay design (maybe you want some animations or something). This also doesn't sou...
by Norbo
Wed Oct 10, 2018 10:26 pm
Forum: Questions and Help
Topic: Unexplainable Framedrop [explainable now]
Replies: 7
Views: 213

Re: Unexplainable Framedrop

I didn't actually get it running (environmental setup issues), but it looks like it's still just a matter of tons of triangles being tested. In the test, the box is 100 units across and the terrain uses the default scaling of 1, so given the flat terrain, the box is going to be tested against at lea...
by Norbo
Tue Oct 09, 2018 10:24 pm
Forum: Questions and Help
Topic: Unexplainable Framedrop [explainable now]
Replies: 7
Views: 213

Re: Unexplainable Framedrop

what would happen if a dynamic entity would go "inside" an another entity? For example if I would drop the cube so fast, that it gets inside my terrain to half. Would this cause a performance issue for the engine to "push" the box to outside again? The most significant change would be the tendency ...
by Norbo
Mon Oct 08, 2018 7:15 pm
Forum: Questions and Help
Topic: Unexplainable Framedrop [explainable now]
Replies: 7
Views: 213

Re: Unexplainable Framedrop

It's hard to say without seeing a repro directly, but I would assume it's related to testing a huge number of triangles. For example, if the terrain is completely flat and has triangles 1 unit wide, dropping a 400x400 box on top of it would cause at least 400 * 400 * 2 = 320000 box-triangle tests. I...