Search found 21 matches
- Sun Mar 01, 2020 2:01 am
- Forum: Questions and Help
- Topic: How to cast rays through an object
- Replies: 3
- Views: 12832
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...
- Sat Feb 29, 2020 1:19 pm
- Forum: Questions and Help
- Topic: How to cast rays through an object
- Replies: 3
- Views: 12832
- Sat Feb 29, 2020 5:43 am
- Forum: Questions and Help
- Topic: How to cast rays through an object
- Replies: 3
- Views: 12832
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.
is it possible? please advise.
- Mon Apr 17, 2017 5:57 am
- Forum: Questions and Help
- Topic: is local_inertia_tensor intentionally too much?
- Replies: 1
- Views: 3020
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 ?
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 ?
- Thu Jan 05, 2017 5:36 am
- Forum: Questions and Help
- Topic: A possible bug and it haunts me crazy
- Replies: 2
- Views: 3488
Re: A possible bug and it haunts me crazy
Thanks Norbo! It works like a charm.ApplyLinearImpulse(ref v) is equivalent to entity.LinearMomentum += v.
- Thu Jan 05, 2017 5:15 am
- Forum: Questions and Help
- Topic: A possible bug and it haunts me crazy
- Replies: 2
- Views: 3488
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...
- Thu Jan 05, 2017 4:57 am
- Forum: Questions and Help
- Topic: physics simulation Back-In-Time
- Replies: 1
- Views: 3016
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...
- Sun Mar 06, 2016 2:37 pm
- Forum: Questions and Help
- Topic: how to get internal forces in constrains ?
- Replies: 2
- Views: 4534
Re: how to get internal forces in constrains ?
I think I got the answer.
Is it "myRevoluteJoint.BallSocketJoint.TotalImpulse / /space.TimeStepSettings.TimeStepDuration" ?
Is it "myRevoluteJoint.BallSocketJoint.TotalImpulse / /space.TimeStepSettings.TimeStepDuration" ?
- Sun Mar 06, 2016 10:45 am
- Forum: Questions and Help
- Topic: how to get internal forces in constrains ?
- Replies: 2
- Views: 4534
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...
- Wed Dec 30, 2015 6:13 am
- Forum: Questions and Help
- Topic: CPU or GPU ray-casting ?
- Replies: 1
- Views: 4121
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...
- Mon Dec 07, 2015 3:31 pm
- Forum: Questions and Help
- Topic: ray-casting failure in multi-threading
- Replies: 2
- Views: 4358
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.
the program runs ok, but this is not a solution.
- Mon Dec 07, 2015 2:59 pm
- Forum: Questions and Help
- Topic: ray-casting failure in multi-threading
- Replies: 2
- Views: 4358
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...
- Wed Oct 14, 2015 4:39 pm
- Forum: Questions and Help
- Topic: How to find the acceleration of an entity
- Replies: 1
- Views: 3443
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...
- Sun Oct 11, 2015 9:20 am
- Forum: Questions and Help
- Topic: how to print a text string onto screen?
- Replies: 4
- Views: 5282
Re: how to print a text string onto screen?
thank you, JusTiCe8. that works.
- Sun Oct 11, 2015 3:17 am
- Forum: Questions and Help
- Topic: how to print a text string onto screen?
- Replies: 4
- Views: 5282
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) ...