Rope: Don't apply forces to C4D_StaticBack objects

rope
Armin Burgmeier 2012-04-28 13:54:24 +02:00
parent 4b8c7e9c6a
commit 6cf22b7d22
1 changed files with 7 additions and 2 deletions

View File

@ -85,8 +85,13 @@ void C4RopeEnd::Execute(C4Real dt)
{
if(has_object)
{
obj->xdir += dt * fx / obj->Mass;
obj->ydir += dt * fy / obj->Mass;
// StaticBacks don't move, so don't apply xdir/ydir to them
// or the rope will behave weird
if( (obj->Category & C4D_StaticBack) == 0)
{
obj->xdir += dt * fx / obj->Mass;
obj->ydir += dt * fy / obj->Mass;
}
}
else
{