Area3D with a MeshInstance3D that resizes itself based on a from and to position and damages any objects that enter it. Requires a child collision shape and mesh instance. Both with Capsule primitive shapes.
More...
#include <beam.hpp>
|
virtual void | _enter_tree () override |
| Get child collision shape and mesh instance. Assumes both have a Capsule primitive shape. Creates copies collision and mesh shapes.
|
|
virtual void | _process (double delta_time) override |
| Destroy self after end time passes.
|
|
void | body_entered (Node3D *node) |
| Deal damage on whatever enters this node. Configure what to damage using collision mask.
|
|
void | set_from_to (Vector3 from, Vector3 to) |
| Transform self and shapes to stretch from -> to.
|
|
void | set_end_time (float time_from_now) |
| Pass in a duration and set the destroy timer for this object.
|
|
Area3D with a MeshInstance3D that resizes itself based on a from and to position and damages any objects that enter it. Requires a child collision shape and mesh instance. Both with Capsule primitive shapes.
◆ _bind_methods()
void godot::Beam::_bind_methods |
( |
| ) |
|
|
staticprivate |
Required to be a valid godot class.
◆ _enter_tree()
void godot::Beam::_enter_tree |
( |
| ) |
|
|
overridevirtual |
Get child collision shape and mesh instance. Assumes both have a Capsule primitive shape. Creates copies collision and mesh shapes.
◆ _process()
void godot::Beam::_process |
( |
double |
delta_time | ) |
|
|
overridevirtual |
Destroy self after end time passes.
◆ body_entered()
void godot::Beam::body_entered |
( |
Node3D * |
node | ) |
|
Deal damage on whatever enters this node. Configure what to damage using collision mask.
◆ GDCLASS()
godot::Beam::GDCLASS |
( |
Beam |
, |
|
|
Area3D |
|
|
) |
| |
|
private |
◆ set_end_time()
void godot::Beam::set_end_time |
( |
float |
time_from_now | ) |
|
Pass in a duration and set the destroy timer for this object.
◆ set_from_to()
void godot::Beam::set_from_to |
( |
Vector3 |
from, |
|
|
Vector3 |
to |
|
) |
| |
Transform self and shapes to stretch from -> to.
◆ collision_shape
CollisionShape3D* godot::Beam::collision_shape {nullptr} |
|
private |
◆ end_time
float godot::Beam::end_time {0.f} |
|
private |
◆ mesh
Ref<CapsuleMesh> godot::Beam::mesh {} |
|
private |
◆ mesh_instance
MeshInstance3D* godot::Beam::mesh_instance {nullptr} |
|
private |
◆ shape
Ref<CapsuleShape3D> godot::Beam::shape {} |
|
private |
The documentation for this class was generated from the following files: