Flight simulation HELP!! -
08-13-2010, 03:24 PM
I'm working on a flight simulation project where the plane will crash on the ground when it hits or contacts the barn house of the windmill. I've tried to follow the other codes from other flight simulations on here, but I couldn't make the plane to crash. I'm attaching the file on here. I've been working on this for two days now and I'm a little "punched-drunk".
When I try to put an If/Else statement:
If [plane] distance above [ground] < 0
call world.collision method
Else
Do nothing
The world.collision method works. However, since I have my plane flying in a loop with the engine sound, even after the crash, the sound still keeps going.
So, I thought that since this has worked with the "ground", I thought it would work on the barn and the windmill as well. Well, it didn't. I changed the "If/else" statement to:
If [plane] distance to [barn] < 0
The plane just went past through the building.
Here are my questions:
- What did I do wrong when I changed the "If/else" statement? How come it worked when the target was the ground and not the barn or the windmill?
- How can I make the infinite loop (where I have the code for the engine sound and plane flying) stop after the crash?
I would appreciate any help. Thank you!
thank you!!
Last edited by lstricland; 08-13-2010 at 04:04 PM.
|