This topic is 2810 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

hi all,

i have a question regard collision detection using ellipsoid (the collide and slide algorithm).

I have read the collision algorithm posted by;

and its "Improve collision and response" pdf book.

Im having problem with deriving the "epsilon" value or the veryCloseDistance.
How can i compute this value? What is the basis for this value?

i have a problem with my collision since it detects the collision and slide sideways but it does not slide up when there is a stairs.

it is when my velocity vector is not totaly 0,0,0 but has value like
(0.0000019, 0.0, 0.0000094) the resulting slide can have an upward result.

my velocity vector decreases with the friction every frame, the friction scales down the velocity every frame instead of directly subtracting from it. When my velocity vector is too small because of friction scale down) but not zero
my collision routine is called and the result give an upward slide instead.

What is odd is when velocity is too small(not completely zero), the 3d mesh object can be viewed as standing still (not walking) in viewers view then suddenly moves up because of the result from the collision routine.

Can anybody help me debug this?

[Edited by - cebugdev on November 12, 2010 5:50:26 PM]

##### Share on other sites
How are you checking your velocity?
Are you comparing it to zero like velocity.x == 0?

if so you should use a different method like,

if(abs(velocity.x) < 0.002){...}else{velocity.x = 0;}

this way you can set the minimum velocity before it's set to zero
that should help out a bit but this probably wont fix the problem completely

##### Share on other sites
Quote:
 Original post by BlackShark33How are you checking your velocity? Are you comparing it to zero like velocity.x == 0?if so you should use a different method like,*** Source Snippet Removed ***this way you can set the minimum velocity before it's set to zerothat should help out a bit but this probably wont fix the problem completely

i checked the velocity by checking its length if its zero like
velocity.length()==0

but like what youve said that wont solve my collision problem since if i forced the velocity to zero, then it wont slide up anymore.

1. 1
2. 2
3. 3
Rutin
19
4. 4
5. 5

• 10
• 14
• 30
• 13
• 11
• ### Forum Statistics

• Total Topics
631782
• Total Posts
3002332
×