Arrekusu Muromachi
SL Fighter Ace
Join date: 20 Feb 2005
Posts: 32
|
01-07-2006 16:09
Alright. This is getting to me and I'm not sure how to fix it.
As part of a two-step process in making a low-speed taxi-system for my planes. I have to go into colliision detection to set one of two states to get my planes to either bank at higher speed while in the air or yaw at lower speeds on the ground. Here's the trouble I'm having.
The collision detection is bouncy. The dectection state that I set bounces almost every second when my plane's on the ground. Is there any delay that I can program or any way to level the state to where,
always on Solid Ground/Object = TRUE always in Air = FALSE
Instead of Solid Ground/Object = True/False/True/False/True/False...etc...etc...
|
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
|
01-07-2006 16:48
When you have an iffy detection signal, it's best to use it only to turn ON or OFF a system, not both.
So... If you're over a certain speed, turn off the taxi system and leave it off even if you get a collision signal. But, when under that speed, wait for a collision to turn on the taxi system.
|
Arrekusu Muromachi
SL Fighter Ace
Join date: 20 Feb 2005
Posts: 32
|
01-08-2006 08:48
That's what I have on now but I have a problem. It won't turn off the system when I tell it to end a collision. It just won't switch over.
|
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
|
01-08-2006 11:55
Ok, assuming there's a script in the "tire" prim that sends "WHAM" when it gets a collision_start() event trigger, then in your control script: integer taxi = FALSE; default { //brevity, doncha know. control(key id, integer level, integer edge) { if ( llVecmag(llGetVel()) > 7.0 ) taxi = FALSE; // Over a certain speed, we're gonna roll (even if we're on a runway) if( CONTROL_ROT_LEFT & level ) // I'm being lazy here - so sue me :P { if(taxi) { //yaw } else { //roll } } } link_message(integer src, integer num, string msg, key id) { if ( msg == "WHAM" ) taxi = TRUE; // If the wheels contact something, we'll consider taxiing } } Hope that helps.
|