Camera Collision fix. Still have some minor bugs #345
|
@ -1,10 +1,10 @@
|
|||
0 StaticObject 1100000000000000
|
||||
0 StaticObject 1110000000000000
|
||||
1 Player 1100000000000000
|
||||
2 Food 1000000000000000
|
||||
3 Breakable 1100000000000000
|
||||
4 ScoringWallCollider 0100000000000000
|
||||
5 Homeowner 1100000000000000
|
||||
6 Camera 1100000000000000
|
||||
6 Camera 0010000000000000
|
||||
7 8 0000000000000000
|
||||
8 9 0000000000000000
|
||||
9 10 0000000000000000
|
||||
|
|
|
@ -8994,7 +8994,7 @@
|
|||
Collider Component:
|
||||
Colliders:
|
||||
- Is Trigger: false
|
||||
Collision Tag: 0
|
||||
Collision Tag: 2
|
||||
Type: Box
|
||||
Half Extents: {x: 0.25, y: 0.25, z: 0.100000001}
|
||||
Friction: 0.400000006
|
||||
|
@ -9041,7 +9041,7 @@
|
|||
Collider Component:
|
||||
Colliders:
|
||||
- Is Trigger: false
|
||||
Collision Tag: 0
|
||||
Collision Tag: 2
|
||||
Type: Box
|
||||
Half Extents: {x: 0.300000012, y: 0.200000003, z: 0.200000003}
|
||||
Friction: 0.400000006
|
||||
|
@ -9088,7 +9088,7 @@
|
|||
Collider Component:
|
||||
Colliders:
|
||||
- Is Trigger: false
|
||||
Collision Tag: 0
|
||||
Collision Tag: 2
|
||||
Type: Box
|
||||
Half Extents: {x: 0.200000003, y: 0.0799999982, z: 0.200000003}
|
||||
Friction: 0.400000006
|
||||
|
@ -9135,7 +9135,7 @@
|
|||
Collider Component:
|
||||
Colliders:
|
||||
- Is Trigger: false
|
||||
Collision Tag: 0
|
||||
Collision Tag: 2
|
||||
Type: Box
|
||||
Half Extents: {x: 0.200000003, y: 0.0500000007, z: 0.200000003}
|
||||
Friction: 0.400000006
|
||||
|
@ -9182,7 +9182,7 @@
|
|||
Collider Component:
|
||||
Colliders:
|
||||
- Is Trigger: false
|
||||
Collision Tag: 0
|
||||
Collision Tag: 2
|
||||
Type: Box
|
||||
Half Extents: {x: 0.25, y: 0.0500000007, z: 0.200000003}
|
||||
Friction: 0.400000006
|
||||
|
@ -9281,7 +9281,7 @@
|
|||
Collider Component:
|
||||
Colliders:
|
||||
- Is Trigger: false
|
||||
Collision Tag: 0
|
||||
Collision Tag: 3
|
||||
Type: Box
|
||||
Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007}
|
||||
Friction: 0.400000006
|
||||
|
@ -9322,7 +9322,7 @@
|
|||
Collider Component:
|
||||
Colliders:
|
||||
- Is Trigger: false
|
||||
Collision Tag: 0
|
||||
Collision Tag: 3
|
||||
Type: Box
|
||||
Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007}
|
||||
Friction: 0.400000006
|
||||
|
@ -9363,7 +9363,7 @@
|
|||
Collider Component:
|
||||
Colliders:
|
||||
- Is Trigger: false
|
||||
Collision Tag: 0
|
||||
Collision Tag: 3
|
||||
Type: Box
|
||||
Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007}
|
||||
Friction: 0.400000006
|
||||
|
@ -9404,7 +9404,7 @@
|
|||
Collider Component:
|
||||
Colliders:
|
||||
- Is Trigger: false
|
||||
Collision Tag: 0
|
||||
Collision Tag: 3
|
||||
Type: Box
|
||||
Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007}
|
||||
Friction: 0.400000006
|
||||
|
@ -9681,7 +9681,7 @@
|
|||
throwForce: [8, 10, 8]
|
||||
cameraArmOffSet: [0, 0.25, 0]
|
||||
delayTimer: 1
|
||||
aimingLength: 0.5
|
||||
aimingLength: 1
|
||||
throwItem: false
|
||||
rayDistance: 0.5
|
||||
- EID: 3
|
||||
|
|
|
@ -183,8 +183,8 @@ namespace SHADE
|
|||
//SHLOG_INFO("Ray position: {},{},{} direction:{},{},{}",pivot.ray.position.x, pivot.ray.position.y, pivot.ray.position.z,pivot.ray.direction.x, pivot.ray.direction.y, pivot.ray.direction.z)
|
||||
SHRaycaster::RaycastInfo info;
|
||||
//info.layers = (SHCollisionTagMatrix::GetTag("7")->GetMask());
|
||||
info.layers = (uint16_t)(SHCollisionTag::Layer::ALL);
|
||||
info.distance = 1000000.0f;
|
||||
info.layers = (uint16_t)(SHCollisionTagMatrix::GetTag("Camera")->GetMask());
|
||||
info.distance = pivot.armLength;
|
||||
info.continuous = false;
|
||||
info.ray.position = cameraTarget;
|
||||
info.SetColliderID(2);
|
||||
|
@ -198,12 +198,12 @@ namespace SHADE
|
|||
SHVec3 newOffset{ 0.0f,0.0f, 1.0f };
|
||||
newOffset = SHVec3::RotateX(newOffset, -(SHMath::DegreesToRadians(pivot.GetPitch())));
|
||||
newOffset = SHVec3::RotateY(newOffset, (SHMath::DegreesToRadians(pivot.GetYaw())));
|
||||
newOffset = SHVec3::Normalise(newOffset) * (hitResult.distance);
|
||||
newOffset = SHVec3::Normalise(newOffset) * (hitResult.distance * 0.95f);
|
||||
pivot.offset = newOffset;
|
||||
//cameraPos = camera->position + pivot.offset;
|
||||
//SHLOG_INFO("CAMERA COLLISION HIT, {} armlength: {}, true armlength: {}", hitResult.distance, hitResult.distance, (cameraPos - camera->position).Length());
|
||||
//SHLOG_INFO("Racoon Position {}, {}, {}, Camera Position: {}, {}, {}, Distance {}", cameraTarget.x, cameraTarget.y, cameraTarget.z, cameraPos.x, cameraPos.y, cameraPos.z, SHVec3::Distance(cameraTarget, cameraPos));
|
||||
SHLOG_INFO("Camera Position: {}, {}, {}", cameraPos.x, cameraPos.y, cameraPos.z);
|
||||
//SHLOG_INFO("Camera Position: {}, {}, {}", cameraPos.x, cameraPos.y, cameraPos.z);
|
||||
auto otherTransform = SHComponentManager::GetComponent_s<SHTransformComponent>(hitResult.entityHit);
|
||||
SHVec3 otherPos = hitResult.position;
|
||||
|
||||
|
|
Loading…
Reference in New Issue