Reference
- Body Classes
-
Body Functions
- (PPBox)getHeight()
- (PPBox)getWidth()
- (PPBox)setSize()
- (PPCircle)getSize()
- (PPCircle)setSize()
- addExcludedBody()
- addForce()
- adjustAngularVelocity()
- adjustVelocity()
- applyMatrix()
- attachImage()
- dettachImage()
- getAngularVelocity()
- getImageAlpha()
- getRotation()
- getVelocityX()
- getVelocityY()
- getX()
- getY()
- isResting()
- isStatic()
- isTouchingBody()
- resetForces()
- setAngularVelocity()
- setDamping()
- setDrawable()
- setFillColor()
- setFriction()
- setGravityEffected()
- setImageAlpha()
- setMass()
- setPosition()
- setRestitution()
- setRotatable()
- setRotation()
- setRotDamping()
- setStaticBody()
- setStrokeColor()
- setStrokeWidth()
- setVelocity()
- World Classes
- World Fucntions
isTouchingBody()
Description
Check if a body is touching another specific body. If they are touching, it will return true. Else, it will return false.
Exemples
if(myBody1.isTouchingBody(myBody2)) {
//Will print only if myBody1 is touching myBody2
println("Yes, it is touching!");
}
Syntax
myBody.isTouching(body);
Parameters
body ->
PPBody : touching test will occur with this body.