Search found 44 matches
- Sun May 24, 2015 3:51 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: How to get some superinfo about collided obj?
- Replies: 1
- Views: 2767
Re: How to get some superinfo about collided obj?
Omg sry guys i'm so stupid, just have to use inheritance XDDD
- Sun May 24, 2015 2:25 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: How to get some superinfo about collided obj?
- Replies: 1
- Views: 2767
How to get some superinfo about collided obj?
Yo. An object has a field around himself, if some object collides with that field we can take info about this object. But how to connect that object to another object?
For example, I want set unique ID for all objects that could be collided, and when it collides I want check its ID. How I can do it?
For example, I want set unique ID for all objects that could be collided, and when it collides I want check its ID. How I can do it?
- Tue May 12, 2015 4:47 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Best way to find closest object
- Replies: 1
- Views: 2944
Best way to find closest object
Hey. Actually i'm working on online game with physics on server side. There are players and mobs. I want to implement agro system of aggression for mobs. It means that when some player is nearing to mob at certain distance - mob have to start hunt on player. What is the best way to implement it? Jus...
- Tue May 12, 2015 4:28 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Collision filter mask works ugly
- Replies: 4
- Views: 7226
Re: Collision filter mask works ugly
He means that if you write 10 in 16-bit binary you get: 0000 0000 0000 1010. What matters is that two bits are set: the second bit from right, which represents the value 2, and the fourth bit from right, which represents the value 8 -- add them together and you get 10. Similarly 25 would look like:...
- Mon May 11, 2015 6:38 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Collision filter mask works ugly
- Replies: 4
- Views: 7226
Re: Collision filter mask works ugly
Do you mean that object with collision flag 10 and mask 25 will be collide with all objects which has collision flag less than 25 ?Erwin Coumans wrote:Collision masks and filters work bit-wise.
Good luck!
- Mon May 11, 2015 2:43 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: Collision filter mask works ugly
- Replies: 4
- Views: 7226
Collision filter mask works ugly
Hello. I guess I don't understand how to work with collision filtering. For example, I have object with filter group = 10 and filter mask = 1, and then I cast a ray with filter group = 20, and it works good - ray ignores object. But if I change filter mask of the object, for example, filter mask = 2...
- Sat Apr 11, 2015 9:04 am
- Forum: General Bullet Physics Support and Feedback
- Topic: RayTest works odd on slope of heights field
- Replies: 1
- Views: 3154
Re: RayTest works odd on slope of heights field
The problem was in my stupidity, ehehe!
As you now counstructor of heightmapterrain needs to concrete min and max height. I thought that it only used for terrain location but not only...
As you now counstructor of heightmapterrain needs to concrete min and max height. I thought that it only used for terrain location but not only...
- Fri Apr 10, 2015 10:53 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: RayTest works odd on slope of heights field
- Replies: 1
- Views: 3154
RayTest works odd on slope of heights field
Hey. I just making an character controller based on ray testing. Have a problem when character stays at an slope of a terrain. Here is simple code of how to check is a character on the ground. @Override public void updateAction(CollisionWorld collisionWorld, float deltaTime) { this.deltaTime=deltaTi...
- Fri Apr 10, 2015 10:35 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: btHeightfieldTerrainShape has wrong heights
- Replies: 2
- Views: 4055
Re: btHeightfieldTerrainShape has wrong heights
Seems reasonable, are the errors consistent, i.e. do you always see the same pattern of incorrect height values or does it vary? does changing the resolution of your heightmap alter things at all? It was vary. Changing the resolution of heightmap alter things, aha. Buuut... I had that error only wi...
- Wed Apr 08, 2015 4:33 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: btActionInterface in collision world
- Replies: 2
- Views: 3807
Re: btActionInterface in collision world
Ah, thanks, I will. Just thought that btDiscreteDynamicsWorld is excessively.drleviathan wrote:btDiscreteDynamicsWorld derives from btCollisionWorld and correctly calls updateAction() on actions that have been added. Use that.
- Wed Apr 08, 2015 12:43 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: btActionInterface in collision world
- Replies: 2
- Views: 3807
btActionInterface in collision world
Hey. Some time ago I had used btActionInterface to implement my own character behaviour. So in that class was updateAction method which was called every step of simulation dynamic world. But how to use it in CollisionWorld? CollisionWorld has not any step simulation, yep? So how to dealing with it? ...
- Tue Apr 07, 2015 11:28 am
- Forum: General Bullet Physics Support and Feedback
- Topic: btHeightfieldTerrainShape has wrong heights
- Replies: 2
- Views: 4055
btHeightfieldTerrainShape has wrong heights
Hello. Actually I use JNI wrapper of Bullet and want to create btHeightfieldTerrainShape using this code. int res = 300; ByteBuffer bytes = ByteBuffer.allocateDirect(res*res*4); for(int i=0; i<res*res; i++) { bytes.putFloat(0); } terrainShape=new btHeightfieldTerrainShape(res,res,bytes.asFloatBuffer...
- Wed Apr 01, 2015 2:08 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: An exception when hit Heightfield with ConvexSweepTest
- Replies: 0
- Views: 3600
An exception when hit Heightfield with ConvexSweepTest
Hello. Use JBullet. When performing convex sweep test got an error. java.lang.ClassCastException: com.bulletphysics.collision.shapes.HeightfieldTerrainShape cannot be cast to com.bulletphysics.collision.shapes.BvhTriangleMeshShape at com.bulletphysics.collision.dispatch.CollisionWorld.objectQuerySin...
- Thu Mar 26, 2015 9:06 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: What difference between Bullet and OpenGL metric system?
- Replies: 2
- Views: 3971
- Thu Mar 26, 2015 4:14 pm
- Forum: General Bullet Physics Support and Feedback
- Topic: What difference between Bullet and OpenGL metric system?
- Replies: 2
- Views: 3971
What difference between Bullet and OpenGL metric system?
Hello. I just realize that for some shapes scaling are different. For example, i have created BoxShape with scaling (20,20,20), but to visualize it i have to render a cube with size 40. Same thing with capsule. I have created CapsuleShape with height 2.0, and then visualize it with cylinder with hei...