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 / ODE Physics Acting Strange

Author
Message
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 17th Dec 2005 17:36 Edited at: 17th Dec 2005 17:36
I compiled Steve Vink's ODE Physics tutorial and all was okay until I added a command to rotate the static floor box, now it simply does not react on collision with the floor object. Physics wrapper bug again, or is it me again, huh?



What's crackin' homie?
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 17th Dec 2005 21:08
anyone? again...

What's crackin' homie?
Lucka
19
Years of Service
User Offline
Joined: 1st Oct 2004
Location:
Posted: 17th Dec 2005 21:10
in fact it reacts!
the problem is that when you rotate -45 the object, the static of object rotate 45 (the opposite), if you (after the static object declaration) rotate again the object (this time 45 instead of -45) you will see object fall down ON the plane!

more clear:
xrotate object floor,deg will rotate the ODE static by -deg!!
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 17th Dec 2005 21:18
does not make sens to me, I tried what are you saying but the objects still does not react to the floor box collisions

What's crackin' homie?
Lucka
19
Years of Service
User Offline
Joined: 1st Oct 2004
Location:
Posted: 17th Dec 2005 21:23
try this..
is your code with my mods!

the camera is more far to better show!
Lucka
19
Years of Service
User Offline
Joined: 1st Oct 2004
Location:
Posted: 17th Dec 2005 21:24


In this way maybe better..
Lucka
19
Years of Service
User Offline
Joined: 1st Oct 2004
Location:
Posted: 17th Dec 2005 21:26


this is your original code with just different camera position,
as you see the static floor is active but opposite rotation!
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 17th Dec 2005 21:50
dooh stupid me, well... Great Thanks

What's crackin' homie?
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 17th Dec 2005 23:52
IanM is the man - he understands the wrapper code.

oh, Ian! Where are you!

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 18th Dec 2005 13:47
Here I am

I've started taking a look at this problem, and other problems too. For example, fixing the object pivot also doesn't work.

This will take a while I'm afraid - maths isn't my strong point.

For free Plug-ins and source code http://www.matrix1.demon.co.uk
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 18th Dec 2005 21:37
mine too

What's crackin' homie?
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 19th Dec 2005 21:19
Here's a quick fix for 2 problems:
- Rotation of the ODE collision box is now correct for static boxes
- The ODE SET BODY ROTATION command now works like DBPro's rotation does.

Run the following code before installing the new ODE plugin, and then again after to see the corrected rotation


I don't know if the rotation fix will break the FPSC code ... can someone try it? If it does, I'll fork the source because at this point it's becoming a little messy maintaining compatibility.

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

Attachments

Login to view attachments
solo
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 22nd Dec 2005 13:04
IanM,
Can upload please the new ODEPhysics.cpp + ODEPhysics.h ?
Thanks.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 22nd Dec 2005 22:31
Sure - click the download button

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

Attachments

Login to view attachments
solo
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 23rd Dec 2005 00:02 Edited at: 23rd Dec 2005 00:24
Cool!
I have a weird problem. I can't use the new command
ODE_SetMaximumAngularVelocity

I get the error:


Though I use a search over ODEPhysics.h and ODEPhysics.cpp and it exists in both...
Should it be defined in ODEPhysics.def? because its not there.

[EDIT]
...and, my program crashed ( it didn't before )
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 23rd Dec 2005 18:39
I don't use Dev-C++ anymore, so I'm afraid you'll need to fill in the resource strings.

As for the crash ... well, you need to give a lot more detail before I can even think of assisting you debug for the Dev-C++ compiler.

For free Plug-ins and source code http://www.matrix1.demon.co.uk
solo
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 23rd Dec 2005 19:02 Edited at: 23rd Dec 2005 19:30
IanM,
Its true I have also an installed Dev-cpp, but I don't use it.
The error in my last post is a result of VS 2003 compilation.
The compiler doesn't recognize 'ODE_SetMaximumAngularVelocity'
Though it exists in the header and the source file.
Another thing, I can't compile my project in debug mode anymore
(which I did before) - the linker can't find ode_d.lib
(which I assume is the debug version of ode.lib) so I compiled
in release mode (without using 'ODE_SetMaximumAngularVelocity') -
then crashed...
[EDIT] The crash is 2 seconds after I run it, only a black
screen. No 3D scene appears yet.

If it says nothing to u yet, I will create a small program and post it.

[EDIT] I'd prefer to debug myself, but apparently my hands are tied without an option to compile in debug mode.
Thanks
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 23rd Dec 2005 19:36
The first thing I do when I get source code for a library is compile it using my own preferred settings - static versions of multithreaded DLL in release and debug mode.

I've attached my copies of ODE & OPCODE for you to use if you wish

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

Attachments

Login to view attachments
solo
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 23rd Dec 2005 19:56
I've located the libs and set the VS libraries,
and get the following:

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 23rd Dec 2005 20:24
I thought you were having problems with the plugin, not with DSDK.

Those ODE/OPCODE libraries I've uploaded will not work with the DSDK, as DSDK is compiled in static singlethreaded mode. You'll need to compile your own versions of the ODE/OPCODE libs in that same mode.

From that point on, I'm afraid you have a problem. I'm not planning on using DSDK again until it has been recompiled in multithreaded DLL mode ... if that ever happens. That means that I can't assist you too much in debugging the ODE code.

For free Plug-ins and source code http://www.matrix1.demon.co.uk
solo
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 23rd Dec 2005 20:47

Thanks
solo
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 23rd Dec 2005 21:27 Edited at: 23rd Dec 2005 21:27
Last question. At least I would like to rebuild "ODE.sln"
from ode20051219.zip you've uploaded; - but it failed to
compiled. This is nothing to do with the DSDK ( I believe).

I get:
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 23rd Dec 2005 22:12
This is your clue to what's going on here:

Quote: "libs.lib ... already defined in MSVCRT.lib(MSVCR71.dll)"


libc.lib is the static C library
msvcrt.lib is the multithreaded dll D library

You are mixing runtime libraries here.

Quote: "unresolved external symbol _main referenced in function _mainCRTStartup"


This seems to be a console build rather than a DLL build.


Rather than try and 'fix' the solution/project, re-extract the code to a new area and compile it without changing anything. You'll need to use those ODE libs I've uploaded to do this.

For free Plug-ins and source code http://www.matrix1.demon.co.uk
Jedi Lord
19
Years of Service
User Offline
Joined: 11th Jun 2004
Location: Jedi Temple
Posted: 24th Dec 2005 07:34
I am so angry about Darkbasic Pro... because it said ERROR ERROR I DON'T WANT TO WORK, I AM TOO LAZY AND MMM I WILL GUESS IT IS LINE 11... but it is REM COMMAND OMG... that what it said... can Darkbasic Pro team do something about that?

Want to be drunk and killing your brain cell... JOIN WITH ME AND KILL ALL OUR BRAIN CELL!!! MWAHAHAHHA

Login to post a reply

Server time is: 2024-05-02 03:50:10
Your offset time is: 2024-05-02 03:50:10