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 / Dark Physics with 3D World Studio

Author
Message
HartGames
19
Years of Service
User Offline
Joined: 17th Nov 2005
Location: UK
Posted: 18th Aug 2007 15:38
I've recently purchased 3D World Studio. So I made my map, add some barrel meshes which i modelled. Exported it. Loaded it into Dark Basic Pro. Used the phy make rigid body static mesh command.

Then I run the program. I collided with the solids made in 3DWS, but I can walk right through the meshes. Is there any way to fix this or will I have to start using Nuclear Glory Collision?

Thanks in advance
The Nerd
20
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 18th Aug 2007 16:13 Edited at: 18th Aug 2007 16:17
Well, you haven't told us what you use to represent the player If you use a kinematic object then that might be the answer, since kinematic objects won't collide with static physic objects. As a solution for that, you could use Sparky's free collision DLL(it's awesome) to create a collision object that surround the physical player object, and then also setup all static physic objects so they too have an invisible collision object around them.

That way, you won't walk through static meshes, and you still have the kinematic object inside of it so you can interact with the dynamic meshes etc. That's the way I do it. It also depends as if you exported your barrels with the exported map, of course. Or if you added them afterwards, seperate from the map. If that's the case(that the barrels was added from within 3DWS and got exported with the map), then it would be nice to get some more information on what you use to represent the player. Or maybe some code snippets of the place you setup the map and player.

And in case you don't know where to get Sparky's collision DLL, then here's the link to the thread:
http://forum.thegamecreators.com/?m=forum_view&t=74762&b=5

HartGames
19
Years of Service
User Offline
Joined: 17th Nov 2005
Location: UK
Posted: 18th Aug 2007 18:54
Sorry, I guess I was being abit vague.

This is my Character creation code:



Here's the code that I load the map, which has the barrels in it:


The barrels are meshes I've modelled in Maya, then converted to .X usign Milkshape. I added them into my map in 3DWS, then exported the whole level as one .dbo. I colide with the floor and walls, since they were made in 3dws, but walk straight through the barrels.
The Nerd
20
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 18th Aug 2007 19:03 Edited at: 18th Aug 2007 19:20
hmm... since you mention that you do collide with the floor and walls, you must have set it up correctly. Maybe the barrels are somehow corrupted when used with 3DWS. As in maybe the data for them doesn't get exported properly with the rest of the map data. Atleast it could seem so. So when you use the static mesh command, it somehow doesn't "draw" the collision data for the barrels. Why I wouldn't really know. And I'm not sure if that is what's wrong. Now that I think about it, I haven't tried using an exported map from 3DWS that contained imported objects. Let me test it out with my FPS engine.

[EDIT]

Okay I tried making a simple level in 3DWS that contained a railing object which followed with the software. And it all worked out correctly when I tried it out in the engine, although we have a different approach when it comes to creation of levels and player objects. Generally, I would say that you should avoid using characters controllers from DP, and use the technique I explained to you earlier instead. Character controllers are poorly implemented right now. when I load a level into my engine, I use this:


The sc_setupComplexObject command is a command from Sparky's collision plugin, since I use that for the general player collision. And then I also make it a static mesh so physic objects will interact with it. The concept is pretty simple. You have a collision box to represent the player. This box use Sparky's collision plugin. Inside the collision box, you have a kinematic object that'll follow the collision object surrounding it. Works very well. This way, you'll also have an easier time actually coding proper player control/jumping.

TATO 4 EVER
17
Years of Service
User Offline
Joined: 7th Dec 2006
Location: Montreal
Posted: 21st Aug 2007 03:55
I suggest to export your level in .x format, then load it in DBP and re-save again with DBP internal commands. I load all my level stuff this way, is the only i found that works well with DP.



Forgotten Memories W.I.P
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 22nd Aug 2007 03:33
the collision data does not always transfer correctly under dp.. when you scale/move stuff.

Login to post a reply

Server time is: 2024-11-24 18:32:56
Your offset time is: 2024-11-24 18:32:56