Added capsule collider component

This commit is contained in:
Antoine Pilote
2023-04-02 19:01:40 -04:00
parent 17849584e5
commit 80eadc2a5a
9 changed files with 144 additions and 46 deletions

View File

@@ -38,7 +38,7 @@ void EditorSelectionPanel::ResolveFile(Ref<Nuake::File> file)
void EditorSelectionPanel::Draw(EditorSelection selection)
{
if (ImGui::Begin("Propreties"))
if (ImGui::Begin("Properties"))
{
switch (selection.Type)
{
@@ -101,6 +101,7 @@ void EditorSelectionPanel::DrawEntity(Nuake::Entity entity)
mRigidbodyPanel.Draw(entity);
mBoxColliderPanel.Draw(entity);
mSphereColliderPanel.Draw(entity);
mCapsuleColliderPanel.Draw(entity);
mMeshColliderPanel.Draw(entity);
mCharacterControllerPanel.Draw(entity);
}
@@ -126,6 +127,7 @@ void EditorSelectionPanel::DrawAddComponentMenu(Nuake::Entity entity)
MenuItemComponent("Character Controller", Nuake::CharacterControllerComponent)
MenuItemComponent("Rigid body", Nuake::RigidBodyComponent)
MenuItemComponent("Box collider", Nuake::BoxColliderComponent)
MenuItemComponent("Capsule collider", Nuake::CapsuleColliderComponent)
MenuItemComponent("Sphere collider", Nuake::SphereColliderComponent)
MenuItemComponent("Mesh collider", Nuake::MeshColliderComponent)
ImGui::Separator();

View File

@@ -13,6 +13,7 @@
#include "../ComponentsPanel/CameraPanel.h"
#include "../ComponentsPanel/RigidbodyPanel.h"
#include "../ComponentsPanel/BoxColliderPanel.h"
#include "../ComponentsPanel/CapsuleColliderPanel.h"
#include "../ComponentsPanel/SphereColliderPanel.h"
#include "../ComponentsPanel/MeshColliderPanel.h"
#include "../ComponentsPanel/CharacterControllerPanel.h"
@@ -29,6 +30,8 @@ private:
BoxColliderPanel mBoxColliderPanel;
SphereColliderPanel mSphereColliderPanel;
MeshColliderPanel mMeshColliderPanel;
CapsuleColliderPanel mCapsuleColliderPanel;
CharacterControllerPanel mCharacterControllerPanel;
Ref<Nuake::File> currentFile;