Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / Keeping objects upright (i.e in a helicopter game)

Author
Message
Neptune
18
Years of Service
User Offline
Joined: 8th Jan 2006
Location: United Kingdom
Posted: 4th Aug 2006 21:45
Hi Guys,

Imagine a helicopter 'type' of game. Now, i want to control the copter with the keys and i want it to respond to the physics i.e: bounce, sliding off surfaces, gravity etc.

I have the basic controls covered, see code:



I am trying to keep the object upright in the air. Try the code, it works fine but it can spin out of control in the air, no good for a helicopter.
I have set it so its mass is positioned very low in the object which works great when you land as it always rights itself.
How do i keep it upright in the air. Any ideas.
Cheers
Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 4th Aug 2006 22:03
I would think in terms of a real helicopter. They stay in the air because the rotor blades push air down exerting an upwards force on the chopper. I'd imagine you could do a similar thing by means of a joint and two rigid bodys. So perhaps and invisible rigid body above the chopper connected to it via some sort of joint. Then you can apply a force to that hidden rigid body. That might go someway to simulating the blades exerting forces on the chopper from above the main chopper body.

I'm looking forward to trying to make airborn physics with DP, but unfortunately wont have time to play around with that for some time.

Neptune
18
Years of Service
User Offline
Joined: 8th Jan 2006
Location: United Kingdom
Posted: 4th Aug 2006 22:10
Hmm. Interesting idea!

Thanks, i might try that.
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 4th Aug 2006 22:16
hey neptune,if u get it working.can u post a small demo?

id love to see something like that!
Neptune
18
Years of Service
User Offline
Joined: 8th Jan 2006
Location: United Kingdom
Posted: 4th Aug 2006 22:23
Sure thing.

Im actually recreating an old Amiga classic, ugh! Can anyone remember it?
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 4th Aug 2006 22:30
If you do make it with rotors blades don't forget to use a gimball joint on the rotor blades connections.

I'm not getting you down am I, Ho Look! another fancy Door?
Simwad
19
Years of Service
User Offline
Joined: 9th Oct 2005
Location: Zoo Station
Posted: 5th Aug 2006 04:26
Thunderhawk?

Great arcade/sim game, it had just the right mix.

Great Intro as well.
President - "Is the team assembled?"
General - "Yes Mister President."
President - "And the Pilot?"
General - "One of our finest sir."
President - "Good.....you've got 24 hours!"
Mike Johnson
TGC Developer
22
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 5th Aug 2006 11:03
I had a look at your example and added this line into the code "phy set rigid body max angular velocity 1, 0.0" By restricting angular movement in this way it seems to get the desired effect.
Neptune
18
Years of Service
User Offline
Joined: 8th Jan 2006
Location: United Kingdom
Posted: 5th Aug 2006 12:04
HowDo: Will do.

Simwad: No, when I said ugh that is the actual name of the game. Ugh! It was a stoneage taxi service. Super!

Mike: Brilliant!!! With a little tweaking that'll do the job perfectly. Cheers

Login to post a reply

Server time is: 2024-11-24 12:38:34
Your offset time is: 2024-11-24 12:38:34