Jul 19, 2010 at 7:52 AM
Hi All, Again playing around and was wondering whether its possible to only trigger a sound when an object hits another object. (IF the object is leaning on another object because of gravity the sound should not be fired) EG: a glass sitting on a table should not fire a sound, if the glass falls on the table it should
Jul 19, 2010 at 2:27 PM
You can do some basic stuff like this using the PhysicsSoundBehavior. Under Properties for the PhysicsSoundBehavior, click the New button next to TriggerType and select PhysicsCollisionTrigger. This will allow you to set BodyOne and BodyTwo properties on the trigger. Normally you would check the MatchLikeBodyNames property so that any similar sprite names will cause the trigger. Then set your Source and other properties for the sound.