Physics working
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#ifndef HYDRASETWORLDTRANSFORMTASK
|
||||
#define HYDRASETWORLDTRANSFORMTASK
|
||||
|
||||
|
||||
#include "../HydraTask.h"
|
||||
#include "../../engine/HydraEngine.h"
|
||||
#include "../../renderer/HydraRenderer.h"
|
||||
#include <GLMIncludes.h>
|
||||
#include "../../GlewIncludes.h"
|
||||
#include "../../buffer/HydraTextureBufferManager.h"
|
||||
#include "../../actor/HydraActorManager.h"
|
||||
#include <box3d/box3d.h>
|
||||
|
||||
class HydraSetWorldTransformTask : public HydraTask
|
||||
{
|
||||
private:
|
||||
HydraID m_entity_id = INVALID_HYDRA_ID;
|
||||
glm::dvec3 m_position = {};
|
||||
glm::vec3 m_rotation = {};
|
||||
|
||||
protected:
|
||||
public:
|
||||
void Process() override
|
||||
{
|
||||
GetEngine()->ActorManager()->SetPositionAndOrientation(m_entity_id, m_position, m_rotation, true);
|
||||
|
||||
}
|
||||
void Initialise(HydraID entity_id, glm::dvec3 position, glm::vec3 rotation)
|
||||
{
|
||||
m_entity_id = entity_id;
|
||||
m_position = position;
|
||||
m_rotation = rotation;
|
||||
}
|
||||
};
|
||||
#endif /* HYDRASETWORLDTRANSFORMTASK */
|
||||
Reference in New Issue
Block a user