|
WHAT IS 3D RAD? CLICK HERE TO FIND OUT!
|
|
|
Projectile
The Projectile object allows you to shoot a series of RigidBody
objects linked to it, one after the other, towards the direction specified by the arrow, at a specified speed.
The shooting action is performed as soon as the Projectile object is started by another
object (like EventOnInput)
or by a Script.
A parameter on the Projectile object's property dialog allows you to set bullet lifetime.
When a RigidBody bullet has expired (lifetime elapsed) it will disappear
and will become re-usable (shootable again).
In the Virtual Editor, the Projectile object is an arrow you can orient or attach to
any moving object, like a Car object (see ProjectileDemo sample project).
The arrow can also be attached to animated character bones,
like the arm of a soldier (see SkinMeshBoneProjectilesDemo sample project).
An internal parameter for the Projectile object contains the object handle of the
RigidBody bullet that has just been shot and another the handle of the RigidBody that has
just expired. This allows a script to hide/show/start/stop any object related to the
bullet when it is shot or when it disappears (see ProjectileObjectInternalParams sample project).
Projectile velocity
The speed at which each RigidBody object will be thrown, in meters per second.
Important!
Very fast RigidBody objects may fail to properly rebound against solid surfaces and go through them,
due to limits with CPU's finite math calculations.
A typical workaround is using an EventOnContact object to hide the bullet
as soon as a collision is detected for it (see ProjectileHideOnContact.3dr sample project).
Inherit parent inertia
When un-checked, this option prevents the projectiles from being affected by the parent object speed.
Projectile lifetime
Time, in seconds, after which a RigidBody bullet gets re-usable, after it has been shot.
If this parameter is zero, bullets will become re-usable as soon as all others have been shot.
NOTE: if a projectile is hidden by another object (like EventOnContact)
it expires, thus becoming re-usable immediately.
Display arrow
Check this option to visualize the Projectile object arrow run-time.
Relationships
This list defines how the Projectile object relates to the objects linked to it.
The following relationship types are supported:
IGNORE. Do nothing.
PROJECTILE. Use this object as a bullet. The object is usually a RigidBody object.
PARENT. If the Projectile object is linked to another object AND the other object is set
as PARENT, then it becomes the Projectile object parent. Run-time, when the parent moves
and rotates, the bullet launcher will follow it, keeping it's relative position as you set
it in the Virtual Editor.
For information about the remaining controls, please click here.
INTERNAL PARAMETERS
The following internal parameters can be accessed by using event objects like
EventOnValue or Script:
Thrown object. This is the OBJ_ handle of the RigidBody object that has just been shot.
Please see Script object's help file for details on OBJ_ parameters.
Expired object. The OBJ_ handle of the RigidBody object that has just become re-usable.
|
|