generated from Persson-dev/Godot-Xmake
Compare commits
3 Commits
ad7b48d1fb
...
39b9e6039c
| Author | SHA1 | Date | |
|---|---|---|---|
| 39b9e6039c | |||
| da8232f62b | |||
| ed771ad861 |
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -2,3 +2,4 @@
|
|||||||
*.png filter=lfs diff=lfs merge=lfs -text
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
*.fbx filter=lfs diff=lfs merge=lfs -text
|
*.fbx filter=lfs diff=lfs merge=lfs -text
|
||||||
*.glb filter=lfs diff=lfs merge=lfs -text
|
*.glb filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.res filter=lfs diff=lfs merge=lfs -text
|
||||||
|
|||||||
BIN
godot/Assets/Animations/Shooter_Pack.res
LFS
Normal file
BIN
godot/Assets/Animations/Shooter_Pack.res
LFS
Normal file
Binary file not shown.
BIN
godot/Assets/Models/Characters/Remy/Remy_Body.res
LFS
Normal file
BIN
godot/Assets/Models/Characters/Remy/Remy_Body.res
LFS
Normal file
Binary file not shown.
BIN
godot/Assets/Models/Characters/Remy/Remy_Bottoms.res
LFS
Normal file
BIN
godot/Assets/Models/Characters/Remy/Remy_Bottoms.res
LFS
Normal file
Binary file not shown.
BIN
godot/Assets/Models/Characters/Remy/Remy_Eyelashes.res
LFS
Normal file
BIN
godot/Assets/Models/Characters/Remy/Remy_Eyelashes.res
LFS
Normal file
Binary file not shown.
BIN
godot/Assets/Models/Characters/Remy/Remy_Eyes.res
LFS
Normal file
BIN
godot/Assets/Models/Characters/Remy/Remy_Eyes.res
LFS
Normal file
Binary file not shown.
BIN
godot/Assets/Models/Characters/Remy/Remy_Hair.res
LFS
Normal file
BIN
godot/Assets/Models/Characters/Remy/Remy_Hair.res
LFS
Normal file
Binary file not shown.
BIN
godot/Assets/Models/Characters/Remy/Remy_Shoes.res
LFS
Normal file
BIN
godot/Assets/Models/Characters/Remy/Remy_Shoes.res
LFS
Normal file
Binary file not shown.
BIN
godot/Assets/Models/Characters/Remy/Remy_Tops.res
LFS
Normal file
BIN
godot/Assets/Models/Characters/Remy/Remy_Tops.res
LFS
Normal file
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -58,6 +58,8 @@ void FirstPersonPlayer::_ready() {
|
|||||||
m_Head->add_child(m_Camera);
|
m_Head->add_child(m_Camera);
|
||||||
m_Camera->make_current();
|
m_Camera->make_current();
|
||||||
|
|
||||||
|
SetModelVisible(false);
|
||||||
|
|
||||||
SetPosition({0, 100, 0});
|
SetPosition({0, 100, 0});
|
||||||
SetVelocity({0, 0, 0});
|
SetVelocity({0, 0, 0});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
#include <godot_cpp/classes/engine.hpp>
|
#include <godot_cpp/classes/engine.hpp>
|
||||||
#include <godot_cpp/classes/input.hpp>
|
#include <godot_cpp/classes/input.hpp>
|
||||||
#include <godot_cpp/classes/input_map.hpp>
|
#include <godot_cpp/classes/input_map.hpp>
|
||||||
|
#include <godot_cpp/classes/mesh_instance3d.hpp>
|
||||||
|
#include <godot_cpp/classes/skeleton3d.hpp>
|
||||||
#include <godot_cpp/core/class_db.hpp>
|
#include <godot_cpp/core/class_db.hpp>
|
||||||
#include <godot_cpp/variant/utility_functions.hpp>
|
#include <godot_cpp/variant/utility_functions.hpp>
|
||||||
|
|
||||||
@@ -98,7 +100,14 @@ void Player::BlendAnimation(const godot::String& a_AnimationName, float a_Goal,
|
|||||||
a_AnimationName, UtilityFunctions::lerp(m_AnimationTree->get(a_AnimationName), a_Goal, a_Delta * AnimationBlend));
|
a_AnimationName, UtilityFunctions::lerp(m_AnimationTree->get(a_AnimationName), a_Goal, a_Delta * AnimationBlend));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::SetModelVisible(bool visible) {}
|
void Player::SetModelVisible(bool a_Visible) {
|
||||||
|
auto* skeleton = m_Mesh->get_node<Skeleton3D>("Skeleton3D");
|
||||||
|
for (int i = 0; i < skeleton->get_child_count(); i++) {
|
||||||
|
auto* bodyPart = Object::cast_to<MeshInstance3D>(skeleton->get_child(i));
|
||||||
|
bodyPart->set_cast_shadows_setting(a_Visible ? GeometryInstance3D::ShadowCastingSetting::SHADOW_CASTING_SETTING_ON
|
||||||
|
: GeometryInstance3D::ShadowCastingSetting::SHADOW_CASTING_SETTING_SHADOWS_ONLY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Vector3 Player::GetCameraRotation() const {
|
Vector3 Player::GetCameraRotation() const {
|
||||||
return m_Player->get_rotation();
|
return m_Player->get_rotation();
|
||||||
|
|||||||
Reference in New Issue
Block a user