Hey everyone,
This post is to improve my hobby work on the finer movement of the players helicopter.
I have made the basics to a choplifter clone in 3d however it slides along the X dimension in a 2D manner.
The game works along a Z axis with other objects.
Example shot near the bomber
I am using rigid bodies and physics to push things around. Simple collisions and collisions with magnitude force applied etc.
DEMO
A playable demo ( http://dl.dropbox.com/u/3053655/resQ/resQ.html ) of what I have so far with my own crafted sounds etc… and using the “Detonator” explosions can be linked to above in a web player.
The current controls are
wasd/arrowkeys to move around, e key to rotate directions, left and right mouse for weapons. I find it a lot of fun already but would like to fix some things that bug me.
( Ben Throop ) you rock for DETONATOR. http://variancetheory.com/
Also big shout out to the chat room for help on other areas. Mainly NCarter and mike_mac for their great support.
Chopper Details -
The chopper consists of primitives and a gameObject like this :
Player - rigid body attached and collisions here to this gameObject
- pivot - a mesh
- body - attached to this is the propellers etc.
Question - SLIGHT TILT whilst still moving forward.
I want to tilt the chopper slightly according to the Left Right direction however retaining the forward thrust of the physics without the slight force down. The tilt should stabilise itself after the player lets go of the thrust application.
I get weird distortions when I apply an ugly hard coded tilt on the key press.
Is there a way to prevent that? Is that a case of the limbs being offset and being rotated from the parent object?.
UnityJS
http://pastebin.com/q3RER9pc
I stripped out all the junk of my main file and have a mini script.
I realise that the game object find is slow, I need to replace those at some stage.
An example image of the distortion for clarity.
NOTE*
I have had a look at the Helicopter example posted in the vehicle links on someones site but I fear it is beyond the scope of a simple arcade action simulation. Please don’t just link me to code examples like that and hope it will solve it. I have searched a few forums for unity and some posts are close but not quite what I need.
PS Why did i think maths was stupid at school and respect it so much now as an old fart