Advertisement

A few Ideas

Started by March 16, 2002 01:28 PM
5 comments, last by llvllatrix 22 years, 11 months ago
I started a project and im trying out a few ideas I came up with. Just wanted to know what you guys think. For my physically based modeling system im giving every relevent object a force vector. Then if there is a collision the force of the colliding object would be added to the original object and once all the vectors were added the object would we translated. You could do gravity by simpily adding 9.8 newtons force vector(or whatever it is) every time frame and when the object hits the ground add an equlibriant vector. Im sure you could simulate other stuff with this system but I''ll save that for a later project (stuff like giving every point a force vector and simulating shattering glass). Im using milkshape models and im going dynamically animate the model in run time. The view is third person and the player has to swing a bat so what i plan to do is use the mouse position as the end of the bat, screw around with the keyframes, and animate the model accordingly. Not exactly ground breaking ideas but Im just curious as to what you think. See any flaws? etc.
physics is very hard (practically impossible) thats why all the physics engines out there mathengine, ipion etc fail in certain tests (and theyre written by professionals over many man years!)

.A \  /.\/. 


eg simple test what happens if A falls down into the wedge does it come to a complete rest without any interpenertration

http://uk.geocities.com/sloppyturds/gotterdammerung.html
Advertisement
Physics is not hard.
If at first you don't suceed do something easier!.
I thought about all theses things recently and your vector idea is exactly my conclusion. One of my friends wanted to use another technique for his projects : calculate the trajectory of the objects before they move and then recompute the trajectory when an interruption (like a colision) occurs. I prefer the vector solution because its easier for me to see it (thats the way i saw it in my courses).

Hope that'll help a bit

Kiroke

[edited by - kiroke on March 16, 2002 12:00:01 AM]
Kirokewww.geocities.com/kiroke2
vectors : force / velocity / acceleration ... this is what a game needs.

"The Railgun Master"
DaHeR
____________________________________MSN | AIM | YIM | ICQ
Thanks for the replys

Been working on the project for a while and found that the system works well with collision. What u do is use a collision detection system and when u get a collision with an object and a surface u just add a vector along the surfaces normal. If the object still collides with the surface it just adds another vector.

Compare this system to the one we used in my grade 12 programming class (im in grade 13 btw). In the new system the object travels away from the surface. In the old system for every consecutive collision the direction of the ball reflects along the invertex axes of the surface (i suck at explaining stuff). We used this for pong and created a disaster instead.

Anyway thanks for the input and I''ll take a look at those physics libraries, they sound interesting. I should be done the project before july. Tell you guys how it turns out.
Advertisement
physics are easy to understand
physics are easy to implement
as long as you only use easy physics
at the moment you want realistic stuff you have to integrate equations wich are not possible to integrate, wich leads to much errors fast. to improve you need to integrate numerically as good as it gets but fast enough for realtime.

and, at the moment as you have rotational forces, too, you get headache, nothing else
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia

My Page davepermen.net | My Music on Bandcamp and on Soundcloud

This topic is closed to new replies.

Advertisement