Search found 15 matches

by starlaoxmelgs
Wed Apr 01, 2020 9:12 am
Forum: Questions and Help
Topic: Does Bepu v1 supports query overlapped object?
Replies: 10
Views: 17905

Re: Does Bepu v1 supports query overlapped object?

I can distinguish BoxShape now, but how to obtain its position, rotateion, scale? BEPUphysics.Entities.Prefabs.Box box = new BEPUphysics.Entities.Prefabs.Box(new Vector3(10, 10, 10), 1, 1, 1); box.Orientation = new Quaternion(0.5f, 0.5f, 0.5f, 0.5f); space.Add(box); For example, I create a box, then...
by starlaoxmelgs
Wed Apr 01, 2020 6:49 am
Forum: Questions and Help
Topic: Does Bepu v1 supports find closest point on boundsbox or shape?
Replies: 1
Views: 8660

Does Bepu v1 supports find closest point on boundsbox or shape?

Similar to Unity's Collider.ClosestPointOnBounds, Collider.ClosestPoint. https://docs.unity3d.com/ScriptReference/Collider.ClosestPoint.html https://docs.unity3d.com/ScriptReference/Collider.ClosestPointOnBounds.html public Vector3 ClosestPoint(Vector3 position); Returns a point on the collider that...
by starlaoxmelgs
Wed Apr 01, 2020 1:34 am
Forum: Questions and Help
Topic: Does Bepu v1 supports query overlapped object?
Replies: 10
Views: 17905

Re: Does Bepu v1 supports query overlapped object?

How to distinguish what type of objects are overlapped?
For example, there are some boxes, spheres, staticmesh in scene.
I make a overlap detection, and 7 objects are detected.
I want to know they are box, or spheres, or staticmesh.
by starlaoxmelgs
Tue Mar 31, 2020 3:50 am
Forum: Questions and Help
Topic: Make a Object not collidable temporarily
Replies: 2
Views: 8959

Make a Object not collidable temporarily

I add a BEPUphysics.Entities.Prefabs.Box to space
So it can collide with other objects.
But sometimes I want to make it not-collidable, after 3 seconds, I need it collidable again.
What's the proper way to do this?
Add to space, remove from space works, but just weird.
by starlaoxmelgs
Mon Mar 23, 2020 6:27 am
Forum: Questions and Help
Topic: Bepu v1 update entity position without update space?
Replies: 4
Views: 12019

Re: Bepu v1 update entity position without update space?

Thanks :D
Need to look at environmental settings.
by starlaoxmelgs
Mon Mar 23, 2020 6:08 am
Forum: Questions and Help
Topic: Does Bepu v1 supports query overlapped object?
Replies: 10
Views: 17905

Re: Does Bepu v1 supports query overlapped object?

Problem solved.
Thx again :D
by starlaoxmelgs
Fri Mar 20, 2020 4:04 am
Forum: Questions and Help
Topic: Does Bepu v1 supports query overlapped object?
Replies: 10
Views: 17905

Re: Does Bepu v1 supports query overlapped object?

List<Entity> OverlapBox(BEPUutilities.Vector3 position, float width, float height, float length) { List<Entity> touchedEntity = new List<Entity>(); Box detectBox = new Box(position, width, height, length); _space.Add(detectBox); BEPUutilities.BoundingBox boundingBox = detectBox.CollisionInformation...
by starlaoxmelgs
Fri Mar 20, 2020 2:48 am
Forum: Questions and Help
Topic: Bepu v1 update entity position without update space?
Replies: 4
Views: 12019

Re: Bepu v1 update entity position without update space?

Thanks :D
Yes, I am confused about 150ms too.
I am not familiar with v1, is there anything strange in the profile screenshot? (Too many calls? unusual method execution time?)
by starlaoxmelgs
Thu Mar 19, 2020 3:55 am
Forum: Questions and Help
Topic: Bepu v1 update entity position without update space?
Replies: 4
Views: 12019

Bepu v1 update entity position without update space?

https://i.ibb.co/sJS6SpC/zzzzzzzz.png Calling Space.Update() is too slow, maybe it's because scene mesh has 3934 faces. My game not really need to update space. It has one scene and some players, I have already implemented collision limit using ConvexCast before, find contact point, and limit playe...
by starlaoxmelgs
Thu Mar 19, 2020 2:56 am
Forum: Questions and Help
Topic: Does Bepu v1 supports query overlapped object?
Replies: 10
Views: 17905

Re: Does Bepu v1 supports query overlapped object?

Thanks!
That really helps :D
by starlaoxmelgs
Wed Mar 18, 2020 4:11 am
Forum: Questions and Help
Topic: Does Bepu v1 supports query overlapped object?
Replies: 10
Views: 17905

Does Bepu v1 supports query overlapped object?

Similar to Unity's Physics.OverlapBox, Physics.OverlapSphere.
https://docs.unity3d.com/ScriptReferenc ... apBox.html
https://docs.unity3d.com/ScriptReferenc ... phere.html

Given a box, find all colliders touching or inside of the given box.
by starlaoxmelgs
Mon Jan 20, 2020 4:22 am
Forum: General
Topic: Unity and Bepu v2 notes
Replies: 25
Views: 64903

Re: Unity and Bepu v2 notes

Our Unity project need a open source C# physics library now, Bepu v2 looks pretty good. But as you mentioned above, performance may be a huge problem. I actually do some test, yes, it's a huge problem. 400 BoxCast Unity cost 2ms, 0 GC Bepu cost 6494 ms, 53.2 MB GC Alloc https://user-images.githubuse...