No, I've put Mach 1 on this track because I've made it very big (scale parameter) and phantom was a little too slow to enjoy
No, I've put Mach 1 on this track because I've made it very big (scale parameter) and phantom was a little too slow to enjoy
for debugging purposes I'm not generally speaking against having a high top speed, especially since the track has to work in zone as well. also I think it'll look faster once we get some textures on it but for now I tend to agree with zero that even mach 1 doesn't feel overly fast.
Also I've created a design document for basin park hill (I'll make one for basin park once we start debugging that one as well.) Basin Park Hill Design concerns
so I'd appreciate it if anyone who has any points would just put them into that document and I'll address the concerns in the model a.s.a.p. kthx :)
Also Zero should I flip all the normals so that you're seeing the back of them on the ground? O.o I mean I know almost nothing about how these things work, all I'm really doing is sculpting the envoirnment after all so I'm unsure of how these things work for the purposes of making them work in game.
Well, i don't know how to define 'normals' so a quick example should solve this: we have a simple poligon plane, in 3d modelling software you can see it from both sides, but in Unity (game engine) you'll see it only from one side which normals are pointing. heh
If possible detach track from green hills, if it isn't, i'll do it myself then, in Maya.
@Oryx: When I fell off the track, I sometimes got respawned next to the track, so I fell off again. Only boost accelerating while respawning brought me back onto the track. Should this issue also be in your document? I added it, but maybe it's a general problem. Feel free to delete the line if that's the case.
Because it's just a simple portable respawn script I've written in couple minutes... it won't be used in game.
btw. This track which was in barrel roll demo was my 'Delcor City' in progress and here's an update: https://picasaweb.google.com/lh/phot...eat=directlink (it will be a night ride track)
Night ride through a city? Awesoooome!!!!!! I am looking for some nice lighting then, great to have such a track!
But I think you have to improve the section with that 3 jumps, it's pretty tricky actually and can't be mastered without using boost and/or barrel roll if I am correct.
Looks good but I think you should add a subsurf modifier to the track to smooth the corners...
And I guess you will also replace the sky later on ;)
Thanks, Zero! I got them! I'll take a look at FullShipController and I'll check what i can do from here!
Some night photos of Delcor City: https://picasaweb.google.com/1060839...eat=directlink (texturing this track shouldn't be a problem as it will be dark in many places)
Note: There is maaaaany lights missing so it's a bit too dark right now :g
btw. Those are in-game screenshots :P
This is going to be an awesome track, zero. I love the sky! Can't wait to see the further progress. Oh but I hope you will add some lights to the windows buildings or rooftops aswell ;)
@Xpand: I'm trying to figure out on how to make gravity work correctly in terms of physicsand i don't really know how in case of so called momentum (?) of ship after jumping of some jump... maybe some tips on how to do it :d I suck at physics cos it takes too much time to learn something and remember it, especially when it is boring for me xd
@Docfo4r: Yeah, it is supposed to be stuffed with lights when completed :)
Ok, the momentum of an object is what defines the quantity of motion that object has. It's a vector, so it has magnitude and direction. It's expressed as p=m.v in which "m" is the mass of the object and "v" is the velocity of the object (also a vector). The relation of that with jumping is that the more momentum an object has the longer it jumps if it's launched from a ramp. So you can see that it's not only the magnitude of the velocity (speed) that counts. The mass of the ship also counts for the length of the jump, but not for the height.
http://en.wikipedia.org/wiki/Momentum
You can relate the momentum to force through Newton's second law of motion with F=dp/dt, where the resultant force vector is the derivative of the momentum to time.
I just don't understand how you want to get gravity from this since the airborne time doesn't depend on the mass nor the horizontal speed.
I thought that Unity had an internal bullet physics engine with active gravity.
If what you need is the gravitic acceleration, then that's g=9.807 m/s^2
In another note you can also use the momentum to determinate collision dynamics:
dpsys=0 The variation of the system's momentum is zero ALWAYS (only if you DON'T have a variation in mass, which we do because ships burn fuel, but that makes things much more complicated).
Then if you have two ships colliding, the system's momentum will be
pinitial=pfinal (remember, always a vector)
Ship1 and ship2
p1i+p2i=p1f+p2f
m1.v1i+m2.v2i=m1.v1f+m2.v2f (velocity is a vector)
(v is velocity and m is mass)
This is for elastic collisions, which are the ones we want.
The problem is that I didn't consider drag here, so the ships would just bounce around the track's walls after they hit...
Actually there is almost nothing left for unity's physics engine from me cos:Quote:
I thought that Unity had an internal bullet physics engine with active gravity.
1. An body dropped in space with gravity turned on does not accelerate as it is supposed to, even if you increase its mass it will fall as fast as a body with smaller mass...
2. Everything happens as if it was in slow motion xd
3. It feels really unstable when body is moving high speed, collisions are really... strange and as you can sometimes notice colliders hit invisible corners on flat surfaces :|
If I wouldn't have modified it a little by applying forces myself then this physics and other stuff that is right now (well, my actual project state is much different than previous versions xd) would look like :turd and it would feel like :turd xd
Anyway, thanks for some lesson, I'll try to translate it somehow to Unity script... maybe I'll even rise my grade from physics a bit :g
A body's mass doesn't affect the speed of fall. All objects under the same gravitational field experience the same acceleration, independent on the mass.
http://www.youtube.com/watch?v=5C5_dOEyAfk
Actually, through Newton's second law of motion (Yep, Newton was a genius... His stuff fits almost everything):
F=m.a
P=m.a (where P is the weight and the only force acting on the body)
m.g=m.a (the masses cancel each other out)
g=a (the only acceleration the body is subjected to is the gravitic acceleration, the masses don't affect the variation of speed during the drop)
And that looks slow motion because you dropped the object from a big height. Try putting a cube 10 meters above a plane and see the time it takes to colide with the plane. According to my calculations it should take about 1.43 seconds. If at 100 meters: 4.52 seconds.
Don't forget when the ships jump they have a part of the thrust force going upwards, therefore it makes it fly a lot longer, depending if the force is too strong or too weak...
In Blender, you can increase the accuracy of the physics engine, can something in Unity do this?
It may solve your problems as I suspect the object is moving faster than the engine can currently compute. The only drawback will be it will require more CPU time (not a problem for your i7!)
Cipher just had a great idea in the Wipeout HD Bling Brigade thread:
...I am wondering, would it be possible to program that for SSGX? So it would take and save a picture from a spectators view if there is, say less than half a second between the first and the second who finishes the race. And if you don't want that, you can uncheck that feature in the options menu, maybe...
@Docfo4r: Well, I've seen somewhere how i can take pictures and save them on disk in Unity so I think it would be possible :)
@Xpand: Ok, I know something about gravity but now I have this damn problem on how to make ship align itself to be parallel to track's surface cos my previous script was all about changing ship's transform using raycasts and that was very unstable and slow working :| I have something on mind but I need to know if it is possible to calculate direction from one rotation to another, for example: I have one object (object's position = ship position) which is always parallel to the track (still using rays cos using face normal which was under ship worked bad and I don't f****** know whyyyyyy!) and I have ship on which I want to apply torque force in direction which is headed to "center" of rotation... u know what I mean?
@Aspect: Yeah, I've posted a solution to this problem tens of pages back :P
@zero3growlithe: Let me just finish my final test tomorrow (I still have exams, though) and I'll get back to you with that. For now I see no way around using raycasts to align the ship to the track's normal. You can probably add an invisible plane below the ship and make its normal always parallel to the track's face normal at that point.
Ok, take your time and pass those exams :) Hopefully I'll figure out something by myself xd
Still discussing techies stuff eh?
Yeah, I'm back. If anyone here needs help designing just call me. :)
@Xpand: Ok, I figured it out (so easy...) :) Good luck on exams btw :D
Zero: how did you fix your problem?
Substract other rotation from your rotation and you have direction xd I thought of this in school so if it won't work as it should then I have another idea where i'll just check which direction should i rotate in on single axes.
EDIT: Lol, now I've come to a conclusion that it is not the best idea and use something else instead... jezze, programming is f'kin hard but damn I like it xd Can't help it...
Programming and scripting are fun, its just it comes with frustration too! I kind of know what I'm doing, but its slow going sometimes. Just right now I have adapted the AI ship node tracking system to make a vulcan cannon that has a turret that tracks separately to the barrel (think of a tank turret and gun) and it was a eureka moment!
I am trying to think of a solution to your problem, but to be honest the raycast method is the only one I can think of, as it should return the surface normal and aligning to that.
Okay, now I'm stabilizing ship using angle gathered using rays but now I have a problem of this kind: objects rotation is in compartment of 0 - 360 degrees, right? So when rotating my ship forward, for example from 0 to 20 degrees, then there is no problem as I can use Mathf.Lerp to smoothly interpolate rotation of ship to this angle... but if I have to rotate it back from 20 to 330 degrees then this function will interpolate this value from 20 to 330 like this: 22,36,78, and not like this: 20,9,2,359,330... that's the problem :|...
Anyway, programming is going slow as we have a nice weather outside and it's not good to lose it :) And the eeend of schoooool iiiiis coming up....
Why don't you use 20 and -20 degrees?
Also make sure you're using a degree based system. If not multiply the angle by (pi/180) to put it as radians.
Cos localEulerAngles don't come with such possibilities and I have to operate on them... (http://answers.unity3d.com/questions...lerangles.html)Quote:
Why don't you use 20 and -20 degrees?
I'm not sure if this is useful to you:
Within Blender you can use material physics that allow levitation. One side-effect is that ships auto-align while within this field.
I have made a quick example. Press the right cursor key to rotate the 'ship' as it falls...when it hits the field it auto aligns back to normal, automatically. This works for any axis too.
Does Unity do this?
O______________________________O
Nope... I don't think i've seen something like this :<
How about this approach?
http://forum.unity3d.com/threads/316...bject-on-water
Well, I'm using this method (at least simillar) for gravity, yeah, but we were talking about stabilizing ship to be parallel to track if my memory is not wrong xd Anyway, thanks for helping me :)
I know one thing... this is freakin blowing my mind more than problem with random race start enemy positioning, that's for sure •.•
Anyone up to look at this wall of text called script? xd
Attachment 6225
Generally... it works same as simple "transform.one = transform.two" thing... that means I've achieved nothing new xD
I'm trying to see if i can figure out with something on the Unity's physics engine to shift the gravity variable, but it doesn't have anything.
I don't know if it would work, but have you already tried to change the gravity variable? Like dropping it to 1/2 or 7/8 of it's current value?
Edit -> Project -> Physics -> Gravity as (0,-9.81,0) change to anything you need.
EDIT: Thanks to Game programmer from Ubisoft I've figured out how to fix my problem with stabilizing ship on x-axis :D
EDIT2: Or not...
Have you tried using two rays (one front of ship, the other the back) and then taking an average?
I still think linking the ship to a planar surface and then align that surface's normal with the track's surface normal would be easier because you would only need one ray for that and there would be less margin of error...
True, but I saw a problem with this approach in Blender where the alignment would snap to the normal, so unless the track had many polygons making up its topography then you will see the tracking object jolt from one alignment to the next, rather than smoothly interpolating it. One ray would be best from a pure efficiency standpoint, but then getting it working is the first priority.
EDIT> This is not Unity though, so the rules may be different,
But, I understand Zeros pain. You think you have something done, and a minute later it all goes bang. Currently I am trying to create and delete recursive child objects via references. My brain is on fire.....
I'm sure nobody remembers me at this point. But blame school and what not.
Shamar had to draw some art of concept... AGAIN! This time I made sure to take the pictures as soon as I was done. The last one was rushed so...
@Feisar: As for me it looks nice :D Are you going to finish it and add some more details to so it can be made in 3D?
@Aspect: Avarage from rays? My latest beta pf SSGX used about 12th version of this type of solution for alligning and next one is going to use 13th which I'll write... tommorow, yeah, cos I got everything done in school what had to be done, ahahah ^^
@Xpand: I've f***** this method too already xd It worked like potatos used as batteries...
@feisar: Cool! I see bits of Chenghou project in that? Or is it just me?
Yeah I've been busy with exams too... All my recreational activities have crawled to a halt...