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 - Why Doesnt It Work?

Author
Message
Cyanide06
16
Years of Service
User Offline
Joined: 24th Apr 2008
Location:
Posted: 13th May 2008 19:12
Hi everyone, so ive been poking around for a way to get gravity today, and i found a thread that asked very simplistically, how does one make gravity?

Well the answer to this was to use



so the person replied back and said it worked and all was dandy... the question is why is this code not working for me?

heres our code



if anyone could shed some light as to why it wouldnt work, or offer a different solution to gravity i would love to hear it.

(also weve tried gravity with darkphysics but it gave us a fatal error crash every time we ran it)
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 13th May 2008 21:09
Technically:



Too bad I don't have enough time to look at code right now, so I can't help you there...

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
RedFlames
17
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 13th May 2008 22:13
you need to declare gravity# as global or use a constant, otherwise the function cant use it.

And maybe the object will fall to fast and not increase speed while falling, so try Sven B's suggestion too. =)

pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 14th May 2008 04:43
It Work

Login to post a reply

Server time is: 2024-09-27 14:29:38
Your offset time is: 2024-09-27 14:29:38