- 最后登录
- 2024-6-3
- 注册时间
- 2009-10-16
- 阅读权限
- 100
- 积分
- 18803
  
- 纳金币
- 17488
- 精华
- 1
|
Explode (Physics Behavior)
Summary
Simulates an explosion by forcing (pre-made) objects in a group away from one another.
Category
Latest Behaviors
Author
Gavin Kistner
Difficulty
(Reference)
Time to Complete
5 Minutes
Downloads
Click Here
to download the associated files.
(This document covers version 1.5.2.1 of the 'Explode' behavior, current as of 2005-Feb-11)
Description
This behavior simulates an explosion from an object when the mouse is clicked on it.
The behavior should be attached to a component/group, where it listens for mouse clicks on all of its children. When a child is clicked on explosion vectors are calculated for all other children on the group and they are animated for the explosion. This behavior is recursive so it will animate models within subgroups independently. All calculations are done with global transforms so the explosion vectors should be consisten through sub-groups.
The
Power
property needs to be modified based on the relative distance between objects. If no objects move when the explostion occurs, in the scene, increase the power. If the objects disappear immediately, then decrease it.
The
Depth
property (if not 0) is great for making explosions come right at the screen or away from the screen.
Basic Properties
Power
The amount of TNT in the explosion.
Impact
The impact radius of the explosion, used for calculating the velocity decay over distance.
Depth
The z-index of the explosion.
On Event
Actions
Explode
Initiate the explosion.
Demonstration
![]()
View Demonstration Project
![]()
Download Project File
|
|