Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25

Thread: Slipstream vehicle physics?

  1. #11

    Default

    Hmm, then I'm doing something wrong (again)

    Here's what I have. I use playmaker but I'm sure you can see what I'm doing.

    https://www.dropbox.com/s/ap9ohrs6vo...ut%20Hover.jpg

    K is set to 9.81 as the gravity is -9.81.

  2. #12
    Join Date
    May 2012
    Location
    Adelaide, Australia
    Timezone
    GMT + 9.5
    PSN ID
    dreadofmondays
    Posts
    314

    Default

    Derkoi, you mentioned about the craft travelling forward into the terrain. There are two ways to combat this; the first is to have a number of raycasts at points around the ship, such as the front, back and sides; these will rotate the craft on the terrain.
    A more effective method that we use is to have a single raycast that returns the normal of the poly it hits and we then rotate the ship to match.

  3. #13

    Default

    Quote Originally Posted by dreadofmondays View Post
    Derkoi, you mentioned about the craft travelling forward into the terrain. There are two ways to combat this; the first is to have a number of raycasts at points around the ship, such as the front, back and sides; these will rotate the craft on the terrain.
    A more effective method that we use is to have a single raycast that returns the normal of the poly it hits and we then rotate the ship to match.
    Thanks, i'll look in to that once I get the main code working. I started the scene again using a primitives & right now it just flies straight up!
    Last edited by derkoi; 4th January 2013 at 07:56 AM.

  4. #14
    Join Date
    Jul 2010
    Location
    Somewhere in the center... Poland?
    PSN ID
    zero3growlithe
    Posts
    778

    Default

    Lol guys, don't want to be unpolite but well i guess i know the best how physics work in SSGX and i don't have to take guesses on how it really is xD It has nothing to do with physics laws or anything, the fact that "gravity speed" is 9,81 is just my approximation especially for game (if it would've been 9,81 for real then ship would almost not move xD) and it is u can say random.... almost, measured for eye Anyway, if u have any programming related questions u can contact me on Skype (same name as here: zero3growlithe)

    (me and my bossing around xd)

    EDIT: Also, keeping ship parallel to ground by rotationg it to ground's normal detected by ray is not the best solution if u want it to happen smoothly (i mean smooth rotation interpolation) as Quaternion.Lerp function will go crazy in some cases.... most cases and will interpolate rotation in not wanted way (in other direction than desired) so it is better to use rays. Still if u want the ship to bank like in WOHD while turning u will need to use external gameobject to have to independable rotations which u can edit as u need and have ship bank and be parallel to the ground (btw. i'm saying about rotation on z-axis (Vector3.forward))
    Last edited by zero3growlithe; 6th January 2013 at 07:42 PM.

  5. #15

    Default

    Thanks, i'll add you on skype. Also, you said about 9.81 being your approximation, well -9.81 is also Unity's default gravity anyways, that's where i got it from.

  6. #16
    Join Date
    May 2012
    Location
    Adelaide, Australia
    Timezone
    GMT + 9.5
    PSN ID
    dreadofmondays
    Posts
    314

    Default

    Earth's gravity is 9.81 m/s/s iirc. That's where the number comes from

  7. #17
    Join Date
    Feb 2002
    Location
    Toulouse, France
    Posts
    541

    Default

    Will every race take place on Earth ?

  8. #18
    Join Date
    Apr 2010
    Posts
    1,529

    Default

    Yup... Even the platformer events (which are inside a simulator) are going to use the same physics, probably a few changes in ship maneuverability, but we haven't really talked about that yet.

  9. #19
    Join Date
    Apr 2010
    Posts
    1,529

    Default

    I'm gonna use this thread to show off the first step on the creation of SSGX simulator engine:

    It's on a simple stage yet: the ship is only doing what can be considered as a keyframed animation, not simulating any physics.
    I also need to creage 3D file importer, namely OBJ importer, because the current ship is all "hand" modeled with no aid from a 3D software.

    I'll then make the physics simulation by calculating the ship's behaviour based on every possible component that contributes for the inner workings of a real ship.
    Example:
    Placement of levitating systems;
    Power of said systems;
    Airbrake efficiency from area, deployment angle;
    Engine efficiency based on used fuel and other intrinsic components;
    Position of RCS thrusters for standart ship maneuvering (airbrake-less turning, pitch up/down);
    Weight distribution;

    etc...

    I want to simulate body aerodynamics, but that's a bit too advanced for me at this moment, maybe in a far future!

    Seems like a fun project and it will help us to refine our physics too (inside the arcadey spirit, because no one wants a Wipeout Simulator 2014 )

  10. #20
    Join Date
    Apr 2010
    Posts
    1,529

    Default


    Simple particle physics applied to the ship: Lift force, weight, air drag, thrust, etc.
    Thrust is being controlled by the program. Ground bumps and such are made with mathematical 1D functions.

    Next step is to add rigid body behaviour, like following the curvature of the terrain, torque, etc..
    Last edited by Xpand; 19th February 2013 at 10:42 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •