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.

Newcomers DBPro Corner / adding gravity to 3d worlds

Author
Message
kuljot
15
Years of Service
User Offline
Joined: 2nd Jan 2009
Location: sacramneto, ca united states
Posted: 1st Apr 2009 07:28
hi guys need your help once again. i wanted to ask im making a level completely of 3d cubes. the main player is a 3d sphere. i made all the cubes in dark basic pro. How can i add gravity so the sphere rolls on the cubes and falls off when going by a pit or the edge. i know i might be able to use sparkys , but can you tell me the commands to add gravity. i tried the ode commands and they dont seem to work. thanks for your time.

Gateway GT5628 Quad Core Desktop Intel Core 2 Q6600 2.4GHz Quad Core 3072MB RAM / 500GB 7200 SATA II Hard drive DVD RW 18X multi dual NVIDIA GeForce 8500GT ....
lucifer 1101
15
Years of Service
User Offline
Joined: 26th Jan 2009
Location: Melbourne, Australia
Posted: 1st Apr 2009 10:14
you would need to look into a physics upgrade for that, unless you want to code your own physics which would probably be hard to do...
kuljot
15
Years of Service
User Offline
Joined: 2nd Jan 2009
Location: sacramneto, ca united states
Posted: 2nd Apr 2009 01:16
there should be a simple way. iv seen before people add gravity with updatign anyhting. i just cant fnd those codes again. cany anyone else help

Gateway GT5628 Quad Core Desktop Intel Core 2 Q6600 2.4GHz Quad Core 3072MB RAM / 500GB 7200 SATA II Hard drive DVD RW 18X multi dual NVIDIA GeForce 8500GT ....
Encrypto Studios
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: Virginia
Posted: 2nd Apr 2009 03:19
If you dont want to use a engine i remember there was some in the fps tut that came with dbpro, idk if it will work for anything besides flat planes.

kuljot
15
Years of Service
User Offline
Joined: 2nd Jan 2009
Location: sacramneto, ca united states
Posted: 2nd Apr 2009 04:17
i am trying to use ode the physics engine in dark baidsc pro. but then no matter where i position the sphere on the cubes it always falls down. i have collisiopn set up on the cubes and everything. [quote]

Gateway GT5628 Quad Core Desktop Intel Core 2 Q6600 2.4GHz Quad Core 3072MB RAM / 500GB 7200 SATA II Hard drive DVD RW 18X multi dual NVIDIA GeForce 8500GT ....
Bursar
16
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 2nd Apr 2009 11:40
I've been using Dark Physics, but I'm guessing that ODE has a similar set of commands.

Make the cubes static, and the sphere dynamic, and it should work OK. Also try setting the sphere just above one of the cubes so that it falls down onto it. If the two objects are initially overlapping, that might be causing a problem.
kuljot
15
Years of Service
User Offline
Joined: 2nd Jan 2009
Location: sacramneto, ca united states
Posted: 3rd Apr 2009 01:39
hey bursur,
im doing all that.but it doesnt matter where i position the sphere it always falls down as soon as the code compiles. any tips. thanks for your replies

Gateway GT5628 Quad Core Desktop Intel Core 2 Q6600 2.4GHz Quad Core 3072MB RAM / 500GB 7200 SATA II Hard drive DVD RW 18X multi dual NVIDIA GeForce 8500GT ....
kuljot
15
Years of Service
User Offline
Joined: 2nd Jan 2009
Location: sacramneto, ca united states
Posted: 5th Apr 2009 20:36
isnt someone goign to reply

Gateway GT5628 Quad Core Desktop Intel Core 2 Q6600 2.4GHz Quad Core 3072MB RAM / 500GB 7200 SATA II Hard drive DVD RW 18X multi dual NVIDIA GeForce 8500GT ....
mike5424
15
Years of Service
User Offline
Joined: 30th Mar 2009
Location:
Posted: 5th Apr 2009 23:49
i need to know to im making an fps and i can fly but i dont want to fly

www.madninjas.co.nr we are mad and we are ninjas
Tobo
19
Years of Service
User Offline
Joined: 12th May 2005
Location:
Posted: 10th Apr 2009 10:24
Isn't it a case of creating a collision with the ground entity/plain/texture and then constantly making the player's Y variable decrease by a given amount?

I'm a beginner myself, but this is what I've read elsewhere.

T
lucifer 1101
15
Years of Service
User Offline
Joined: 26th Jan 2009
Location: Melbourne, Australia
Posted: 10th Apr 2009 10:38
pretty much but he said something about rolling.

if you just want to be able to walk on a ground thats easy (just decrease y until there is a collition then poisition yourself at y+1 or something) but for rolling you would need physics...
kuljot
15
Years of Service
User Offline
Joined: 2nd Jan 2009
Location: sacramneto, ca united states
Posted: 10th Apr 2009 19:59
well it doesnt matter about rollign because the shpere is jsut a temporary, i will use a 3d mdoel later. what im saying is the ode commands add gravity and everything. but now whn the level starts the sphere just falls out of the sky it doesnt stay on the cubes. i even made the cubes static ad added collision nd everything.

Gateway GT5628 Quad Core Desktop Intel Core 2 Q6600 2.4GHz Quad Core 3072MB RAM / 500GB 7200 SATA II Hard drive DVD RW 18X multi dual NVIDIA GeForce 8500GT ....
lucifer 1101
15
Years of Service
User Offline
Joined: 26th Jan 2009
Location: Melbourne, Australia
Posted: 11th Apr 2009 03:15
ok so your using cubes...

how are they laid out?

have you thaught of using a matrix?

care to share any of your code so that people may better help you? (prolly not me)
kuljot
15
Years of Service
User Offline
Joined: 2nd Jan 2009
Location: sacramneto, ca united states
Posted: 12th Apr 2009 23:22 Edited at: 12th Apr 2009 23:24
ok so i made the cubes and positioned them right next to each other. ill include a screen shot ignore the alien in the picture. im usign the ode commands it is addign gravity and everything. the sphere is the player but the sphere keeps falling of no matter how high i position it.. so no mater how high i position it it always gets positioned under the cubes. i think i will start a new post and then postr the code and media because this thread is kinda of messy and not many people responding too it.

Gateway GT5628 Quad Core Desktop Intel Core 2 Q6600 2.4GHz Quad Core 3072MB RAM / 500GB 7200 SATA II Hard drive DVD RW 18X multi dual NVIDIA GeForce 8500GT ....

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-09-28 04:23:46
Your offset time is: 2024-09-28 04:23:46