Search found 15 matches

by Crayder
Tue Apr 05, 2016 11:23 am
Forum: General Bullet Physics Support and Feedback
Topic: Generating a navigation mesh in a static world.
Replies: 3
Views: 6623

Re: Generating a navigation mesh in a static world.

3D navigation maps/pathing are a quite difficult thing, sure you can't just pre-render a 2D node map of the scene to traverse with standard techniques? Yes, it has to be 3D. We've (I and my community) been dealing with 2D pathfinding for a decade now. Our current takes are based on the heightmap of...
by Crayder
Mon Apr 04, 2016 10:51 pm
Forum: General Bullet Physics Support and Feedback
Topic: Generating a navigation mesh in a static world.
Replies: 3
Views: 6623

Generating a navigation mesh in a static world.

Let's say I have a rather large world. In fact, it's 6000 by 6000 units and has height (definitely not a 2D navmesh). I need to generate a navigation mesh with the following specifications: - Walking slopes must be less than or equal to 63.5 degrees (been using acos of the ground normal for ground s...
by Crayder
Fri Mar 25, 2016 2:18 am
Forum: General Bullet Physics Support and Feedback
Topic: Scan area for intersecting shapes.
Replies: 8
Views: 18978

Re: Scan area for intersecting shapes.

You should get contact points when one shape intersects with another, either partially or fully. From the btPersistentManifold you can get the pair of collision objects involved. Unless I have misunderstood what you're after, this is really very simple. You can use contactTest, which executes outsi...
by Crayder
Fri Mar 18, 2016 2:50 am
Forum: General Bullet Physics Support and Feedback
Topic: Scan area for intersecting shapes.
Replies: 8
Views: 18978

Re: Scan area for intersecting shapes.

You can always make a ghost shape (same shape you want to test, but doesn't really collide) and see if there's collision. If you don't care too much about exact quality you might even be able to just use broadphase, which will likely be faster Yeah but would that work with objects that are encompas...
by Crayder
Thu Mar 17, 2016 10:35 pm
Forum: General Bullet Physics Support and Feedback
Topic: Scan area for intersecting shapes.
Replies: 8
Views: 18978

Scan area for intersecting shapes.

Hello. I've got a pretty simple question, how can I test whether there are any shapes that intersect a given area? The area will be defined as a prism, possibly rotated. What I'm trying to do is test whether there are any obstacles in front of a vehicle. The vehicles are many sizes, all which I have...
by Crayder
Mon Nov 09, 2015 4:01 am
Forum: General Bullet Physics Support and Feedback
Topic: setUserIndex alternative?
Replies: 6
Views: 8807

Re: setUserIndex alternative?

I mean that it work exactly the same in that if you don't setUserIndex to anything getUserIndex will be 0... same if you don't setUserPointer, getUserPointer will of course be null. I'm sorry but I'm not very pro on C++. Can you go a little more in depth on how to do it with examples? Perhaps with ...
by Crayder
Mon Nov 09, 2015 1:40 am
Forum: General Bullet Physics Support and Feedback
Topic: setUserIndex alternative?
Replies: 6
Views: 8807

Re: setUserIndex alternative?

setUserPointer works exactly the same as index... so I assume you mean like setUserIndex would be 0 if unused... No it doesn't. setUserIndex stores integers. setUserPointer stores void pointers. setUserIndex is only capable of storing one integer per rigid body. I need to store more than one integer.
by Crayder
Sun Nov 08, 2015 8:11 pm
Forum: General Bullet Physics Support and Feedback
Topic: setUserIndex alternative?
Replies: 6
Views: 8807

setUserIndex alternative?

Okay, first off let me point out that I'm already using setUserIndex for something important. Now I need save something else just as important. There is setUserPointer but it is a void. I need another way to save integers. So for each rigid body I'm currently saving a single integer using setUserInd...
by Crayder
Thu Sep 03, 2015 10:00 pm
Forum: General Bullet Physics Support and Feedback
Topic: XYZ rotation to align a plane onto a normal.
Replies: 3
Views: 4449

Re: XYZ rotation to align a plane onto a normal.

No, I was saying plane as an example. I need the euler angles because they are used by the game that this is needed for. I'm not trying to define a plane. I just want the angles to be calculated correctly. There would be many uses for these angles after it's done right, one for example would be alig...
by Crayder
Thu Sep 03, 2015 5:23 pm
Forum: General Bullet Physics Support and Feedback
Topic: XYZ rotation to align a plane onto a normal.
Replies: 3
Views: 4449

XYZ rotation to align a plane onto a normal.

Basically I need a way to get a Euler X-Y-Z rotation vector from the normal of a surface. The current code works for some cases, but not all. It mostly works when casting a ray straight down. When casting rays at walls or slope the rotation returned is usually crooked and just not very helpful. The ...
by Crayder
Sun Aug 23, 2015 4:46 pm
Forum: General Bullet Physics Support and Feedback
Topic: [SOLVED] Length, width, and height of a rigid body.
Replies: 8
Views: 10210

Re: Length, width, and height of a rigid body.

Thanks guys, adding setIdentity solved the problem.
by Crayder
Sun Aug 23, 2015 3:06 am
Forum: General Bullet Physics Support and Feedback
Topic: [SOLVED] Length, width, and height of a rigid body.
Replies: 8
Views: 10210

Re: Length, width, and height of a rigid body.

About the center of mass being (0,0,0), that is false. Not every rigid body's center is (0,0,0). By definition the center of mass for any rigid body is at the local coordinates of (0,0,0). As anthrax11 stated, you can find the bounding box of the object from it's AABB, and that will give you the ef...
by Crayder
Fri Aug 21, 2015 1:04 am
Forum: General Bullet Physics Support and Feedback
Topic: [SOLVED] Length, width, and height of a rigid body.
Replies: 8
Views: 10210

Re: Length, width, and height of a rigid body.

If you mean the axis-aligned bounding box and the center of mass, then yes. For the AABB, there is btCollisionShape::getAabb. The center of mass is always (0,0,0) in local coordinates of any collision shape. In world coordinates, this is the world transform of the body (see btRigidBody::getCenterOf...
by Crayder
Thu Aug 20, 2015 9:26 pm
Forum: General Bullet Physics Support and Feedback
Topic: [SOLVED] Length, width, and height of a rigid body.
Replies: 8
Views: 10210

[SOLVED] Length, width, and height of a rigid body.

I know how to get the collision sphere radius and offset using getBoundingSphere, but is there a way to get the XYZ sizes of a rigid body model? That would include the XYZ lengths and center offsets.