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 / Gravity for moving objects

Author
Message
FVC
17
Years of Service
User Offline
Joined: 19th Oct 2007
Location:
Posted: 29th Oct 2007 07:21
I've been playing around with one of the slide collision demos and was wondering how you can apply gravity to other objects that are walking/flying around.

In the case of sparky's Slide collision demo, you're a sphere walking around in a small contained level that has other smaller spheres following you. Is there a way to apply gravity to those smaller spheres?
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 4th Nov 2007 00:16
You would apply it the same way as with the player.
Just have each object fall a little bit every loop:


if Object Collision(Object,Floor)=0
move object down Object,0.1 `(or some other sufficiently small number)
endif


"Fire is always at the top of the food chain, and it has a big appetite."

Login to post a reply

Server time is: 2024-11-25 12:39:02
Your offset time is: 2024-11-25 12:39:02