Jump to content

Recommended Posts

Posted

The title says. If i modify updateRiderPosition() so that the rider is outside the collision box, everything is fine, but when it's inside, the whole thing begins to twitch and spasm. Any ideas?

If i helped you, don't forget pressing "Thank You" button. Thanks for your time.

  • 2 weeks later...
Posted

@Override
public void applyEntityCollision(Entity par1Entity)
{
    if (par1Entity != riddenByEntity && par1Entity.canBePushed())
        applyEntityCollision(par1Entity);
}

 

 

Posted
  On 7/13/2013 at 1:22 PM, awger said:

@Override
public void applyEntityCollision(Entity par1Entity)
{
    if (par1Entity != riddenByEntity && par1Entity.canBePushed())
        applyEntityCollision(par1Entity);
}

 

And the reason he could say this is because he guessed you're code being the way it is, since you didn't show you're problem code ;)

  Quote

If you guys dont get it.. then well ya.. try harder...

Posted
  On 7/13/2013 at 1:22 PM, awger said:

@Override
public void applyEntityCollision(Entity par1Entity)
{
    if (par1Entity != riddenByEntity && par1Entity.canBePushed())
        applyEntityCollision(par1Entity);
}

I hope you were not going to advise me to make an infinite loop, and just forgot super. prefix.

I've fixed it — the problem was in getCollisionBox(). Now i have

@Override
    public AxisAlignedBB getCollisionBox(Entity par1Entity){
    	if (par1Entity != riddenByEntity && par1Entity.ridingEntity != this){
    		return par1Entity.boundingBox;
    	}
    	return null;
    }

and it's fine.

If i helped you, don't forget pressing "Thank You" button. Thanks for your time.

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.