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 / PhysX Vehicle From DBpro Primatives?

Author
Message
paul5147
17
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot & Sunny
Posted: 23rd Nov 2009 11:16
Has any body managed to build a simple vehicle from dbpro's primatives yet.Even something really simple like a box for the body and cylinders for wheels that they can get to work.No matter what order i add the wheels or dimensions i give them or even rotating them prior to adding them they always spin at 90 degrees to the direction of travel.I must be missing some thing but have a look at the code and see if you can spot what i'm doing wrong.Thanks.
HowDo
20
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 23rd Nov 2009 20:14 Edited at: 23rd Nov 2009 23:02
this might work, get you going so you can fine tune it.



if you are following the chm doc, draw out the position that they give for the 4 wheels, place them in the order you read it, this will show which wheels go where, and can only be placed in that order.

edit
been trying to make it do it, however like last time I have still have not got it to work, like you are finding out.

the only quick way is to make the object in a 3D package then use that.

Dark Physics makes any hot drink go cold.
HowDo
20
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 23rd Nov 2009 21:31 Edited at: 23rd Nov 2009 21:33
yeah! found out how to do it. ok when building your model with primitives build it in the y direction.

meaning your vehicle is standing on its rear bumper like so. that way theres a rotate object in the vehicle demo.



Dark Physics makes any hot drink go cold.

Attachments

Login to view attachments
paul5147
17
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot & Sunny
Posted: 24th Nov 2009 12:54
Thanks for your sugestions but they dont seem to be working as i'd expect them to.I've been trying this off and on for a few days now and this is as far as ive got and i seem to be getting there except for one minor bug.
what i've ended up doing,because for some reason the wheels were always driven at 90 degrees to the vehicle and the rotate object commands,even when used with a fix object pivot command seem to be ignored by the physx engine is this.
1. make an object as a place holder for the vehicle
2. make a limb(1) to represent the vehicle body,it only seems to like it made onlong the z axis at present,though i will try others later.
3. add the wheel limbs,back right(2),back left(3),front right(4),front left(5),then link limbs to limb (1) the body
4. rotate limb(1) 90 degrees around its y axis
5. add the body to physx vehicle
6. add the wheels in this order back right,back left,front right,
front left
7. set up rest of vehicle properties and build it

now this seems to work,it points in the right direction,goes in the right direction,even the wheels spin in the right direction,it just doesnt turn properly.
HowDo
20
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 24th Nov 2009 14:28
found this, might help or explain how to go about doing a vehicle.

Written by Tatts.

http://forum.thegamecreators.com/?m=forum_view&t=146920&b=30

Dark Physics makes any hot drink go cold.
paul5147
17
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot & Sunny
Posted: 24th Nov 2009 16:48
Thanks howdo,read that a couple of times,i dont have a problem riging the vehicles i create outside of dbpro,its just some of the primatives that dbpro creates dont seem to be set up in the correct orientation to use directly in dark physics,and the fix object pivot seems to get over ridden by physx thats why i had to use the rotate limb commands instead to get it to almost work. Latest version is ok except for steering is back to front,though i did find how to make a rear wheel steering vehicle,an almost a motorcycle if you hide 2 of the wheel limbs!If physx is allowed in the coding challenges thread id ask for this as the next idea to see if any one can get a vehicle working using just dbpro's own make object commands.
HowDo
20
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 24th Nov 2009 17:17
do you use the Nvidia visual debugger to see what is going on?
if not you can get the latest one here.

http://developer.nvidia.com/object/pvd_home.html

Also if you not done so download the Nvidia SDK and look at the code they use to make vehicles to work.

Keep going you must be very close to cracking how this is done, will be very usefully later on for others to use.

Dark Physics makes any hot drink go cold.
paul5147
17
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot & Sunny
Posted: 27th Nov 2009 15:08
At last!
Finally got this to work

But still not sure why or even how,because the values you have to put into the phy add wheel commands have no relevance to the objects you make the model from,or even the positions and sizes of them.For a comercial add on thats suposed to make this sort of thing easier the documentation needs some serious work.Or at least explain how to get these values from what you start with in the model.Why does it need positions for the wheels and there limb numbers,surely if you have the limb number it should now where they are in relation to the body limb because it always assumes limb 0 is the body of the vehicle.The positions you then have to give it to make it work all then seem to be mirrored or inverted from what you would expect having just made them.
Well theres my little rant for week,time for the weekend and bit of relaxing coding time!!!!!
Southside Games
13
Years of Service
User Offline
Joined: 1st Jan 2010
Location: Don\'t tell me what to do!
Posted: 2nd Jan 2010 03:57
I can make the vihicle fine. but the modol is sideways. I just need to know how to fix it. when I run it in the debuger it says that the car is facing the right way.

Login to post a reply

Server time is: 2023-01-28 07:06:04
Your offset time is: 2023-01-28 07:06:04