# Car Behavior turning speed = different soudfx?

0 favourites
• 9 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
• I have a player that's controlled y the computer using the Car behavior. The car can turn at different speeds depending on the type of corner it is on, therefore acting as if it's being operated by an analog gamepad rather than a digital keyboard (where the turn speed is fixed). Is there a way of measuring how fast the car is turning, ad be able to assign different "screech" soundfx? A slow, gentle turn has a miniscreech, a full push of the joystick give a huge screen, etc?

• You have to have different sound files for each type of screech. Then measure the angle of turn (or maybe the rate of angular turning) and play the different sound files for each subset of action.

• You have to have different sound files for each type of screech. Then measure the angle of turn (or maybe the rate of angular turning) and play the different sound files for each subset of action.

Yeah, can the rate of the turn be measured, independently from the speed of the car?

• global number rateOfTurn=0

global number previousAngle=0

everytick

--- set rateOfTurn to (sprite.angle-previousAngle)/dt

--- set previousAngle to sprite.angle

• global number rateOfTurn=0

global number previousAngle=0

everytick

--- set rateOfTurn to (sprite.angle-previousAngle)/dt

--- set previousAngle to sprite.angle

Thanks! This seems to increase as the cars speed increases, is there a way to subtract the cars speed changes from the turn speed?

• global number rateOfTurn=0

global number previousAngle=0

everytick

--- set rateOfTurn to (sprite.angle-previousAngle)/dt

--- set previousAngle to sprite.angle

Trying again, this seems to increase as the cars speed increases, but the rate of turn appears to be the same, no matter how fast the car turns?

• Nothing comes to mind. Reading your initial post maybe you can make the sound depend of the joystick instead of the turning rate?

• ## Try Construct 3

Develop games in your browser. Powerful, performant & highly capable.

Construct 3 users don't see these ads
• Nothing comes to mind. Reading your initial post maybe you can make the sound depend of the joystick instead of the turning rate?

The car is computer driven, so maybe that has something to do with it :/ Can the amount of angles changed per second be calculated somehow?

• This seems to increase as the cars speed increases, is there a way to subtract the cars speed changes from the turn speed?