dont add contact joints for geom-geom
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
This commit is contained in:
parent
cc40718f42
commit
f2c0a799e9
@ -2079,6 +2079,7 @@ Render pathing nodes (still needs some work)
|
|||||||
Pathing construction between town buildings and road nodes
|
Pathing construction between town buildings and road nodes
|
||||||
Pathing construction for farm plots
|
Pathing construction for farm plots
|
||||||
Bounding sphere work
|
Bounding sphere work
|
||||||
|
Don't allocate contact joints for geom-geom
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -497,34 +497,21 @@ public class CollisionEngine {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// //
|
|
||||||
// //apply shallow slope correction
|
|
||||||
// if(
|
|
||||||
// //is terrain
|
|
||||||
// (c1.getType() == Collidable.TYPE_TERRAIN || c2.getType() == Collidable.TYPE_TERRAIN) &&
|
|
||||||
// (!c1.getType().equals(c2.getType())) &&
|
|
||||||
// contact.geom.normal.length() > 0
|
|
||||||
// &&
|
|
||||||
// //force is pointing basically upwards
|
|
||||||
// PhysicsUtils.odeVecToJomlVec(contact.geom.normal).dot(MathUtils.getUpVector()) > 0.7
|
|
||||||
// ){
|
|
||||||
// System.out.println(PhysicsUtils.odeVecToJomlVec(contact.geom.normal).dot(MathUtils.getUpVector()));
|
|
||||||
// if(//force is pointing basically upwards
|
|
||||||
// PhysicsUtils.odeVecToJomlVec(contact.geom.normal).dot(MathUtils.getUpVector()) > 0.7){
|
|
||||||
// contact.geom.normal.set(PhysicsUtils.jomlVecToOdeVec(MathUtils.getUpVector()));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
//
|
//
|
||||||
//add contact to contact group
|
//add contact to contact group
|
||||||
DJoint c = OdeHelper.createContactJoint(world,contactgroup,contact);
|
DJoint c = OdeHelper.createContactJoint(world,contactgroup,contact);
|
||||||
if(b1 == null){
|
if(b1 == null){
|
||||||
|
if(b2 == null){
|
||||||
|
} else {
|
||||||
c.attach(null,b2);
|
c.attach(null,b2);
|
||||||
} else if(b2 == null){
|
}
|
||||||
|
} else {
|
||||||
|
if(b2 == null){
|
||||||
c.attach(b1,null);
|
c.attach(b1,null);
|
||||||
} else {
|
} else {
|
||||||
c.attach(b1,b2);
|
c.attach(b1,b2);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Use the default collision resolution
|
// Use the default collision resolution
|
||||||
if(collisionResolutionCallback == null) {
|
if(collisionResolutionCallback == null) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user