Compare commits
51 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e7de7ccf8c | |||
| fe36e8b423 | |||
| a7bff92899 | |||
| bfcf7b240e | |||
| 73b8bff1f3 | |||
| 1deb506fb2 | |||
| ae3cab6cd1 | |||
| a9b19d9af1 | |||
| cb7beae28c | |||
| 7ea26d10ee | |||
| 28e9ba1208 | |||
| f0c2fdead1 | |||
| 85ba5552e9 | |||
| 0a6653d079 | |||
| cfba8efd24 | |||
| 5a6374f013 | |||
| 1ae2f3f5f3 | |||
| 1961c16fe2 | |||
| d32a483bb4 | |||
| e23ea78aeb | |||
| 4153a31e3a | |||
| 0908be1e02 | |||
| 2ed5fad699 | |||
| 70374fa10e | |||
| 20468cba1b | |||
| 7749fc5474 | |||
| 6dd7f1a657 | |||
| 14b0a64720 | |||
| 8647267cad | |||
| ecab5de056 | |||
| 38d8cdded2 | |||
| 22c391df54 | |||
| f220d8088c | |||
| df2e4abb52 | |||
| 8867e7ac3c | |||
| 73a4336206 | |||
| f2ab02d860 | |||
| bf376f54b6 | |||
| 178402e964 | |||
| 36043010af | |||
| cb77c1ff97 | |||
| 69db32337d | |||
| 6af167675d | |||
| ecd823cb9f | |||
| 847c539373 | |||
| cb7f06573f | |||
| 6542d1b444 | |||
| bbf6058c17 | |||
| 0e51ae7dc9 | |||
| c912cd7a42 | |||
| 7f1016476b |
@@ -24,7 +24,9 @@ public:
|
|||||||
{
|
{
|
||||||
// Check if we are trying to add more than the package can fit.
|
// Check if we are trying to add more than the package can fit.
|
||||||
if (m_MaxPacketSize < m_Offset + sizeof(T)) {
|
if (m_MaxPacketSize < m_Offset + sizeof(T)) {
|
||||||
LOG_WARNING("Packet AddPrimitive(): You are trying to add more than we have allocated for! New size is %i bytes\n", m_MaxPacketSize*2);
|
if (m_MaxPacketSize >= 32000) {
|
||||||
|
LOG_WARNING("Package::WritePrimitive(): New size is huge %i bytes\n", m_MaxPacketSize*2);
|
||||||
|
}
|
||||||
resizeData();
|
resizeData();
|
||||||
}
|
}
|
||||||
memcpy(m_Data + m_Offset, &val, sizeof(T));
|
memcpy(m_Data + m_Offset, &val, sizeof(T));
|
||||||
|
|||||||
@@ -17,105 +17,107 @@ void CollisionSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& c
|
|||||||
EntityAABB& boxA = *boundingBox;
|
EntityAABB& boxA = *boundingBox;
|
||||||
bool everHitTheGround = false;
|
bool everHitTheGround = false;
|
||||||
|
|
||||||
auto prevPosIt = m_PrevPositions.find(entity);
|
if (entity == LocalPlayer) {
|
||||||
if (prevPosIt != m_PrevPositions.end()) {
|
auto prevPosIt = m_PrevPositions.find(entity);
|
||||||
glm::vec3 size = boxA.Size();
|
if (prevPosIt != m_PrevPositions.end()) {
|
||||||
float diameter = std::min(size.x, size.z);
|
glm::vec3 size = boxA.Size();
|
||||||
glm::vec3 prevOrigin = prevPosIt->second;
|
float diameter = std::min(size.x, size.z);
|
||||||
glm::vec3 toCurrentPos = boxA.Origin() - prevOrigin;
|
glm::vec3 prevOrigin = prevPosIt->second;
|
||||||
float rayLength = glm::length(toCurrentPos) + 0.5f*diameter;
|
glm::vec3 toCurrentPos = boxA.Origin() - prevOrigin;
|
||||||
//If the entity has moved farther than the size of its box, we need to handle it specially.
|
float rayLength = glm::length(toCurrentPos) + 0.5f*diameter;
|
||||||
if (rayLength > diameter) {
|
//If the entity has moved farther than the size of its box, we need to handle it specially.
|
||||||
Ray ray(prevOrigin, toCurrentPos);
|
if (rayLength > diameter) {
|
||||||
m_OctreeResult.clear();
|
Ray ray(prevOrigin, toCurrentPos);
|
||||||
m_Octree->ObjectsPossiblyHitByRay(ray, m_OctreeResult);
|
m_OctreeResult.clear();
|
||||||
for (auto& boxB : m_OctreeResult) {
|
m_Octree->ObjectsPossiblyHitByRay(ray, m_OctreeResult);
|
||||||
if (boxA.Entity == boxB.Entity) {
|
for (auto& boxB : m_OctreeResult) {
|
||||||
continue;
|
if (boxA.Entity == boxB.Entity) {
|
||||||
}
|
|
||||||
bool hit;
|
|
||||||
float dist;
|
|
||||||
if (boxB.Entity.HasComponent("Model")) {
|
|
||||||
RawModel* model;
|
|
||||||
std::string res = (std::string)boxB.Entity["Model"]["Resource"];
|
|
||||||
try {
|
|
||||||
model = ResourceManager::Load<RawModel, true>(res);
|
|
||||||
} catch (const std::exception&) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
float u, v;
|
bool hit;
|
||||||
hit = Collision::RayVsModel(ray, model->Vertices(), model->m_Indices, Transform::ModelMatrix(boxB.Entity), dist, u, v);
|
float dist;
|
||||||
} else {
|
if (boxB.Entity.HasComponent("Model")) {
|
||||||
hit = Collision::RayVsAABB(ray, boxB, dist);
|
RawModel* model;
|
||||||
}
|
std::string res = (std::string)boxB.Entity["Model"]["Resource"];
|
||||||
if (hit && dist < rayLength) {
|
try {
|
||||||
//Set the entity to where it was colliding, minus the maximum box size.
|
model = ResourceManager::Load<RawModel, true>(res);
|
||||||
//TODO: Perhaps this should be done slightly more properly.
|
} catch (const std::exception&) {
|
||||||
glm::vec3 newOriginPos = ray.Origin() + (dist - 0.707107f*diameter) * ray.Direction();
|
continue;
|
||||||
glm::vec3 resolve = newOriginPos - boxA.Origin();
|
}
|
||||||
(glm::vec3&)cTransform["Position"] += resolve;
|
float u, v;
|
||||||
boxA = *Collision::EntityAbsoluteAABB(entity);
|
hit = Collision::RayVsModel(ray, model->Vertices(), model->m_Indices, Transform::ModelMatrix(boxB.Entity), dist, u, v);
|
||||||
if (resolve.y > 0) {
|
} else {
|
||||||
everHitTheGround = true;
|
hit = Collision::RayVsAABB(ray, boxB, dist);
|
||||||
(bool)cPhysics["IsOnGround"] = true;
|
}
|
||||||
((glm::vec3&)cPhysics["Velocity"]).y = 0.f;
|
if (hit && dist < rayLength) {
|
||||||
|
//Set the entity to where it was colliding, minus the maximum box size.
|
||||||
|
//TODO: Perhaps this should be done slightly more properly.
|
||||||
|
glm::vec3 newOriginPos = ray.Origin() + (dist - 0.707107f*diameter) * ray.Direction();
|
||||||
|
glm::vec3 resolve = newOriginPos - boxA.Origin();
|
||||||
|
(glm::vec3&)cTransform["Position"] += resolve;
|
||||||
|
boxA = *Collision::EntityAbsoluteAABB(entity);
|
||||||
|
if (resolve.y > 0) {
|
||||||
|
everHitTheGround = true;
|
||||||
|
(bool)cPhysics["IsOnGround"] = true;
|
||||||
|
((glm::vec3&)cPhysics["Velocity"]).y = 0.f;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Collide against octree items
|
// Collide against octree items
|
||||||
m_OctreeResult.clear();
|
m_OctreeResult.clear();
|
||||||
m_Octree->ObjectsInSameRegion(*boundingBox, m_OctreeResult);
|
m_Octree->ObjectsInSameRegion(*boundingBox, m_OctreeResult);
|
||||||
for (auto& boxB : m_OctreeResult) {
|
for (auto& boxB : m_OctreeResult) {
|
||||||
glm::vec3 resolutionVector;
|
glm::vec3 resolutionVector;
|
||||||
if (boxA.Entity == boxB.Entity) {
|
if (boxA.Entity == boxB.Entity) {
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (boxB.Entity.HasComponent("Model") && Collision::AABBVsAABB(boxA, boxB)) {
|
|
||||||
//Here we know boxB is a entity with Collideable, AABB, and Model.
|
|
||||||
RawModel* model;
|
|
||||||
try {
|
|
||||||
model = ResourceManager::Load<RawModel, true>(boxB.Entity["Model"]["Resource"]);
|
|
||||||
} catch (const std::exception&) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
glm::mat4 modelMatrix = Transform::ModelMatrix(boxB.Entity);
|
if (boxB.Entity.HasComponent("Model") && Collision::AABBVsAABB(boxA, boxB)) {
|
||||||
|
//Here we know boxB is a entity with Collideable, AABB, and Model.
|
||||||
|
RawModel* model;
|
||||||
|
try {
|
||||||
|
model = ResourceManager::Load<RawModel, true>(boxB.Entity["Model"]["Resource"]);
|
||||||
|
} catch (const std::exception&) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
glm::vec3 inOutVelocity = (glm::vec3)cPhysics["Velocity"];
|
glm::mat4 modelMatrix = Transform::ModelMatrix(boxB.Entity);
|
||||||
bool notMovingxz = glm::all(glm::lessThan(glm::abs(glm::vec2(inOutVelocity.x, inOutVelocity.z)), glm::vec2(0.01f))) && prevPosIt != m_PrevPositions.end();
|
|
||||||
bool isOnGround = (bool)cPhysics["IsOnGround"];
|
glm::vec3 inOutVelocity = (glm::vec3)cPhysics["Velocity"];
|
||||||
float verticalStepHeight = (float)(double)cPhysics["VerticalStepHeight"];
|
bool notMovingxz = glm::all(glm::lessThan(glm::abs(glm::vec2(inOutVelocity.x, inOutVelocity.z)), glm::vec2(0.01f))) && prevPosIt != m_PrevPositions.end();
|
||||||
if (Collision::AABBvsTriangles(boxA, model->Vertices(), model->m_Indices, modelMatrix, inOutVelocity, verticalStepHeight, isOnGround, resolutionVector)) {
|
bool isOnGround = (bool)cPhysics["IsOnGround"];
|
||||||
//Move the position to previous position if it is not moving in the xz-plane, else resolve with the resolution vector.
|
float verticalStepHeight = (float)(double)cPhysics["VerticalStepHeight"];
|
||||||
(glm::vec3&)cTransform["Position"] += notMovingxz ? prevPosIt->second - boxA.Origin() : resolutionVector;
|
if (Collision::AABBvsTriangles(boxA, model->Vertices(), model->m_Indices, modelMatrix, inOutVelocity, verticalStepHeight, isOnGround, resolutionVector)) {
|
||||||
|
//Move the position to previous position if it is not moving in the xz-plane, else resolve with the resolution vector.
|
||||||
|
(glm::vec3&)cTransform["Position"] += notMovingxz ? prevPosIt->second - boxA.Origin() : resolutionVector;
|
||||||
|
boxA = *Collision::EntityAbsoluteAABB(entity);
|
||||||
|
cPhysics["Velocity"] = inOutVelocity;
|
||||||
|
if (isOnGround) {
|
||||||
|
everHitTheGround = true;
|
||||||
|
(bool)cPhysics["IsOnGround"] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (Collision::AABBVsAABB(boxA, boxB, resolutionVector)) {
|
||||||
|
//Enter here if boxB has no Model.
|
||||||
|
(glm::vec3&)cTransform["Position"] += resolutionVector;
|
||||||
boxA = *Collision::EntityAbsoluteAABB(entity);
|
boxA = *Collision::EntityAbsoluteAABB(entity);
|
||||||
cPhysics["Velocity"] = inOutVelocity;
|
if (resolutionVector.y > 0) {
|
||||||
if (isOnGround) {
|
|
||||||
everHitTheGround = true;
|
everHitTheGround = true;
|
||||||
(bool)cPhysics["IsOnGround"] = true;
|
(bool)cPhysics["IsOnGround"] = true;
|
||||||
|
((glm::vec3&)cPhysics["Velocity"]).y = 0.f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (Collision::AABBVsAABB(boxA, boxB, resolutionVector)) {
|
|
||||||
//Enter here if boxB has no Model.
|
|
||||||
(glm::vec3&)cTransform["Position"] += resolutionVector;
|
|
||||||
boxA = *Collision::EntityAbsoluteAABB(entity);
|
|
||||||
if (resolutionVector.y > 0) {
|
|
||||||
everHitTheGround = true;
|
|
||||||
(bool)cPhysics["IsOnGround"] = true;
|
|
||||||
((glm::vec3&)cPhysics["Velocity"]).y = 0.f;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//This should apply air friction and such, iff zero models were hit.
|
//This should apply air friction and such, iff zero models were hit.
|
||||||
if (!everHitTheGround) {
|
if (!everHitTheGround) {
|
||||||
(bool)cPhysics["IsOnGround"] = false;
|
(bool)cPhysics["IsOnGround"] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_PrevPositions[entity] = boxA.Origin();
|
m_PrevPositions[entity] = boxA.Origin();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,18 +49,24 @@ void Packet::WriteString(const std::string& str)
|
|||||||
// Message, add one extra byte for null terminator
|
// Message, add one extra byte for null terminator
|
||||||
size_t sizeOfString = str.size() + 1;
|
size_t sizeOfString = str.size() + 1;
|
||||||
if (m_Offset + sizeOfString > m_MaxPacketSize) {
|
if (m_Offset + sizeOfString > m_MaxPacketSize) {
|
||||||
//LOG_WARNING("Package::WriteString(): Data size in packet exceeded maximum package size. New size is %i bytes\n", m_MaxPacketSize*2);
|
if (m_MaxPacketSize >= 32000) {
|
||||||
|
LOG_WARNING("Package::WriteString(): New size is huge %i bytes\n", m_MaxPacketSize*2);
|
||||||
|
}
|
||||||
resizeData();
|
resizeData();
|
||||||
}
|
}
|
||||||
memcpy(m_Data + m_Offset, str.data(), sizeOfString * sizeof(char));
|
memcpy(m_Data + m_Offset, str.data(), str.size() * sizeof(char));
|
||||||
m_Offset += sizeOfString * sizeof(char);
|
m_Offset += str.size() * sizeof(char);
|
||||||
|
m_Data[m_Offset] = '\0';
|
||||||
|
m_Offset += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Packet::WriteData(char * data, int sizeOfData)
|
void Packet::WriteData(char * data, int sizeOfData)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (m_Offset + sizeOfData > m_MaxPacketSize) {
|
if (m_Offset + sizeOfData > m_MaxPacketSize) {
|
||||||
//LOG_WARNING("Packet::WriteData(): Data size in packet exceeded maximum packet size. New size is %i bytes\n", m_MaxPacketSize*2);
|
if (m_MaxPacketSize >= 32000) {
|
||||||
|
LOG_WARNING("Package::WriteData(): New size is huge %i bytes\n", m_MaxPacketSize*2);
|
||||||
|
}
|
||||||
while (m_Offset + sizeOfData > m_MaxPacketSize) {
|
while (m_Offset + sizeOfData > m_MaxPacketSize) {
|
||||||
resizeData();
|
resizeData();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,10 @@ size_t TCPClient::readBuffer()
|
|||||||
boost::asio::ip::tcp::socket::message_peek, error);
|
boost::asio::ip::tcp::socket::message_peek, error);
|
||||||
unsigned int sizeOfPacket = 0;
|
unsigned int sizeOfPacket = 0;
|
||||||
memcpy(&sizeOfPacket, m_ReadBuffer, sizeof(int));
|
memcpy(&sizeOfPacket, m_ReadBuffer, sizeof(int));
|
||||||
|
if (sizeOfPacket > m_Socket->available()) {
|
||||||
|
LOG_WARNING("TCPClient::readBuffer(): We haven't got the whole packet yet.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
// if the buffer is to small increase the size of it
|
// if the buffer is to small increase the size of it
|
||||||
// TODO if message is huge 1 time the buffer will not decrease.
|
// TODO if message is huge 1 time the buffer will not decrease.
|
||||||
if (sizeOfPacket > m_BufferSize) {
|
if (sizeOfPacket > m_BufferSize) {
|
||||||
|
|||||||
@@ -106,7 +106,10 @@ int TCPServer::readBuffer(PlayerDefinition & playerDefinition)
|
|||||||
boost::asio::ip::tcp::socket::message_peek, error);
|
boost::asio::ip::tcp::socket::message_peek, error);
|
||||||
unsigned int sizeOfPacket = 0;
|
unsigned int sizeOfPacket = 0;
|
||||||
memcpy(&sizeOfPacket, m_ReadBuffer, sizeof(int));
|
memcpy(&sizeOfPacket, m_ReadBuffer, sizeof(int));
|
||||||
|
if (sizeOfPacket > playerDefinition.TCPSocket->available()) {
|
||||||
|
LOG_WARNING("TCPServer::readBuffer(): We haven't got the whole packet yet.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
// if the buffer is to small increase the size of it
|
// if the buffer is to small increase the size of it
|
||||||
if (sizeOfPacket > m_BufferSize) {
|
if (sizeOfPacket > m_BufferSize) {
|
||||||
delete[] m_ReadBuffer;
|
delete[] m_ReadBuffer;
|
||||||
|
|||||||
@@ -45,7 +45,10 @@ int UDPClient::readBuffer()
|
|||||||
boost::asio::ip::udp::socket::message_peek, error);
|
boost::asio::ip::udp::socket::message_peek, error);
|
||||||
int sizeOfPacket = 0;
|
int sizeOfPacket = 0;
|
||||||
memcpy(&sizeOfPacket, m_ReadBuffer, sizeof(int));
|
memcpy(&sizeOfPacket, m_ReadBuffer, sizeof(int));
|
||||||
|
if (sizeOfPacket > m_Socket->available()) {
|
||||||
|
LOG_WARNING("UDPClient::readBuffer(): We haven't got the whole packet yet.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
// if the buffer is to small increase the size of it
|
// if the buffer is to small increase the size of it
|
||||||
if (sizeOfPacket > m_BufferSize) {
|
if (sizeOfPacket > m_BufferSize) {
|
||||||
delete[] m_ReadBuffer;
|
delete[] m_ReadBuffer;
|
||||||
|
|||||||
@@ -92,6 +92,11 @@ int UDPServer::readBuffer()
|
|||||||
unsigned int sizeOfPacket = 0;
|
unsigned int sizeOfPacket = 0;
|
||||||
memcpy(&sizeOfPacket, m_ReadBuffer, sizeof(int));
|
memcpy(&sizeOfPacket, m_ReadBuffer, sizeof(int));
|
||||||
|
|
||||||
|
if (sizeOfPacket > m_Socket->available()) {
|
||||||
|
LOG_WARNING("UDPServer::readBuffer(): We haven't got the whole packet yet.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// if the buffer is to small increase the size of it
|
// if the buffer is to small increase the size of it
|
||||||
if (sizeOfPacket > m_BufferSize) {
|
if (sizeOfPacket > m_BufferSize) {
|
||||||
delete[] m_ReadBuffer;
|
delete[] m_ReadBuffer;
|
||||||
|
|||||||
@@ -18,14 +18,9 @@ PlayerMovementSystem::~PlayerMovementSystem()
|
|||||||
void PlayerMovementSystem::Update(double dt)
|
void PlayerMovementSystem::Update(double dt)
|
||||||
{
|
{
|
||||||
updateMovementControllers(dt);
|
updateMovementControllers(dt);
|
||||||
if (IsServer) {
|
// Only do physics calculations on client and only for themselves.
|
||||||
for (auto& kv : m_PlayerInputControllers) {
|
if (IsClient && LocalPlayer.Valid()) {
|
||||||
updateVelocity(kv.first, dt);
|
updateVelocity(LocalPlayer, dt);
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (LocalPlayer.Valid()) {
|
|
||||||
updateVelocity(LocalPlayer, dt);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ void DefenderWeaponBehaviour::dealDamage(WeaponInfo& wi, glm::vec3 direction, do
|
|||||||
if (!wi.Player.Valid()) {
|
if (!wi.Player.Valid()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
glm::vec3 maxRange = direction * 2.f;
|
glm::vec3 maxRange = direction * 2.f;
|
||||||
EntityWrapper camera = wi.Player.FirstChildByName("Camera");
|
EntityWrapper camera = wi.Player.FirstChildByName("Camera");
|
||||||
glm::vec3 cameraPosition = Transform::AbsolutePosition(camera);
|
glm::vec3 cameraPosition = Transform::AbsolutePosition(camera);
|
||||||
@@ -147,8 +147,9 @@ void DefenderWeaponBehaviour::dealDamage(WeaponInfo& wi, glm::vec3 direction, do
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check for friendly fire
|
// Check for friendly fire
|
||||||
|
//this needs to not return, for the boosts. in all weaponclasses: assault,defender,sniper
|
||||||
if ((ComponentInfo::EnumType)victim["Team"]["Team"] == (ComponentInfo::EnumType)wi.Player["Team"]["Team"]) {
|
if ((ComponentInfo::EnumType)victim["Team"]["Team"] == (ComponentInfo::EnumType)wi.Player["Team"]["Team"]) {
|
||||||
return;
|
damage = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deal damage!
|
// Deal damage!
|
||||||
@@ -177,11 +178,11 @@ Camera DefenderWeaponBehaviour::cameraFromEntity(EntityWrapper camera)
|
|||||||
ComponentWrapper cTransform = camera["Transform"];
|
ComponentWrapper cTransform = camera["Transform"];
|
||||||
ComponentWrapper cCamera = camera["Camera"];
|
ComponentWrapper cCamera = camera["Camera"];
|
||||||
Camera cam(
|
Camera cam(
|
||||||
(float)m_Renderer->Resolution().Width / m_Renderer->Resolution().Height,
|
(float)m_Renderer->Resolution().Width / m_Renderer->Resolution().Height,
|
||||||
(double)cCamera["FOV"],
|
(double)cCamera["FOV"],
|
||||||
(double)cCamera["NearClip"],
|
(double)cCamera["NearClip"],
|
||||||
(double)cCamera["FarClip"]
|
(double)cCamera["FarClip"]
|
||||||
);
|
);
|
||||||
cam.SetPosition(cTransform["Position"]);
|
cam.SetPosition(cTransform["Position"]);
|
||||||
cam.SetOrientation(glm::quat((const glm::vec3&)cTransform["Orientation"]));
|
cam.SetOrientation(glm::quat((const glm::vec3&)cTransform["Orientation"]));
|
||||||
return cam;
|
return cam;
|
||||||
|
|||||||
Reference in New Issue
Block a user