mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
fix half pipes bug brought by previous commit
This commit is contained in:
parent
8a677fd2c3
commit
1b292ff4a7
1 changed files with 1 additions and 1 deletions
|
|
@ -717,7 +717,7 @@ class Marble extends GameObject {
|
||||||
var soFar = 0.0;
|
var soFar = 0.0;
|
||||||
for (k in 0...contacts.length) {
|
for (k in 0...contacts.length) {
|
||||||
var dist = this._radius - contacts[k].contactDistance;
|
var dist = this._radius - contacts[k].contactDistance;
|
||||||
var timeToSeparate = 0.016;
|
var timeToSeparate = 0.1;
|
||||||
var vel = this.velocity.sub(contacts[k].velocity);
|
var vel = this.velocity.sub(contacts[k].velocity);
|
||||||
var outVel = vel.add(dir.multiply(soFar)).dot(contacts[k].normal);
|
var outVel = vel.add(dir.multiply(soFar)).dot(contacts[k].normal);
|
||||||
if (dist > timeToSeparate * outVel) {
|
if (dist > timeToSeparate * outVel) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue