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 / Animating a open door.

Author
Message
Guardian
20
Years of Service
User Offline
Joined: 30th Sep 2003
Location:
Posted: 23rd Aug 2006 02:01 Edited at: 23rd Aug 2006 02:08
Hi, I'm using the dark physics to try to add a door mechanism to the fps simultion, Something similar to the startrek sliding doors. I animated two cubes moving away from the door using a model editor and added it in. However the collision doesn't change, i still can't enter through the hole and were the doors had moved there is no collsion detection. I'm using the code provided in the example of the fps creator level. I'm making the doors phy make rigid body static mesh. I tried deleting the rigid body and then adding it in again thinking that it would redo it. Hopefully someone can help me with this, thank you.
imekon
17
Years of Service
User Offline
Joined: 3rd Jul 2006
Location:
Posted: 23rd Aug 2006 08:32
I think you have to create it as three objects - one rigid body static, the frame and two dynamic. You can't use animation as that doesn't get converted to the physics world (I think). You can check this with the debugger.

"Reality Bites"
Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 23rd Aug 2006 11:18 Edited at: 23rd Aug 2006 11:20
Try adding 2 models, one for each side of the sliding door (or one cube if the door just slides one way). Make them into kinematic objects (phy make rigid body dynamic box, then phy set rigid body kinematic), then write a little function to move the doors manually, repositioning them using phy set rigid body kinematic position. Should do the job, but you'll have to write some code to move the doors in code, not using an animation in a modeller.

Edit: Btw, creating the doors as a static mesh definitely won't work. Only ever create things using static meshes if they'll never move (i.e. level walls, floor, ceiling etc). Definitely not doors, unless you want them to stay perminently closed, or have to delete them to open them.

Guardian
20
Years of Service
User Offline
Joined: 30th Sep 2003
Location:
Posted: 23rd Aug 2006 15:43 Edited at: 23rd Aug 2006 16:17
Thank you I managed to get it to work using box static box and the kinematic position. Static box by using the phy set rigid body position. However I ran into another problem only one side panel will move, and i'm not sure why I even tried to delete the phy and move and re-enable it. This is the code I used to move it

I figured if one door moved the other one should as well.

I then paired it up with the position object commmand. The help file mentions that after the simulation takes effect the position object command will not work. However in this case it seems to for the second object. The first object will move as its supposed to by just using kinematic position commands or rigid body position commands while the other requires both. One to set the collision area and one to actual move the rendering of the object.

Anyone have any idea why?

Thanks.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 23rd Aug 2006 16:44
if the top line is the one not working try taking the -1 bit out putting 1

Dark Physics makes any hot drink go cold.
Guardian
20
Years of Service
User Offline
Joined: 30th Sep 2003
Location:
Posted: 23rd Aug 2006 16:53
I took out the curvevalue part out and replaced it with the -250 outright. That still didn't do the the trick, i wonder if it might be a bug more then the coding. This is what I had to do to get it to work right.


If I don't put the position object command in the only thing that moves is the collision area not that actual object.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 24th Aug 2006 06:35
A demo of what I think you are after, when you've worked out how its working then put those bits into your program



Dark Physics makes any hot drink go cold.

Login to post a reply

Server time is: 2024-03-29 13:51:58
Your offset time is: 2024-03-29 13:51:58