Space Physics

Blitz3D Forums/Blitz3D Programming/Space Physics

Falelorn(Posted 2004) [#1]
Anyone remember the games Independence War 1 and 2, realistic space phsyics 3 axis rotation. etc.

Does anyone know of a tut or anything on how to do the physics for the space flight?


Picklesworth(Posted 2004) [#2]
I'm trying to use tokamak for this sort of thing, simulating thrusters by using tokrb_applyimpulse2. I'm also using air friction to simulate inertia dampening. So far I think it works okay, but I've stopped work on that project for a while.


_PJ_(Posted 2004) [#3]
This is what I was working on - (Before Tokamak was discovered which Im a bit scared of!)

Is this any help?


http://www.blitzbasic.com/archive/posts.php?topic=17097


poopla(Posted 2004) [#4]
If you don't need advanced collisions response, you can use a vector moving one unit out along the units LOCAL z axis as it's thrust vector. Now you simple add a percentage of this vector to it's global motion vector, and it will be free to rotate any direction without immediately moving in that direction(if you only apply the thrust vector when it "thrusts"). If you apply it all the time, but at 70% strength or something.. then it will slide arround corners.

Hope this helps.


_PJ_(Posted 2004) [#5]
SO you'll need some sort of pivot to face the direction of motion, seperate from the facing (and thereby thrust)???

This principle is ideal, but still noot easy in code (for me anyhow!)

I cheated in the end with my project, and used a workaround which simply makes turning slower at faster velocity.


Picklesworth(Posted 2004) [#6]
hey, that's not a bad idea. It gives a more interesting, and more noticeable, way to keep people from always going at maximum speed.


_PJ_(Posted 2005) [#7]

If you don't need advanced collisions response, you can use a vector moving one unit out along the units LOCAL z axis as it's thrust vector. Now you simple add a percentage of this vector to it's global motion vector, and it will be free to rotate any direction without immediately moving in that direction(if you only apply the thrust vector when it "thrusts"). If you apply it all the time, but at 70% strength or something.. then it will slide arround corners.



Any code/examples to show this? I'm with ya in theory, but Im just a little unsure of how to apply the percentage to the local Z-vector. Surely this should involve some trig? Remembering that local 'Z' could be globally ANYWHERE in 3D.


Andy(Posted 2005) [#8]
.

Andy