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.

DarkBASIC Discussion / Find tilt on planet?

Author
Message
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 2nd May 2009 22:53 Edited at: 3rd May 2009 00:22
Hello there!

I am experimenting with planetoid gravity (not for long) and can't figure out how to find the tilt on a planet, because there is no permanent "down" axis.

So, how can I find the tilt on a planet? Is it possible to do it with the return value from sparky's DLL "GetCollisionNormalDBC()", and if so, how?

EDIT : I want something like this : http://www.youtube.com/watch?v=VsSrA0ZcZhA&feature=channel_page

Thanks, TheComet

Peachy, and the Chaos of the Gems

Link102
20
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 2nd May 2009 23:25
From what I understand, you want a spacship to be pulled towards the center of a planet?
just find the angle of the planet toward the spaceship and move the spaceship x amount in the direction of that angle. where x = gravitational pull / distance.

look into magnet physics

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 3rd May 2009 00:21
The magnet physics would be good for a planet, but I am heading more in THIS direction. The planet was just an example... Didn't quite explain that well...

TheComet

Peachy, and the Chaos of the Gems

Link102
20
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 3rd May 2009 13:54
I don't really see where you're going. Do you mean the tube parts of the track as seen on 0 min 39 sec in the video?

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 3rd May 2009 14:53
Yeah, pretty much that and the overall physics in F-Zero X.

Peachy, and the Chaos of the Gems

Link102
20
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 3rd May 2009 15:37 Edited at: 3rd May 2009 15:42
well, I don't know the best method. It all depends on how you make your physics model and how you store / proces your track
As for the tube track;
- find the center of the trackpiece at your current location*.
- let the botom of the plane/car (how do you call one of those, never was a real fan of the series) point towards that point.
- also point gravity in that direction.
- if the car is at half thickness of the track, either push the car back by equal amount (normal force) or take away gravity. like I said, it all depends on how you make your physics model

* by current location I mean from begin to end not by x/y/z. like if you were 1st in the race, your location would be further than if your were 3rd.

edit:
what happens when you land upsidedown in that game?
and what happens when you race perpendicular to the round track, do you fly of or do you remain attached?

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 3rd May 2009 15:48
I'll try what you said, thanks link102

Quote: "what happens when you land upsidedown in that game?"


You tip exactly to the angle of the track, even before landing.

Quote: "and what happens when you race perpendicular to the round track, do you fly of or do you remain attached?"


Your remain attached. I don't think you can fall off on that track.

TheComet

Peachy, and the Chaos of the Gems

Link102
20
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 3rd May 2009 17:01 Edited at: 5th May 2009 18:44
Quote: "Your remain attached. I don't think you can fall off on that track."


that means fzero doesn't use exact physics. probably for the sake of gameplay.
It would be cool if you used a more exact physics model. like drag forces and gravity

Your signature has been erased by a mod - Please reduce it to 600x120 maximum size

Login to post a reply

Server time is: 2025-08-08 20:38:35
Your offset time is: 2025-08-08 20:38:35