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.
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.
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.
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 eyeAnyway, 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.
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.![]()
Earth's gravity is 9.81 m/s/s iirc. That's where the number comes from
Will every race take place on Earth ?
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.
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)
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.