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.

Dark Physics & Dark A.I. & Dark Dynamix / Problem creating rigid bodies

Author
Message
Lewis999
8
Years of Service
User Offline
Joined: 23rd Oct 2010
Location:
Posted: 9th Apr 2012 11:27
Hey, I'm trying to use dark physics in a terrain generator I made, nothing serious, just realized I had it installed and wanted to do something with it
But basically, I'm having problems creating rigid bodies. The terrain objects are made using memblocks And I'm trying to use the command "phy make rigid body static mesh obj_no" to make them rigid bodies, but when I run the command "phy get rigid body exist(obj_no)" directly after, It's returning 0. The weird thing is, even though it always returns 0, the first object seems to work fine (I added a dynamic sphere + set it up to control with wasd, the collision is fine with the first chunk(object that makes up the terrain), but I fall through the rest)

On another (slightly unrelated) note, the collision is not working very well at all, well, It works fine but the dynamic sphere always seems to be sunk into the terrain.

any help??


here is the code (it's nested inside 2 for..next loops if it makes any difference)



make_object function:


and the code for the sphere thing :s
HowDo
16
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 9th Apr 2012 21:24
the reason phy can not give you a 1 is because you have not updade it so, alway going to return a 0, now if you make the object and do a phy update and then check for it is should show up.

Dark Physics makes any hot drink go cold.
Lewis999
8
Years of Service
User Offline
Joined: 23rd Oct 2010
Location:
Posted: 10th Apr 2012 00:26 Edited at: 10th Apr 2012 12:34
Thanks for the help, but It's still not working.
now when I make a terrain that has 4 chunks, the ball still falls through everything but the first one, and the other 3 still return 0 when I try phy get rigid body exist(obj_no).
I have attached the project as a zip. the Msgbox code(line 410-412) shows when phy get rigid body exist(obj_no) = 0 is commented out because you need external dll's, but It still shows the problem.


edit:
I've tried to use this code, just before the main loop so i'm not making the rigid bodies as soon as the object is made, but it's still not working.

Attachments

Login to view attachments
HowDo
16
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 10th Apr 2012 21:14
Who's plugin are you using for open to to read and write?

Dark Physics makes any hot drink go cold.
Lewis999
8
Years of Service
User Offline
Joined: 23rd Oct 2010
Location:
Posted: 11th Apr 2012 17:50
I'm using IanM's Matrix1Utils plugins collection. I've given up on using dark physics for now, I might try and get it working later, but there are other things I'd prefer to concentrate on now
thanks for your help anyway
HowDo
16
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 11th Apr 2012 22:44
I see, wonder why mines not working, will look in that.

If I see how to make your code work will post what I come up with.

Dark Physics makes any hot drink go cold.
HowDo
16
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 11th Apr 2012 23:19 Edited at: 11th Apr 2012 23:19
well I've now got it going, but can't see what your problem is, as in where I should be to make it go wrong.

Also on a side note my srceen does not go up to the size you are working with, so most of it I am guessing what or where the visual bits are, load and save buttons only just show on my screen.

Dark Physics makes any hot drink go cold.

Login to post a reply

Server time is: 2019-06-16 19:31:08
Your offset time is: 2019-06-16 19:31:08