Search found 19 matches

by b1fg2
Thu Dec 03, 2020 6:48 am
Forum: Questions and Help
Topic: [V2] Remove body issue
Replies: 2
Views: 20722

Re: [V2] Remove body issue

I think I found the problem. the scenario is I try to repeatedly spawn a body and destroy it after 2 seconds. While at the same time the PoseIntegratorCallbacks IntegrateVelocity method is processed in another thread. And the New body handle reuses the handle int. Any idea to avoid it?
by b1fg2
Thu Dec 03, 2020 4:21 am
Forum: Questions and Help
Topic: [V2] Remove body issue
Replies: 2
Views: 20722

[V2] Remove body issue

i try to remove the body from the simulation and unregister from contactEvent. But the problem is i still get the body handle from the integrateVelocity function after i remove the body from simulation. Am i doing right? im using the 2.2 release version IntegrateVelocity(int handle, in RigidPose pos...
by b1fg2
Sat Nov 28, 2020 12:28 am
Forum: Questions and Help
Topic: [V2] Any sample for forcefield?
Replies: 1
Views: 19680

[V2] Any sample for forcefield?

is there any sample for forcefield simulation? E.g a forcefield volume will affect any object that inside the volume.
by b1fg2
Wed Feb 19, 2020 12:09 pm
Forum: Questions and Help
Topic: V2 Constraits freeze axis question
Replies: 1
Views: 15620

V2 Constraits freeze axis question

how do i fixed the rotation or position for certain axis in bepu v2 like unity?

https://docs.unity3d.com/ScriptReferenc ... aints.html
by b1fg2
Thu Dec 26, 2019 12:34 pm
Forum: Questions and Help
Topic: V2 ContactEventsDemo Question
Replies: 1
Views: 5326

V2 ContactEventsDemo Question

I do know OnContactAdded in ContactEventsDemo, but any simple guide for OnTouching and OnContactRemoved?
by b1fg2
Wed Dec 25, 2019 4:16 am
Forum: Questions and Help
Topic: V2 contact impulse
Replies: 3
Views: 7530

Re: V2 contact impulse

which mean implement this into HandleManifoldForCollidable method? but i dun see any constraint in this demo
by b1fg2
Tue Dec 24, 2019 10:26 am
Forum: Questions and Help
Topic: V2 contact impulse
Replies: 3
Views: 7530

V2 contact impulse

I try to play around with the ContactEventsDemo. Is there any way to get contact impulse for each contact point like unity?
https://docs.unity3d.com/ScriptReference/Collision.html
by b1fg2
Wed Dec 18, 2019 9:54 pm
Forum: Questions and Help
Topic: V2 unity like addforce funtion
Replies: 8
Views: 10852

Re: V2 unity like addforce funtion

like this? i got some infor from here https://answers.unity.com/questions/696068/difference-between-forcemodeforceaccelerationimpul.html public void AddImpulse(System.Numerics.Vector3 force) // Force per second { bodyRef.Velocity.Linear += force * bodyRef.LocalInertia.InverseMass; } public void AddF...
by b1fg2
Wed Dec 18, 2019 9:34 pm
Forum: Questions and Help
Topic: V2 unity like addforce funtion
Replies: 8
Views: 10852

Re: V2 unity like addforce funtion

Thanks for the reply, i hope this could help with other that looking for similar staff. Here is the function, correct me if i am wrong. public void AddImpulse(System.Numerics.Vector3 force) { bodyRef.ApplyImpulse(force, default); } public void AddForce(System.Numerics.Vector3 force) { bodyRef.Veloci...
by b1fg2
Wed Dec 18, 2019 2:24 am
Forum: General
Topic: Convert static mesh to dynamic mesh at an impact
Replies: 6
Views: 28220

Re: Convert static mesh to dynamic mesh at an impact

something like this?

Code: Select all

 if (_isKinematic)// set kinematic object
                    bodyRef.BecomeKinematic();
                else // restore original for dynamic object
                    bodyRef.SetLocalInertia(_bodyInertia);
by b1fg2
Wed Dec 18, 2019 2:22 am
Forum: Questions and Help
Topic: V2 unity like addforce funtion
Replies: 8
Views: 10852

V2 unity like addforce funtion

how to create unity like funtion with Beppu v2. in the force mode there is "force" , "Acceleration" ,"Impulse" ,"VelocityChange" .But bepuv2 only have applyImulse function, how can i create new funtion? https://docs.unity3d.com/ScriptReference/Rigidbody.AddFor...
by b1fg2
Wed Dec 18, 2019 2:18 am
Forum: Questions and Help
Topic: V2 break constraints or solver
Replies: 2
Views: 6174

Re: V2 break constraints or solver

Thank you very much ! :D
by b1fg2
Tue Dec 17, 2019 12:55 pm
Forum: General
Topic: Convert static mesh to dynamic mesh at an impact
Replies: 6
Views: 28220

Re: Convert static mesh to dynamic mesh at an impact

in V2 you can just do this, by turning you dynamic body to kinematic internal static readonly BodyInertia _kinematicInertia = new BodyInertia(); internal void SetKinematic() { if (bodyRef.Exists) { if (_isKinematic)// setMass to 0 kinematic object bodyRef.LocalInertia = _kinematicInertia; else // re...
by b1fg2
Tue Dec 17, 2019 12:50 pm
Forum: Questions and Help
Topic: V2 break constraints or solver
Replies: 2
Views: 6174

V2 break constraints or solver

how to break Constraints or solver when certain force apply to the attached body? force detection?
by b1fg2
Tue Dec 17, 2019 5:07 am
Forum: Questions and Help
Topic: Bepu V.2 Scaling question
Replies: 5
Views: 7768

Re: Bepu V.2 Scaling question

is there any other way to scale the body when the gameobject is scaled?