crossfire v.0.0.0.01

i need help getting the ship 2 fly straight not backwards.
any/all help is highly appreciated
thanks
jake

53945–1960–$crossoverweb_124.zip (2.47 MB)

Great looking model, but it’s too dark and could probably use some light mapping or other illumination.

There doesn’t appear to be a key for applying acceleration to the vehicle. Other than WASD or the cursor keys, what are the controls?

The following code might be of use to you for making the ship move forward.

var thrust : float = 1;  // Set to whatever amount of thrust you'd like
rigidbody.AddForce(transform.TransformDirection(Vector3.forward * thrust));

BTW, you can also see the joins in the skybox.

the controls are:
WASD - move
“1” and “2” Switch between camera angles

thats all I got so far
Do you know how i can ix the ship flying backwards

As far as I can tell, the W and S keys are contolling the up and down pitch of the vehicle, not it’s acceleration. As such, the ship is essentially spinning on the spot. You need to add forward thrust to the vehicle to get it to fly forwards.

As far as the orientation of the ship goes, it looks like it’s facing backwards instead of forwards. You could rotate the Transform 180 degrees on the Y axis, but this may cause problems with the physics simulation.

The only way I think you can safely fix the ship’s orientation is to rotate it inside the modelling application you used to create it (3dmax, maya, cheetah3d), save it, and then re-import it so it’s pointing in the right direction. I’m still a noob too, so there may be another way to fix this.

the ship has acceleration…you just cannot tell becaus eof the skybox

Fair enough.

Were you able to fix the ship’s orientation?

Not yet… I deleted the origanal package …oops
ill reimport it and then export it again

do know of a better way of movement?.. Im not really liking the way it is now… its too hard to control

You could try using the Transform.Translate() function to move the ship, and Transform.Rotate() to steer it. These functions will give you precise control over the ship’s direction and speed.

I assume you are using the code provided by Daniel in the “N00b Question Airplane Movement” post. If so, then you are using a ‘Rigidbody’ function to control the ship. Rigidbody functions are part of the the Physics engine and are therefore subject to the Newtonian laws of physics, which whilst making things behave more realistically, makes them harder to control.

If you want to continue using the physics based functions, you should be able to make controlling the ship easier if you can work out a way to stop the cumulative rotation effect generated by each call to the ‘Rigidbody.AddRelativeTorque()’ function. You might be able to do this by checking the value of the Rigidbody.angularVelocity variable and only calling the AddRelativeTorque() function if the maximum rotation velocity hasn’t been reached; or you could try restricting the maximum rotation speed by setting the ‘Rigidbody.maxAngularVelocity’ variable to an acceptable value.

Yeah im using the code that Daniel provided… Im still very new to scripting so i have no idea how to do what you sugested…any chance you could right a quick little script that wil get the job done :smile: and of corse you will get full credit.

The car racing tutorial is going to help you out a great deal at this point. You can ask beginner questions here, or do the tutorials and ask then ask intermediate/advanced ones, as you’ll be able to solve most problems yourself at that point… :wink:

Up2 U

AC

Great advice from Targos… I’ve just started the car racing tutorial myself.

Here is an updated version if anyone in remotly interested

added chat feature, improved control and camera script

right now theres nothing to really do but its my first project in unity and I think its pretty cool. :smile:

controls:
WASD - move
“return/enter” - open chat interface

thanks

55366–2022–$crossfire__web_940.zip (2.47 MB)