Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / how gravity should be decide ?? Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
devil20

May 07, 2005, 12:59 AM

Hi

I am trying to learn collision detection using ellipsoid as most common technique "General collision detection using ellipsoid by Kasper " . But i am confused with gravity.
I really donot understand how to decide gravity ??
Does gravity decide from 3d model ??
Does gravity changes as model changes ??

can anyone explain me about it ??

devil20

 
RAZORUNREAL

May 07, 2005, 05:10 AM

There are better forums for this question. But heres what I hope is an all encompasing answer, cause I'm having a good day.

Gravity is 9.800723 meters per second squared (at sea level I assume). Also, the speed an object falls is not dependant on it's mass (for all practical purposes), so that only comes into play when it collides with another moveable object. Thats something that sometimes gets people. Strictly this is not collision detection but physics, which would explain why it is not covered.

Now, I don't actually know what level of knowledge you have, so heres the really simple answer: Each frame, add 9.8*time to the objects downward velocity. This may look like: velocity += (0, -9.8*t, 0). Then add velocity*time to the objects location, checking for collision along the way. Simple as that.

 
Arne Rosenfeldt

May 07, 2005, 05:40 AM

are you talking of
-center of gravity
-mass
-pile up
?

 
devil20

May 07, 2005, 07:37 AM

Hi
Pleople do not reads post very well and throwing questions in reply. I am not much experinced like guys u. But if i am right i'm talking about "Gerneral collision detection using Ellipsoid " If u read this document or seen code on this algo. then u;ll undestand my question else try type this word in google u'll get this document.

ok..Never mind... thanks guys for reply but i aleready understand..:)

devil20

 
Chris

May 07, 2005, 08:12 AM

Well, if you expect us to read a document before being able to even understand your question, the fault is on your side, I'm afraid.

 
devil20

May 07, 2005, 09:43 AM

Sure...Chris

I'll read again...i'm sorry if i post something wrong or i misunderstand something wrong. I am always trying learn new everyday from well experinced guys . I'll read it again :) never mind..don't be afraid.

devil20

 
Victor Widell

May 07, 2005, 10:52 AM

The demo to that document does not implement gravity correctly. You just drift downwards at a constant speed.

 
This thread contains 7 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.