Search found 21 matches

by yanbo2u
Sun Mar 01, 2020 2:01 am
Forum: Questions and Help
Topic: How to cast rays through an object
Replies: 3
Views: 10871

Re: How to cast rays through an object

That post is about getting the entity hit by a ray cast in v1, but it doesn't cover filtering considered bodies, which sounds like what you actually want. In v1, Space.RayCast takes a delegate that can be used to filter out unwanted candidates. In v2, the IRayHitHandler you pass to the Simulation.R...
by yanbo2u
Sat Feb 29, 2020 1:19 pm
Forum: Questions and Help
Topic: How to cast rays through an object
Replies: 3
Views: 10871

Re: How to cast rays through an object

Found a solution from a earlier post.


viewtopic.php?f=4&t=2319
by yanbo2u
Sat Feb 29, 2020 5:43 am
Forum: Questions and Help
Topic: How to cast rays through an object
Replies: 3
Views: 10871

How to cast rays through an object

i need to shoot a ray from a point to the ground( a box ). but sometimes there could be some unexpected objects getting in the way of the ray. I need to let the ray cast as if the unexpected objects never exist.

is it possible? please advise.
by yanbo2u
Mon Apr 17, 2017 5:57 am
Forum: Questions and Help
Topic: is local_inertia_tensor intentionally too much?
Replies: 1
Views: 2715

is local_inertia_tensor intentionally too much?

for a standard box with L meter for every edge and m kg for mass, the inertia_tensor in x,y,z should be m*l*l / 6.

but when I check the value of box.LocalInertiaTensor matrix, the variable value seems to be 2.5 times of m*l*l/6.

Is it intentional or I misinterpret the value ?
by yanbo2u
Thu Jan 05, 2017 5:36 am
Forum: Questions and Help
Topic: A possible bug and it haunts me crazy
Replies: 2
Views: 3184

Re: A possible bug and it haunts me crazy

ApplyLinearImpulse(ref v) is equivalent to entity.LinearMomentum += v.
Thanks Norbo! It works like a charm.
by yanbo2u
Thu Jan 05, 2017 5:15 am
Forum: Questions and Help
Topic: A possible bug and it haunts me crazy
Replies: 2
Views: 3184

A possible bug and it haunts me crazy

Finally, I can reproduce it. in LoadContent() function, simply add a box Box test0 = new Box(Vector3.UnitY + Vector3.UnitX * 2, 2, 2, 2, 1); AttachWithSkin(game, test0, CubeBlue); space.Add(test0); wait after 5 seconds or more (this is very important). and then apply an impulse to the box if (Keyboa...
by yanbo2u
Thu Jan 05, 2017 4:57 am
Forum: Questions and Help
Topic: physics simulation Back-In-Time
Replies: 1
Views: 2748

physics simulation Back-In-Time

It will be fxxxing awesome if the physics engine can simulate the world both forward and backward in time. when you flip the switch back and forth, every movement in the world behaves as if it is in a video tape. e.g. an apple falls from a tree and hits the man in the head, or the apple lifts off fr...
by yanbo2u
Sun Mar 06, 2016 2:37 pm
Forum: Questions and Help
Topic: how to get internal forces in constrains ?
Replies: 2
Views: 4441

Re: how to get internal forces in constrains ?

I think I got the answer.

Is it "myRevoluteJoint.BallSocketJoint.TotalImpulse / /space.TimeStepSettings.TimeStepDuration" ?
by yanbo2u
Sun Mar 06, 2016 10:45 am
Forum: Questions and Help
Topic: how to get internal forces in constrains ?
Replies: 2
Views: 4441

how to get internal forces in constrains ?

I have two boxes that are constrained by a RevoluteJoint. I want to know the internal forces that are exerted on the joint, satisfying the constrain. It should be in the form of a direction plus the magnitude of the force. the code of the objects system are the following: Box b1 = new Box(new Vector...
by yanbo2u
Wed Dec 30, 2015 6:13 am
Forum: Questions and Help
Topic: CPU or GPU ray-casting ?
Replies: 1
Views: 4048

CPU or GPU ray-casting ?

this may not be the right place to ask for my question. I have the same BEPU physics game which does a ton of ray-casting at 10Hz, for which I am doing it in a separate thread while locking on "space.BroadPhase.Locker". My desktop is i7-4790k and Geforece GTX980. As soon as I turn on ray-c...
by yanbo2u
Mon Dec 07, 2015 3:31 pm
Forum: Questions and Help
Topic: ray-casting failure in multi-threading
Replies: 2
Views: 4276

Re: ray-casting failure in multi-threading

so far, I just simply catch this exception without doing anything.

the program runs ok, but this is not a solution.
by yanbo2u
Mon Dec 07, 2015 2:59 pm
Forum: Questions and Help
Topic: ray-casting failure in multi-threading
Replies: 2
Views: 4276

ray-casting failure in multi-threading

I have a huge task of 100 ray-casting operations (to simulate a lidar sensor). It hurts the update function response. Then I decided to use a separate thread doing the ray-casting. It works very smoothly during the first a few seconds, then I got a null_pointer_exception during space.RayCast(ray, ou...
by yanbo2u
Wed Oct 14, 2015 4:39 pm
Forum: Questions and Help
Topic: How to find the acceleration of an entity
Replies: 1
Views: 3403

How to find the acceleration of an entity

Say i have an entity that is affected by many other entities and constrains. I need to find the overall acceleration of all impulses (in different directions) that are applied on this object, something to imitate the acceleration sensor. by the way, I also need to find the impulses from revolute mot...
by yanbo2u
Sun Oct 11, 2015 9:20 am
Forum: Questions and Help
Topic: how to print a text string onto screen?
Replies: 4
Views: 5224

Re: how to print a text string onto screen?

thank you, JusTiCe8. that works.
by yanbo2u
Sun Oct 11, 2015 3:17 am
Forum: Questions and Help
Topic: how to print a text string onto screen?
Replies: 4
Views: 5224

Re: how to print a text string onto screen?

thank you Norbo for the quick reply. I tried to use spriteBatch.DrawString(). Then, the graphics with BEPU engine messed up. The attachment pictures show the scene before and after using spriteBatch to draw texts. The code Draw function is like this : protected override void Draw(GameTime gameTime) ...