Jump to content

  • Log In with Google      Sign In   
  • Create Account

Relative gravity on arbitrary objects


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 TheComet   Crossbones+   -  Reputation: 1644

Like
0Likes
Like

Posted 26 April 2014 - 05:08 AM

I'm not sure how many of you are familiar with the F-Zero series, if not, check out this video so you have an idea of what I'm talking about:

https://www.youtube.com/watch?v=9k6kvFg5Ih8

 

Note in the video how it's possible to drive all around the cylinder pipe without falling off.

 

I'm looking to implement something similar to their relative gravity mechanic, but I'm not entirely sure how I should approach it. How does F-Zero know what is "down"? Does it average the surrounding normals of the underlying mesh, and use that?

 

What happens when you're far away from any surfaces?


Edited by TheComet, 26 April 2014 - 05:09 AM.

YOUR_OPINION >/dev/null

Sponsor:

#2 ikarth   Members   -  Reputation: 445

Like
0Likes
Like

Posted 26 April 2014 - 06:07 AM

I don't know how F-Zero does it, but there are several ways to implement this.

 

The easiest is just to define the position of the ship on a plane (that wraps from left to right) and then translate that to its position on the cylinder. It's like UV coordinates: your internal coordinate system has some predictable relationship with the world coordinate system, and when it's time to display it you just do the appropriate translation. I've done a game that explicitly uses the UV coordinates of the ground terrain to track where object are, so they don't have to care about the height map, though you can use any working coordinate system. Drawback of this method is that you can't have arbitrary positions in space as easily, so if your ship has the ability to leave the track you need another method. Doesn't matter as much in a racing game, obviously.

 

A more complex method that can reference arbitrary geometry is the one used by Super Mario Galaxy, as explained in this article on Gamasutra: http://www.gamasutra.com/view/feature/131997/games_demystified_super_mario_.php

 

Basically, gravity is redefined to be relative to the normals of nearby polygons.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS