Remove ERR_EXPLAIN from scene/* code
This commit is contained in:
parent
d2a67c9c1f
commit
af5e0fff66
36 changed files with 157 additions and 473 deletions
|
|
@ -684,15 +684,8 @@ void Spatial::look_at(const Vector3 &p_target, const Vector3 &p_up) {
|
|||
|
||||
void Spatial::look_at_from_position(const Vector3 &p_pos, const Vector3 &p_target, const Vector3 &p_up) {
|
||||
|
||||
if (p_pos == p_target) {
|
||||
ERR_EXPLAIN("Node origin and target are in the same position, look_at() failed");
|
||||
ERR_FAIL();
|
||||
}
|
||||
|
||||
if (p_up.cross(p_target - p_pos) == Vector3()) {
|
||||
ERR_EXPLAIN("Up vector and direction between node origin and target are aligned, look_at() failed");
|
||||
ERR_FAIL();
|
||||
}
|
||||
ERR_FAIL_COND_MSG(p_pos == p_target, "Node origin and target are in the same position, look_at() failed.");
|
||||
ERR_FAIL_COND_MSG(p_up.cross(p_target - p_pos) == Vector3(), "Up vector and direction between node origin and target are aligned, look_at() failed.");
|
||||
|
||||
Transform lookat;
|
||||
lookat.origin = p_pos;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue