## Search found 99 matches

Sat Apr 25, 2020 12:45 am
Forum: Questions and Help
Topic: Bepu v2 Character Controllers
Replies: 89
Views: 222917

### Re: Bepu v2 Character Controllers

So upon some further investigation, it turns out that a Rigidbody in Unity does actually move with whatever it's standing on. The problem was just that my player movement code was overriding the player body's velocity without me realizing it (although it's super obvious in hindsight). I would assume...
Wed Apr 22, 2020 11:36 pm
Forum: Questions and Help
Topic: Bepu v2 Character Controllers
Replies: 89
Views: 222917

### Re: Bepu v2 Character Controllers

In principle, you can do the same thing in unity, although solving the constraint does require doing a bit of math in the fully general case of dynamic supports capable of rotation. Hmm alright—that doesn't exactly sound trivial to implement, so I think I'll try to find a different solution...altho...
Wed Apr 22, 2020 3:09 am
Forum: Questions and Help
Topic: Bepu v2 Character Controllers
Replies: 89
Views: 222917

### Re: Bepu v2 Character Controllers

Hey, I just had another question about how the character controller works, specifically when it comes to standing on moving objects. I've been writing a RigidBody player controller in Unity recently, and one thing I've noticed is that when the player stands on another RigidBody that's moving, it wil...
Fri Feb 14, 2020 12:16 am
Forum: Questions and Help
Topic: Rotating parts of compound body
Replies: 32
Views: 18024

### Re: Rotating parts of compound body

Sounds like I have a lot to look into over the next few weeks! 1) Add an AngularAxisMotor with a zero target velocity to resist attempts to rotate it. It'll behave like friction, so only sufficiently large torques will rotate it. A good option if you want to maintain physical consistency, where play...
Thu Feb 13, 2020 1:45 am
Forum: Questions and Help
Topic: Rotating parts of compound body
Replies: 32
Views: 18024

### Re: Rotating parts of compound body

Just a bit of a follow-up question: is there anything wrong with storing an instance of a SubgroupCollisionFilter and reusing that for multiple physics bodies? Would you recommend that or not? If I don't reuse filters, couldn't I theoretically have two bodies that belong to the same group and subgro...
Fri Jan 24, 2020 12:01 am
Forum: Questions and Help
Topic: Rotating parts of compound body
Replies: 32
Views: 18024

### Re: Rotating parts of compound body

The collision is being filtered out. SubgroupCollisionFilters are being used in AllowContactGeneration, but the filters are never assigned to anything. The value they happen to have causes the callback to return false. So how can I fix this? Is there a demo I can look at to see what I should be ass...
Wed Jan 22, 2020 6:37 am
Forum: Questions and Help
Topic: Rotating parts of compound body
Replies: 32
Views: 18024

### Re: Rotating parts of compound body

So after some more investigating, I've finally decided to give up and just try and reproduce it. Here's the reproduction in a relatively bare bones console app. I did however notice that if I increase the capstan's mass from 1 to something like 10, the tornadoship makes a reappearance. I'm guessing ...
Fri Jan 17, 2020 12:09 am
Forum: Questions and Help
Topic: Rotating parts of compound body
Replies: 32
Views: 18024

### Re: Rotating parts of compound body

Some demos callbacks have collision filtering, some don't. If the callbacks all return only true, you can be sure that it's unrelated. I just checked and I'm using the NarrowPhaseCallbacks from the character demo—the only method that doesn't return true is this one: [MethodImpl(MethodImplOptions.Ag...
Thu Jan 16, 2020 2:24 am
Forum: Questions and Help
Topic: Rotating parts of compound body
Replies: 32
Views: 18024

### Re: Rotating parts of compound body

You would have had to implement some form of collision filtering in the INarrowphaseCallbacks by returning false from the relevant callbacks. There's nothing built in. I guess I should clarify: I haven't done anything custom—I simply copied the NarrowphaseCallbacks from one of the demos (can't reme...
Thu Jan 16, 2020 12:33 am
Forum: Questions and Help
Topic: Rotating parts of compound body
Replies: 32
Views: 18024

### Re: Rotating parts of compound body

First guess would be some kind of collision filter going haywire. I haven't set anything up with collision filtering (besides removing cannonballs from the simulation when they hit another body)—how can I find out if this is the culprit? If it's the demos dynamic character controller, it may be wor...
Wed Jan 15, 2020 1:42 am
Forum: Questions and Help
Topic: Rotating parts of compound body
Replies: 32
Views: 18024

### Re: Rotating parts of compound body

So I've adjusted the weights—each child shape now has a weight of 1, with the inertia still being scaled as before. The spinning has stopped, and the ship still seems to behave as if it had a mass of 500. The capstan is now held in place in the desired position, however , I can simply walk through i...
Wed Jan 15, 2020 12:49 am
Forum: Questions and Help
Topic: Rotating parts of compound body
Replies: 32
Views: 18024

### Re: Rotating parts of compound body

Are the child shape weights fairly uniform, so that the inertia tensor is reasonable for the actual size of the boat? I haven't changed the weights, so that could be the issue. Just to clarify, do the weights actually affect the final mass of the compound (if I'm scaling the inertia), or do they on...
Tue Jan 14, 2020 11:25 pm
Forum: Questions and Help
Topic: Rotating parts of compound body
Replies: 32
Views: 18024

### Re: Rotating parts of compound body

I just implemented the inertia scaling like you said, with my target mass being 500. Unfortunately, the ship is still spinning... compoundBuilder.BuildDynamicCompound(out Buffer<CompoundChild> _colliderChildren, out BodyInertia _shipInertia); float _inverseInertiaScale = 1f / (500f * _shipInertia.In...
Tue Jan 14, 2020 9:56 pm
Forum: Questions and Help
Topic: Rotating parts of compound body
Replies: 32
Views: 18024

### Re: Rotating parts of compound body

Norbo wrote:
Tue Jan 14, 2020 9:38 pm
It could also be that the goal position of the capstan is partially embedded in the ship.
I've double checked, and based on the capstan's position and dimensions, it shouldn't be embedded in the ship...it should actually be hovering about 0.1 units above the deck
Tue Jan 14, 2020 9:35 pm
Forum: Questions and Help
Topic: Rotating parts of compound body
Replies: 32
Views: 18024

### Re: Rotating parts of compound body

Provided you want the anchor of the constraint to be at the capstan's center of mass, and assuming the ship is body A, then LocalOffsetA would be <0, 1, 1> and LocalOffsetB would be <0, 0, 0>. Hmm...so that would mean that initially I had it set it up correctly, but that resulted in the ship spinni...