Implemented a custom physics engine #316

Merged
direnbharwani merged 95 commits from SHPhysics into main 2023-01-23 15:55:45 +08:00
2 changed files with 14 additions and 14 deletions
Showing only changes of commit 1dc16fdcda - Show all commits

View File

@ -62,7 +62,7 @@
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 3, y: 7.5, z: 0}
Translate: {x: -1, y: 7.5, z: 0}
Rotate: {x: -0, y: 0, z: 0.785398185}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
@ -77,11 +77,11 @@
Interpolate: true
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: true
Freeze Position Y: false
Freeze Position Z: false
Freeze Rotation X: false
Freeze Rotation Y: false
Freeze Rotation Z: false
Freeze Rotation X: true
Freeze Rotation Y: true
Freeze Rotation Z: true
IsActive: true
Collider Component:
DrawColliders: false
@ -90,7 +90,7 @@
Collision Tag: 1
Type: Sphere
Radius: 1
Friction: 0.400000006
Friction: 1
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
@ -131,7 +131,7 @@
Collision Tag: 2
Type: Box
Half Extents: {x: 1, y: 1, z: 1}
Friction: 0.400000006
Friction: 1
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
@ -144,9 +144,9 @@
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: -1.74209237, z: 0}
Translate: {x: 0, y: -3, z: 0}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 10, y: 0.5, z: 10}
Scale: {x: 10, y: 3, z: 10}
IsActive: true
RigidBody Component:
Type: Static
@ -267,8 +267,8 @@
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -1, y: 7, z: 0}
Rotate: {x: 0.785398185, y: 0.785398185, z: 0.785398185}
Translate: {x: 2, y: 2, z: 3}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 0.999990404, y: 0.999994457, z: 0.999985337}
IsActive: true
RigidBody Component:
@ -278,7 +278,7 @@
Drag: 0.00999999978
Angular Drag: 0
Use Gravity: true
Gravity Scale: 1
Gravity Scale: 5
Interpolate: true
Sleeping Enabled: true
Freeze Position X: false

View File

@ -108,7 +108,7 @@ namespace SHADE
* Performs a single simulation step. <br/>
* Detect Collisions -> Integrate Forces -> Resolve Contacts -> Integrate Velocities
* @param dt
* A discrete time step for the simulation. This should be consistent for deteministic
* A discrete time step for the simulation. This should be consistent for deterministic
* behaviour.
*/
void Step (float dt);
@ -118,7 +118,7 @@ namespace SHADE
/* Type Definitions */
/*---------------------------------------------------------------------------------*/
// EntityIDs are used to map resolved contraints back to bodies
// EntityIDs are used to map resolved constraints back to bodies
using RigidBodies = std::unordered_map<EntityID, SHRigidBody*>;
/*---------------------------------------------------------------------------------*/