Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / The "Playing with U5.9 ODE Physics" thread

Author
Message
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Oct 2005 01:23
It's got to start somewhere.

I have a wall of 50 blocks, and a sphere to throw at it. It works! But I want more. Has anyone worked out how to change the friction between objects? The relevant commands look like:

ODE SETSURFACE MODE
ODE SET CONTACT

and the other variants of these commands. You can see my futile attempts below.



BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Oct 2005 01:36
Here's a prettier version, easier to watch. The floor has sides, which gives it a distinct Ice Rink feel due to lack of friction.

I also set the cube mass to 100, which slows down the reactions, and you can see them sliding out from under each other. Not good for wooden crates or anything else of this world!



BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Oct 2005 02:16
Just working things out as I go, and posting the interesting bits...

ODE CREATE STATIC TRIANGLE MESH is, I think, for irregular objects, such as a landscape. There is a dynamic version too.

Here's an interesting one...If you ODE SET RESPONSE to 2, the object does not collide with anything, but other objects can collide with it! If you set the gravity to 0, it will just sit there waiting for things to hit it. The engine must discount it when deciding whether to work out it's personal collisions, thus making it more efficient. Cool!

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Oct 2005 02:30
Found the friction parameter!

ode set contact fdir1

Here's the same code again, without the Ice Rink effect. I added colour to the sphere to show that it doesn't roll ...



Narf The Mouse
19
Years of Service
User Offline
Joined: 16th Jul 2004
Location:
Posted: 5th Oct 2005 02:46
Can you do a vehicle? And maybe provide .exe's for those who are wary of beta upgrades?

Cheese!

Expert Bug-Finder, Horrible at Identifying Them.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Oct 2005 02:52
Vehicles are not possible, because there are no joint functions. They are in ODE, but not in the DB Pro wrapper.

Raven mentioned looking into it. He appears to be the latest member of TGC today, and seemingly knows a lot about TGC's plans

Narf The Mouse
19
Years of Service
User Offline
Joined: 16th Jul 2004
Location:
Posted: 5th Oct 2005 03:15
Well, thanks anyway.

Cheese!

Expert Bug-Finder, Horrible at Identifying Them.
JoelJ
20
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 5th Oct 2005 05:29
Well, I'm playing with it now, and rather liking your example BatVink!

have you figured out friction yet? that will be really nice!

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Oct 2005 10:45
Joel, the friction parameter is discussed above. I don't think it's the full story, but it's a good start.

There's a set of other parameters, such as softness and bounce. It would be good to know what kind of range of values to use on these.

Me!
18
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 5th Oct 2005 11:11
GAH! it wasn`t until I saw this thread that I noticed the beta was up, trying to hide it from me eh?, just as an aside, have you noticed that adding quotes to your post has made the "latest post" side bar thing list this thread as just "The"?

Mentor.

why do they say Aliens are gonna be friendly?, surely the agressive ones wipe out the peaceloving ones, so all you have left out there are crazed flesh eating interstellar monsters.
Scilynt
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location: .-#-.
Posted: 5th Oct 2005 12:13 Edited at: 5th Oct 2005 12:14
If you go here you can compare the ODE docs with the DBP commands.

Quick list of commands and associated chapters.
ODE Set World Erp - 3.7
ODE Set World Cfm - 3.8

ODE Set Contact can accept any of the following modes. The parameter can also be specified using the command in brackets. All help for this command can be found in Ch. 7.3.7

0 - MU - (ODE Set Contact FDir1)
1 - MU2 - (ODE Set Contact MU2)
2 - Bounce - (ODE Set Contact Bounce)
3 - Bounce Velocity - (ODE Set Contact Velocity)
4 - Soft ERP - (ODE Set Contact Soft Erp)
5 - Soft CFM - (ODE Set Contact Soft Cfm)
6 - Motion1 - (ODE Set Contact Motion1)
7 - Motion2 - (ODE Set Contact Motion2)
8 - Slip1 - (ODE Set Contact Slip1)
9 - Slip2 - (ODE Set Contact Slip2)

When reading through the docs, you'll notice that certain flags need set to enable some functions when using the above. This can be done using the ODE SetSurface Mode command using the following values, or with the command in brackets.

0 - MU2 - (ODE SetSurface Mode Contact MU2)
1 - Bounce - (ODE SetSurface Mode Contact Bounce)
2 - Soft Erp - (ODE SetSurface Mode Contact Soft Erp)
3 - Soft Cfm - (ODE SetSurface Mode Contact Soft Cfm)
4 - Motion1 - (ODE SetSurface Mode Contact Motion1)
5 - Motion2 - (ODE SetSurface Mode Contact Motion2)
6 - Slip1 - (ODE SetSurface Mode Contact Slip1)
7 - Slip2 - (ODE SetSurface Mode Contact Slip2)
8 - Approx0 - (ODE SetSurface Mode Contact Approx0)
9 - Approx11 - (ODE SetSurface Mode Contact Approx11)
10 - Approx12 - (ODE SetSurface Mode Contact Approx12)
11 - Approx1 - (ODE SetSurface Mode Contact Approx1)

I haven't test, but I'd be careful when using these Mode settings commands. The function is setup to add the required value to to object surface mode value each time you pass state as 1, and remove the value when you pass state as 0. This could cause a problem if you send the state as 1 twice, or set the state to 0 without enabling it first.

[NOTE]I've been up all night so excuse any small mistakes.
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 5th Oct 2005 12:15
ODE Set Contact FDir1 {Object}, {Angle}

If you set it to an angle of 180.0, then the friction will be an exact equal reaction. Setting it to 0.0 would mean there is no friction.

The friction direction is always set to directly oppose the direction of action. This often is an inverse normal of movement.



This is a timer based variation of the example Mike created with friction. Also note that Mu2 dictates individual surface friction, and the slip1 and slip2 dictate how much give there is on the slide.

For example, car tyres will often have quite a bit of friction that will run in the opposite direction. When they're on thier side though, they can slip by a given ammount. This slip1 and slip2 provide the fall-off for the force loss.

What I'll be doing (probably later today) is adding the joints, which will allow the ERP values to actually make sense as these are really all that use that.

I will also look to be adding functions that allow you to input all of the values for Constant and Surface in the same way you can with Set Object.

Also will think up some simple examples to show off how to use it.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Oct 2005 14:09
So is the general theory that we can control friction predominantly with just FDIR1? I seem to get a sliding scale (excuse the pun) between 0 and 20, then anything above is just glue.

Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 5th Oct 2005 14:31
Yeah, FDir1 is the main way to maintain the friction.
It *should* be based on the inverse direction of the force, but there's a problem with the Velocity; so it's set to a point where 0-20.0 are the main values.

What might be best is to change it so that Velocity is only there a as a place market and objects create with FDir 10.0 as this will provide fairly standard results in most cases.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Oct 2005 15:11
Anybody able to shed any light on why the ball doesn't rotate, even when it collides and bounces around?

Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 5th Oct 2005 15:30 Edited at: 5th Oct 2005 15:32


That works fine.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Oct 2005 15:35 Edited at: 5th Oct 2005 15:35
It spins when you set the angular velocity, but how about when it hits something, or rolls along the floor?



Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 5th Oct 2005 17:46
Ah! Alright I see the issue. I'll take a look over it and see what I can do. The plug-in doesn't use ODE per'say, it more takes what it needs to from ODE's source.

Keeps it very very small, but also limits what is supported without hard coding more. I'm not entirely sure (as I don't have a copy yet) how to set up Dark GDK integration, that's something else I need to look in to.

Wish I had more done today but keep having to move furniture. Hopefully get something done this evening.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Oct 2005 18:33
OK, here's another weird one. I've been looking at the FPSC code to see how the mass and friction is determined. For friction, Lee takes the 3 dimensions, multiplies each one by 75, and adds them together.

So...Crate A in the SciFi pack is 18.5 units in size.

(18.5 *75) * 3 = 4162.5

So the fdir1 parameter is set to 4162.5, which is way out of the 0 to 180 bounds.

What's all that about then!!!


And if you're interested, the mass in FPSC is calculated as the three dimensions multiplied by 25, and added together. Again, that worries me, because in my wall example above that would make 375. At the moment the mass is 5.0, and it's quite good. Anything more, and they slide across each other forever under their momentum.

Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 5th Oct 2005 19:53
God knows, I took a look at the FPSC code the other day when Mike sent it too me. We both kinda looked at it and were like, "eh?"

If you think about it that's really:
WrapValue(18.5 * 75) * 3) = FDir1

I only got both ODE and FPSC-Game tuesday morning, a few hours ahead of everyone else. Mostly playing the catch up game right now.
The implimentation of ODE is simple, very very simple.

Most of what will help will be the examples of it's use. Want to make a simple vehicle one tonight, then test the joints I've been working on this afternoon tommorrow.

If you like, I could send you new builds to be my guinea pig.
The problem with the rotation I think I understand the issue, and why it only really works with cubes.

What I'm a little worried about is changing something that is required for FPSC to work, so I'd have to change that as well. How Lee's implimented things in that source just baffles the heck out of me. To be perfectly honest I'd love to just swap out the current FPSC Source and replace it with my own Resident Engine.

Right now I think th best focus should be on solving minor issues (like the requirement currently for manual angular motion) and implimenting Joints / Ragdoll. Worry about other things later.

Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 5th Oct 2005 22:29 Edited at: 5th Oct 2005 22:30
I have just been playing with the new ODE thingy too and I got strange results!

All I did was alter the gravity and the linear velocity when the space key is pressed, and I found that I could raise the cube in the air and it would stay there until I rotated it, then gravity takes over again and lowers it.

Here is the code in it's entirity but as you can see I have only changed the two lines mentioned:



Great Britain would be Amazing Britain if it wasn't for idiots like you bringing down the average!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Oct 2005 22:44
I'd be happy to put any new wrappers through their paces. The next newsletter tutorial involves this stuff so any playing will help.

I thought about the wrapvalue principle, but I can't for the life of me work out how that calculation translates to friction

I thought ODE manual rotation was in there, but ODE manual movement wasn't? I tried to work out why, Lee does some jiggery-pokery that requires it, resetting then rotating physics objects as they are loaded. The movement uses limb offsets rather than movement using the ODE commands.

Have you tried moving an object in DB Pro that is set up in the ODE World? I tried it, just to see if the ODE update checks for manual movements first...Don't even go there!

My head hurts

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Oct 2005 22:48
Scraggle, I think your issue is to do with the accuracy of the system. With gravity being 10 times less powerful, object movement will be seriously reduced, and it's being overlooked.

It would probably behave if you reduced the World step to 0.03 perhaps, but performance would take a slight hit.

Those other 2 weird world variables might also help, but I haven't got my head around those yet

Sergey K
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 5th Oct 2005 22:53
WTF! does version 5.9 is already exist of DBP?!


BlueLight Online, improved version of MorningOnline
JoelJ
20
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 5th Oct 2005 22:56
just the beta, get it in the bug forum

No one, not even your grandmother, loves their toaster as much as Young Rob does
My BLOG really sucks...
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 5th Oct 2005 23:13
Scraggle the problem is with the update step, you need to make sure you have enough movement each time you update or update more often.

ode set world step 0.1

will solve the issue, this is due to the inaccuracy of the collision. unfortunately the timer is one of the main reasons that many developers don't use ODE, and why TGC are not using ODE for the complete plug-in.

ERP is used for the Joint Collision, basically it stops joints from breaking. realistically you won't need it for any current ODE stuff, the CFM however is important. This dictacts the accuracy of the collision model.

The larger the value, the more inaccurate the collision check it.
Generally keep it to 0.01 and that will yeild fairly good results.
This said for larger scale worlds this can afford to be bigger, as you won't notice the accuracy loss *as* much.

Personally I like using 1unit = 1cm, but everyone has thier own methods. As if 1unit = 1cm, then setting a CFM of 0.01 is ~1cm.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Oct 2005 11:53
Any clues as to what is in 1.0 beta, Raven? It all works, so I'm guessing more commands are being added.

And are you the official TGC ODE rep? 'Cos if you are, I could spend all day bombarding you with requests

Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 6th Oct 2005 13:25
As official as anything around here.
robert@thegamecreators.com if you have questions and such

don't really have a set gameplan for what to add, right now the focus is on the joints so I can add ragdolls to FPSC, and sort out some more 'automatic' functionality so that you can just plug'n'play DBP/DGDK collision.

might expose the car functions as well, they're a little buggy (which is probably why they're not exposed) so need to tinker.
just going by ear really, seeing what comes to me. heh

Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 6th Oct 2005 13:36
Glad to see you working on the ODE plugin. If you are going to be using the new vertex manip commands for testing or such. See my post in the bug reports about meshs and vert commands being cw/ccw. That was a bug with plains that Mike added another flag to fix. They are both CW ordered verts though they still differ in places as verts seem to share on some objects (notably cubes ATM) with the vert manip commands.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Oct 2005 14:46
Found a problem. You can't make an ODE Static Physics Object from a terrain. I even dropped down to a 64*64 terrain, which is only 8000 polys.

The DB Pro executable just crashes silently.

That's a darn cotton pickin' shame

Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 6th Oct 2005 14:55
lol
I was going to to the "official" updates to ODE until they decided to make it open source. Open source is a better route anyway. God knows I don't have as much free time as some others here.

Raven,
One of the things that they asked me to do when I was going to do the "official" updates, was to create a helpfile for the ODE addon. Are you going to do that as well?

WOLF

EZrotate!
TextureMax!
EZactor!
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 6th Oct 2005 15:05
Terrain itself, or any object with larger polycounts?
As terrain is handled slightly differently to regular objects, iirc.

Quote: "If you are going to be using the new vertex manip commands for testing or such."


I wouldn't worry, it access object directly. So I can take from the IndexBuffer, VertexBuffer directly if I want.

To be honest it doesn't really matter, the collision trimesh will be identical no matter the render order as they're not for rendering just for spaces.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Oct 2005 16:20
It's looking like the Terrain issue is to do with limbs. If I set the Terrain Split to 1 (i.e no limbs) then it works.

But that limits you to a 64 * 64 terrain map

Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 6th Oct 2005 16:55
Ah alright. Does this also happen with limbed objects?
Probably will do actually given how things are working in ODE.

Today is a landmark. We finally got ODE compiling under Visual Studio 2005. It hasn't been for the past 2 days, and all I have is the command line 2003. So hopefully with a more visual way to program than notepad this should help heh

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Oct 2005 16:58 Edited at: 6th Oct 2005 17:00
Played some more.

Although a single limbed terrain loads as a static triangle mesh, it doesn't work. I dropped a cube on it, and it fell straight through. I put a static box underneath the terrain, which it landed on and stopped at quite happily.

Edit: Maybe it's a problem with scaling the terrain? Because it's a 64*64 terrain, I've scaled it thirty times. I don't know if this would be an issue or not.

_Nemesis_
20
Years of Service
User Offline
Joined: 9th Nov 2003
Location: Liverpool, UK
Posted: 6th Oct 2005 17:10
Here's my problem, I have a sphere that happily bounces on a box. However, I can change the 'bounce' on the sphere so that it will bounce higher or lower each time. I'd quite like to do this based on the object it's bouncing against yet I haven't yet found a command that does this nicely with my static object (box). I'll post some source code, maybe someone could help me have a lil tinker with it?



Shame there's no docs for the DBP commands, it's quite hard working off the ODE ones!

[url="http://www.devhat.net"]www.devhat.net[/url] :: Devhat IRC Network.
Current Project: ASP Content Management System
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 6th Oct 2005 17:12
Ah, right oki. Yeah, the scale is likely to be the problem with it going through, right now ir builds the collision mesh based on the size of the object default size.

Shouldn't be too hard to throw in something to sort that out.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 7th Oct 2005 15:52 Edited at: 7th Oct 2005 15:55
Anyone know how to stop objects? You can have a number of boxes that just "shuffle" forever, and they will eventually fall over. It could take 5 minutes, but they keep going.

Other systems have a threshold under which they become inactive.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 7th Oct 2005 18:14
Found a problem...when you set bounce on (ODE SETSURFACE MODE CONTACT BOUNCE object, 1), it switches friction off. You can't have bounce and friction.

And to be honest, even full bounce isn't very obvious if it is doing something.

Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 5th Nov 2005 16:03
I cant seem to get ODE CREATE STATIC TRIANGLE MESH working on my x file . I dont recieve a compiler error, but my sphere which is supposed to land on the triangle mesh, just falls through it.

WE SHALL BECOME ALL POWERFUL! CRUSH THE LESSER RACES! CONQUER THE GALAXY! UNIMAGINABLE POWER! UNLIMITED RICE PUDDING ! ! ! ETC. ! ! ! ETC.! ! !
Etienne
20
Years of Service
User Offline
Joined: 17th Jan 2004
Location: Paris
Posted: 5th Nov 2005 17:52 Edited at: 5th Nov 2005 17:55
(I recall to all that newton , the over stress tested multi platform open source physic engine is also available , providing good to better framerate !)

Speaking of ODE i think i should test it , but it seems that there are features that doesnt' exist in ODE such as buoyancy , the resolution at wich the calculus are made (from poor for fps to "simulation" for pro apps) things like "joints" seems to be a little fresh right now ... it's the ode thread , can someone compare both ?

Bat ?

Let's go on with this .
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Nov 2005 22:27
Quote: "such as buoyancy"

No, not there.

Quote: "the resolution at wich the calculus are made "

Yes, that is there...

ode set world step
ode set world erp


Quote: ""joints" seems to be a little fresh right now "

ODE has joints, but the DB Pro wrapper doesn't. It's open source,s o hopefully someone with good C++ skills might implement it

CTF Freak
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location: In your base
Posted: 6th Nov 2005 03:28
is there a list of all the ode commands that have been
added to dark basic pro?
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Nov 2005 10:28
They are in the ini keywords file that came with the U5.9 installation. No help, but the commands are listed.

Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 6th Nov 2005 10:37
Good Grief! Ode help file????

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
David iz cool
18
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 6th Nov 2005 11:06
Quote: "Here's a prettier version, easier to watch. The floor has sides, which gives it a distinct Ice Rink feel due to lack of friction.

I also set the cube mass to 100, which slows down the reactions, and you can see them sliding out from under each other. Not good for wooden crates or anything else of this world!
"


i like your example batvink

has anyone figured out how to add sound while the boxes drop (realistically?)
CTF Freak
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location: In your base
Posted: 6th Nov 2005 21:13
Quote: "Good Grief! Ode help file???? "

I can figure it out but I was looking for anything I might have missed
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 6th Nov 2005 21:37
No criticism of you PEH16, just for myself if we had a good source for help on commands, particularly new commands, particularly new 3d and ode commands - i can dream

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 6th Nov 2005 21:56 Edited at: 6th Nov 2005 21:57
Well I can tell you what I've found from looking at the source and the official ODE documentation located here http://www.ode.org/ode-latest-userguide.html

ODE SET CONTACT FDIR1 <obj>,<value> sets the friction amount for an object, not the direction, apparently this is between 0..infinity but as people have found lower values (0-30) seem to work ok.

ODE SETSURFACE MODE CONTACT BOUNCE <obj>,<state> currently doesn't work properly and overwrites other settings, use ODE SETSURFACE MODE <obj>,2,<state> instead for now. (<state> should be 0 for off, 1 for on)

ODE SETSURFACE MODE CONTACT APPROX1 <obj>,<state> sets an alternative friction model for objects (not necessarily always better) but setting it on for spheres seems to make them roll properly

Dynamic boxes are limited to a minimum 7x7x7 in size
Static boxes are limited to a minimum 5x5x5 in size
Linear velocities are limited to a maximum of 80
Angular velocities are damped every time step meaning objects will eventually slow down and stop spinning if they are not touching anything.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Nov 2005 22:15 Edited at: 6th Nov 2005 22:16
Here is the plug-in in its latest form (DLL, keywords, source)

New commands:

ODE ADD FORCE RELATIVE
- More predictable than the ODE ADD FORCE command

ODE SET DYNAMIC MINIMUM
- Allow you to adjust the minimum size of dynamic boxes (default is 7)

ODE SET STATIC MINIMUM
- Allow you to adjust the minimum size of static boxes (default is 5)

ODE SET FORCE MULTIPLIER
- Allow you to adjust the multiplier applied to forces (default is 10000)

ODE SET MAXIMUM SPEED
- Allow you to adjust the maximum speed of objects (default is 80)

ODE UPDATE
- New version added that accepts a float for the step size (See example code)
- [EDIT] If the step size is zero, then collision is checked, but no updates are done.

For free Plug-ins and source code http://www.matrix1.demon.co.uk

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-05-04 22:01:08
Your offset time is: 2024-05-04 22:01:08