BSP problem
-
- Posts: 9
- Joined: Sun Nov 25, 2007 5:50 pm
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: BSP problem
Does the .bsp file work properly when loaded in the unmodified BspDemo (shoot boxes using . or mouse) ?
If so, it would be best to do a side-by-side comparison,
Thanks,
Erwin
If so, it would be best to do a side-by-side comparison,
Thanks,
Erwin
-
- Posts: 9
- Joined: Sun Nov 25, 2007 5:50 pm
Re: BSP problem
Ok, I will try that this weekend, I've never compiled an app with OpenGL, could you tell me please what will I need to try the example with my BSP map ?
Thanks.
Thanks.
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: BSP problem
Just compile the Bullet demos: if you using Visual Studio, just open the wksbullet.sln solution, and compile.
Then execute with one argument (easiest from a command line)
BspDemo quake3mapname.bsp
Hope this helps,
Erwin
Then execute with one argument (easiest from a command line)
BspDemo quake3mapname.bsp
Hope this helps,
Erwin
-
- Posts: 9
- Joined: Sun Nov 25, 2007 5:50 pm
Re: BSP problem
Ok thanks,
The problem was the following : The game was using the RBSP format instead of IBSP. So I compiled the same map with the quake 3 compiler and loaded it in the Bullet, works perfectly !
But, when my cube doesn't have to move (when I don't shoot in it, it must be static), it moves every frame with a very little milimeter... what should I do ?
Thanks.
The problem was the following : The game was using the RBSP format instead of IBSP. So I compiled the same map with the quake 3 compiler and loaded it in the Bullet, works perfectly !
But, when my cube doesn't have to move (when I don't shoot in it, it must be static), it moves every frame with a very little milimeter... what should I do ?
Thanks.
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: BSP problem
Can you make sure the dimensions of the objects are in meters?
I noticed gravity of 800, which is very large. Moving objects should be typically in the range of 0.3 (30 centimeter) to 5 meter, roughly.
Also, make sure you didn't disable sleeping (deactivation) of objects, so after a while, objects should settle down, unless an active object is closeby/touching.
Hope this helps,
Erwin
I noticed gravity of 800, which is very large. Moving objects should be typically in the range of 0.3 (30 centimeter) to 5 meter, roughly.
Also, make sure you didn't disable sleeping (deactivation) of objects, so after a while, objects should settle down, unless an active object is closeby/touching.
Hope this helps,
Erwin
-
- Posts: 9
- Joined: Sun Nov 25, 2007 5:50 pm
Re: BSP problem
800 is the default gravity in the game... weird, I'll see that later.
And yes, that's true, when I shoot on a box that I haven't hit for like 30 seconds, it freezes. I added body->activate(true), maybe it solves the problem.
Err, this is the first time I do collisions, but... How do you calculate the damage by using the box's velocity and it's mass when you receive it in the head ? (just tell me if I have to make a new thread).
Thanks.
And yes, that's true, when I shoot on a box that I haven't hit for like 30 seconds, it freezes. I added body->activate(true), maybe it solves the problem.
Err, this is the first time I do collisions, but... How do you calculate the damage by using the box's velocity and it's mass when you receive it in the head ? (just tell me if I have to make a new thread).
Thanks.
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: BSP problem
body->activate(true) keeps the object active/moving. Is is better not to call this, because it prevents objects to settle down/deactivate.
It would be best to apply some scaling between the game and the physics, but this might be some work. How large are the objects?
For damage you can use the applied impulse at the point of contact. A new demo will be added in Bullet 2.65 to show how to easy get access to this, it can also be useful for collision sensors and callbacks etc. There are various methods (please browse the forums a bit), but it is easier to just wait for the next release, which should happen soon (within a week or 2).
Thanks,
Erwin
It would be best to apply some scaling between the game and the physics, but this might be some work. How large are the objects?
For damage you can use the applied impulse at the point of contact. A new demo will be added in Bullet 2.65 to show how to easy get access to this, it can also be useful for collision sensors and callbacks etc. There are various methods (please browse the forums a bit), but it is easier to just wait for the next release, which should happen soon (within a week or 2).
Thanks,
Erwin
-
- Posts: 9
- Joined: Sun Nov 25, 2007 5:50 pm
Re: BSP problem
-removed-
Last edited by Eltran on Sat Mar 15, 2008 7:55 pm, edited 1 time in total.