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 GDK / Physics plug-in powered by PhysX

Author
Message
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 29th Jan 2010 17:46
dbYRotateObject(characterID, 180);
dbFixObjectPivot(characterID);

This is not a physics issue, its just the way I set up that camera function in the demo.

jCedborger
14
Years of Service
User Offline
Joined: 21st Jan 2010
Location:
Posted: 29th Jan 2010 17:56
oh damn xD ofcourse! haha completly forgott the pivotfix =D Ty mate =)
jCedborger
14
Years of Service
User Offline
Joined: 21st Jan 2010
Location:
Posted: 31st Jan 2010 12:40
Any news bout' the character controller? =)
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 31st Jan 2010 13:08
Yeh, in working on changing the controller height for crouching etc I have created a function that can change any dimension of the controller, so, if the collision box does not fit the rendered character as desired you will now be able to change the dimensions.

I have a bit to do before I update though, so, if you want, I can send you the 2 files you need to replace, then you will have the function.

email me at:
matthew.hoban@sky.com

I will send you the files tonight if you wish.

jCedborger
14
Years of Service
User Offline
Joined: 21st Jan 2010
Location:
Posted: 1st Feb 2010 14:56
I can't figure out how to use this if i have a .dbo level. Imported as an object, how will it detect collisions? now when i load the .dbo and the character. the character just going straight through the ground.
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 1st Feb 2010 19:42
Can I see your code?

I have exported whole levels from 3DWS as dbo's and set them up as triangle meshes for collision and its worked fine.

jCedborger
14
Years of Service
User Offline
Joined: 21st Jan 2010
Location:
Posted: 2nd Feb 2010 09:18
Im just importing the dbo using:
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 2nd Feb 2010 13:59
Where did your 'world.dbo' come from?
What does the debugger show? If its hard to explain, post a screenshot.

jCedborger
14
Years of Service
User Offline
Joined: 21st Jan 2010
Location:
Posted: 2nd Feb 2010 14:18
Its the "universe.dbo" that comes with darkGDK. it simply just load the dbo file, but the characvter just go staraich through every surface on it. the debugger does'ns show anything.. I think there is nothing wrong, but just that i cant convert the dbo to a mesh. What function do i use for that?
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 2nd Feb 2010 15:42
That object has 440 meshes and it seems that mesh number 8 will not work, if I tell it to ignore 8 then it seems to work fine.

I will have to investigate more and hopefully have an explanation and a fix soon.

jCedborger
14
Years of Service
User Offline
Joined: 21st Jan 2010
Location:
Posted: 2nd Feb 2010 21:13
any solution? i cant figure this out
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 2nd Feb 2010 23:30 Edited at: 2nd Feb 2010 23:32
Theres not much you can do at the moment, I am presuming you are just trying this map out, or are you actualy using it in your game?
There is a chance that it is just this particular file(universe.dbo) that wont work as I have tried lots of maps and terrains and they all work. Like I said, 439 of the meshes seem to work but one does not.
I will look into this and fix it but it may be a couple of days, sorry.
If you are using it in your game then I might be able to give you a workaround until I fix it.

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 3rd Feb 2010 01:21 Edited at: 3rd Feb 2010 01:21
Put:
before you make your triangle mesh, it works for me, I've had a little box bouncing around the level but I have not tried a controller, let me know if this works.

Its still strange that that one limb out of 440 limbs is causing trouble, I will have to look into that limb and see why its being rude lol.

Cetobasilius
14
Years of Service
User Offline
Joined: 29th Dec 2009
Location: Mexico
Posted: 3rd Feb 2010 03:03
lol it must be the file or something... great work with the update matty... terrain collision is working really good. i have a question. how can i disable Z movement in the collision?

hi
jCedborger
14
Years of Service
User Offline
Joined: 21st Jan 2010
Location:
Posted: 3rd Feb 2010 09:01
haha, thats actually pretty funny thanks for the workaround dude =) how did you find that little messup ? and no, i was just trying out to import an .dbo world, not gonna use it in a game.
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 3rd Feb 2010 14:57
@Cetobasilius - I'm not sure I know what you mean, do you mean you want everything restricted to two dimensions, like for a side scroller or something similar?

@jCedbourger - I put a breakpoint inside the triangle mesh function and looped through all the meshes and number 8 threw an exception, so I told it to ignore number 8 and it worked fine, its very strange, I have not had a chance to look into it yet but when I do I will find a way to tell the function to ignore meshes like this one, he he.

jCedborger
14
Years of Service
User Offline
Joined: 21st Jan 2010
Location:
Posted: 3rd Feb 2010 16:55
is there i function to make the caracter go up stairs? in the demo you can, but my character cant =/
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 3rd Feb 2010 17:16
When you make the character controller you put in values for step-height and slope.

The step-height is the maximum step height the controller can climb, if the controller can't go up try increasing the step-height.

jCedborger
14
Years of Service
User Offline
Joined: 21st Jan 2010
Location:
Posted: 3rd Feb 2010 17:36
well yes, that did the trick ;P curious, what does the slope mean? and also, my characters collisionbox still seems to be a bit off, at some walls, he can almost run through, but at some walls/steps/groundheights, he cant get near/over.
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 3rd Feb 2010 19:54
The slope value is the maximum angle your character can climb up slopes.

Make sure the width and the length of your collision box are the same, controllers can't rotate so if they are different you may get strange results. The capsule controller will be better when I do it.

The only way you will know for certain whats going on is to use the debugger.

jCedborger
14
Years of Service
User Offline
Joined: 21st Jan 2010
Location:
Posted: 3rd Feb 2010 20:08 Edited at: 3rd Feb 2010 20:44
Ok i see but how exactly do i change the collisionbox? I think i got it wrong. The myphysics.makebox is'nt right, right?

EDIT: And also, my current laptop cant handle the debugger =/ 99% CPU and like 50k+ memory (older laptop).

but again, i wont use either the map or the character in the actual game project, but i'd like to test everything out ang get the most of the code ready til' my models are done =)
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 3rd Feb 2010 21:35
Use physics::makeCharacterController(), I emailed you an updated file with a new function in, I think it was physics::setControllerDimensions(), this changes the box dimensions to whatever you like.

Pity about the debugger, maybe test your character with nothing else on screen apart from maybe a box to test collision, hopefully your laptop wont struggle as much.

jCedborger
14
Years of Service
User Offline
Joined: 21st Jan 2010
Location:
Posted: 3rd Feb 2010 21:52
I get this error:



and its pointing to this line:



what about that? =/
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 3rd Feb 2010 22:53 Edited at: 3rd Feb 2010 23:01
Oh, O.K I'll take a look at that, it worked for me but I never done much testing as I just threw that function together for you, I'll get back to you tomorrow.

Edit: Could I see your code?

Cetobasilius
14
Years of Service
User Offline
Joined: 29th Dec 2009
Location: Mexico
Posted: 4th Feb 2010 01:02 Edited at: 4th Feb 2010 03:07
yes... like to restrict it to be 2d. actually my game is 2.5d sidescroller, so i dont want something like an item to bounce away from the player in a Z directon lol

hi
Amnzero
14
Years of Service
User Offline
Joined: 1st Aug 2009
Location:
Posted: 4th Feb 2010 07:52
Show me an example of PhysX particles(fluids), rag-dolls, and cloth. Then I will really be sold. So far this looks super though. Keep up the good work. I am looking forward to using it in my games.

if(enemy == Amnzero) runAway();
Amnzero->WebSite = L"http://neovance.com/";
jCedborger
14
Years of Service
User Offline
Joined: 21st Jan 2010
Location:
Posted: 4th Feb 2010 09:10
I fixed the error. awsome =) now I only looking forward to some new features =)
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 4th Feb 2010 15:26
@Cetobasilius - PhysX does provide the ability to restrict movement along given axis, I have not implemented that yet, sorry.

@Amnzero - There is still lots to do before I get to the features you suggest.

@jCedborger - Glad its working, do you know what the problem was?

jCedborger
14
Years of Service
User Offline
Joined: 21st Jan 2010
Location:
Posted: 4th Feb 2010 15:48
Yeah, I putted the setcollision... BEFORE i'd even created the charactercontroller ;P did'nt take me long to figure that one out.
Now I'm working on getting bullets fired away =)
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 4th Feb 2010 18:45
Are you using dynamic spheres for bullets?
If so, you may find that at high speeds, small actors may pass through other actors, there is a command in physX that lets you set up your actors so this does not happen, I'll look into that, it should be straight forward.

The other thing you will need is collision data (to see if your bullit hit), you may be able to use the DarkGDK commands for that for now, I will be adding functions to retrieve collision data.

jCedborger
14
Years of Service
User Offline
Joined: 21st Jan 2010
Location:
Posted: 4th Feb 2010 20:22
Thats frekkin' awsome i have'nt started on the shooting function yet, but i guess i will use dynamic spheres.
But i wonder, I have never made a 3d shooting function before, i guess every bullet has to be deleted when collide with anything, or the whole map will be filled with spheres [href]null[/href]
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 4th Feb 2010 21:41
You can delete them or you can re-use them, I need to make functions to re-position dynamic actors manually, also maybe to take them out of the simulation while they are not being used so they don't collide with anything.

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 4th Feb 2010 22:46
@Cetobasilius - Those functions to disable movement along a certain axis are really simple to implement so expect to see this in the next update.

I am just changing the code structure a little so update maybe a week or so away.

Cetobasilius
14
Years of Service
User Offline
Joined: 29th Dec 2009
Location: Mexico
Posted: 4th Feb 2010 23:43
great... looking forward to those restrictions lol

hi
Hassan
14
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 8th Feb 2010 12:55
how about making a lib including the 2 (or 3) cpp files? i really want to use it in my next project, but it's kinda annoying to have files in my solution that i didnt write :s

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 8th Feb 2010 14:13
Yeh, it will be a lib next time.
Are you going to use it in your chess game? I would love to do a video of all the chess pieces falling onto the board to show of my physics plug-in, and you could show off your great models. If not, no problem.
I would also be interested to see how the convex mesh function works on chess piece shapes. As they are not convex shapes I would like to see what shapes the physics comes up with and how much they resemble the actual shapes.

Hassan
14
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 8th Feb 2010 16:31 Edited at: 8th Feb 2010 16:32
yeah, chess, and a new game im working on too =)

and if you want a vid, ill make one for sure

FERSIS
17
Years of Service
User Offline
Joined: 17th May 2006
Location:
Posted: 21st Feb 2010 15:37 Edited at: 21st Feb 2010 15:46
Just wanted to say : Congratulations for this amazing plugin.

Mad props.


EDIT: What about a set of functions to apply force on a giving angle?
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 21st Feb 2010 16:43
The next version will have lots more features, including more functions to apply force and torque in different ways.

kklouzal
14
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 23rd Feb 2010 00:47
I am looking forward to updates on this.

kklouzal
14
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 23rd Feb 2010 02:48
I am getting these errors when trying to compile a program using this, I have followed the setup instructions and still nothing..



Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 23rd Feb 2010 11:04
@kklouzal - Have you dragged the 'Include' folder into your solution explorer?

The next version should all be in one lib so this step will not be necessary. Sorry about that.

Hassan
14
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 23rd Feb 2010 12:08
you dont need to drag anything, matty you should split header files and cpp files, so people can simply add /include directory in include VC++ directories and cpp files in the source files directory

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 23rd Feb 2010 13:20
Thanks Hassan, it will be better once updated, that first version was the only thing I ever released so I done it wrong lol.

I don't really want to make anymore small updates, I'm just concentrating on the next big one which will have lots more features.

kklouzal
14
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 23rd Feb 2010 15:26
I did include the include directory inside vc++ and nada, I am looking forward to what the next version brings us, keep up the great work!

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 23rd Feb 2010 15:42
@kklouzal - is it working for you now? you see, at the moment you have to physically drag the include folder into your solution explorer, my bad lol.
You actually only need to drag all the the .cpp files but I'm trying to keep the instructions simple.

kklouzal
14
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 23rd Feb 2010 22:12
I've tried to drag the Include folder over itself, and i've tried to drag the files and folders inside the Include folder over aswell to no avail.

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 23rd Feb 2010 22:22
Are you running the demo code I provided?
I say this as I noticed you are not getting linker errors for every command in the demo, although my guess is that you are not using all the commands.

If you are not running the exact demo code, could you post what you are running?

Thanks.

kklouzal
14
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 23rd Feb 2010 23:56


Nothing that really does anything but initialize your physics

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 24th Feb 2010 00:26
O.K cool, I will download the version you have(mine has changed since) and try to re-create the errors and get back to you. It may be tomorrow though as its late here now.

Login to post a reply

Server time is: 2024-04-24 09:33:28
Your offset time is: 2024-04-24 09:33:28