Semi object done but collision issues

Post anything about MX Simulator here. Please. I'm begging you.
Post Reply
ddmx
Posts: 5374
Joined: Sun Apr 20, 2008 3:36 pm
Location: Midland MI

Semi object done but collision issues

Post by ddmx »

i have this semi done to make the pits look better, but i'm having issues with the collision aspect.
Image

number-of-spheres
x y z radius friction spring-force damping-force

x - x value distance from the object center or on the map?
y - same
z - same
...

As an example, here is what bale.shp (used for the hay bales) looks like:

4 - this is the number of collision spheres for the entire object right?
0 0.5 -1.5 1 1 500 25
0 0.5 -0.5 1 1 500 25
0 0.5 0.5 1 1 500 25
0 0.5 1.5 1 1 500 25

just a few simple questions, i can't get it to work for some reason. also, to save it as a .shp you have to do that in notepad right? put that file in your track folder, and add @blank/semi.shp to statue file? am i correct?

**i put those graphics together in about 3 minutes so just a sample.
jlv
Site Admin
Posts: 14930
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: Semi object done but collision issues

Post by jlv »

The coordinates are relative to the center of the object. Here's boxtruck.shp. It should be pretty close.

9
0 0 -9 4.0 0.25 500 25
0 0 -5 4.0 0.25 500 25
0 0 -1 4.0 0.25 500 25
0 0 3 4.0 0.25 500 25
0 4 -9 4.0 0.25 500 25
0 4 -5 4.0 0.25 500 25
0 4 -1 4.0 0.25 500 25
0 4 3 4.0 0.25 500 25
0 4 7 4.0 0.25 500 25
Wilson
Posts: 987
Joined: Fri Dec 07, 2007 3:22 am
Team: Privateer
Location: Vegas

Re: Semi object done but collision issues

Post by Wilson »

This collision deal is something that needs to be fixed, that why we can start with the more complicated objects with collision, like ramps.
DJ99X
Posts: 15523
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: Semi object done but collision issues

Post by DJ99X »

^^^^ 100% agree with you Wilson
Netdemon01
Posts: 505
Joined: Thu Jan 10, 2008 2:02 am
Team: Privateer

Re: Semi object done but collision issues

Post by Netdemon01 »

Collisions are usually something built into the physics engine thats being used. If he's using ODE then I believe the collisions can be set with either a box, sphere, or cylinder. When I was writing code in BlitzBasic to create a paintball game and bmx game, collisions were the most difficult aspect because of the limitations of the shapes you can use to detect them.
#189

"This game will always be about pushing it right to the edge without going over .... to keep up with the top riders you will still have to be right on the edge of control." - jlv
Wilson
Posts: 987
Joined: Fri Dec 07, 2007 3:22 am
Team: Privateer
Location: Vegas

Re: Semi object done but collision issues

Post by Wilson »

I believe he coded his own physics engine...
DJ99X
Posts: 15523
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: Semi object done but collision issues

Post by DJ99X »

Having box collisions would be sweet, make life so much easier making collisions for rectangular objects like buildings
Wilson
Posts: 987
Joined: Fri Dec 07, 2007 3:22 am
Team: Privateer
Location: Vegas

Re: Semi object done but collision issues

Post by Wilson »

Its would because when you think about it almost everything in mx is a box.
rewrew421
Posts: 1421
Joined: Thu Dec 13, 2007 12:41 am
Team: Privateer
Location: West Kentucky, USA

Re: Semi object done but collision issues

Post by rewrew421 »

yea, except those hot monster girls. They always have nice curves.

lol is this PG? spam?
D.Eckels #421 "The O-G"
jlv
Site Admin
Posts: 14930
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: Semi object done but collision issues

Post by jlv »

Netdemon01 wrote:Collisions are usually something built into the physics engine thats being used. If he's using ODE then I believe the collisions can be set with either a box, sphere, or cylinder. When I was writing code in BlitzBasic to create a paintball game and bmx game, collisions were the most difficult aspect because of the limitations of the shapes you can use to detect them.
I'm using ODE, but not for collision detection. I had to do my own collision handling because ODE doesn't have a torus or disk primitive which is necessary for the wheels. I tried making the wheels out of other primitives but it just wasn't good enough. The perfectly shaped wheels handle way better.

I'll put a triangle mesh shape in there eventually. The upside of the spheres is they are very fast, and the contact normal is well defined.
Netdemon01
Posts: 505
Joined: Thu Jan 10, 2008 2:02 am
Team: Privateer

Re: Semi object done but collision issues

Post by Netdemon01 »

Sounds good. I can agree managing wheels is difficult with stock ODE. I tried a BMX bike to use a cylinder for collision detection on the wheels. It was quite unstable to say the least :shock: Glad to hear you're managing your own collisions. That should allow for all sorts of possibilities.
#189

"This game will always be about pushing it right to the edge without going over .... to keep up with the top riders you will still have to be right on the edge of control." - jlv
Post Reply