Physics Blocks

Basic Physics

{"func":"blockPhysicsStart"}

Start Physics

"Start Physics" enables the physics engine to run so that gravity, forces, collisions, etc can occur.

Parameters:

None.

Related Blocks:
{"func":"blockPhysicsSetGravity"} ,     {"func":"blockPhysicsStop"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetGravity","values":[{"type":"number","value":"0"},{"type":"number","value":"10"}],"next":{"func":"blockPhysicsApplyForceAngle","values":[{"type":"number","value":"10"},{"type":"number","value":"20"}],"next":{"func":"blockPhysicsStop"}}}}} Add to my Backpack


{"func":"blockPhysicsStop"}

Stop Physics

"Stop Physics" stops all physics-related events from occurring.

Parameters:

None.

Related Blocks:
{"func":"blockPhysicsSetGravity"} ,     {"func":"blockPhysicsStart"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetGravity","values":[{"type":"number","value":"0"},{"type":"number","value":"10"}],"next":{"func":"blockPhysicsApplyForceAngle","values":[{"type":"number","value":"10"},{"type":"number","value":"20"}],"next":{"func":"blockPhysicsStop"}}}}} Add to my Backpack


{"func":"blockPhysicsSetGravity"}

Set Gravity

"Set Gravity" sets the horizontal and vertical forces of gravity.

Parameters:

Horizontal Gravity: The horizontal gravity force will be set to this number.

Vertical Gravity: The vertical gravity force will be set to this number. Gravity has a vertical force of around 9.8 on Earth!

Related Blocks:
{"func":"valuePhysicsXGravity"} ,     {"func":"valuePhysicsYGravity"} ,     {"func":"blockPhysicsStart"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetGravity","values":[{"type":"number","value":"0"},{"type":"number","value":"10"}],"next":{"func":"blockPhysicsApplyForceAngle","values":[{"type":"number","value":"10"},{"type":"number","value":"20"}],"next":{"func":"blockPhysicsStop"}}}}} Add to my Backpack


{"func":"blockPhysicsSetActorActive"}

Set Active

"Set Active" sets whether the Actor is affected by gravity and other Actors (when set to true, this Actor will be affected by physics).

Parameters:

Actor: This is the Actor that is affected.

Bool: This parameter should be a boolean value (either true or false). If it’s true, this Actor will be set to active; if it’s false, this Actor will not be set to active.

Related Blocks:
{"func":"blockPhysicsSetActorStatic"} ,     {"func":"blockPhysicsSetGravity"}

Sample Code:
{"func":"registerCloned","next":{"func":"blockPhysicsSetActorActive","values":[{"type":"string","value":"ball"},{"type":"boolean","value":"true"}],"next":{"func":"blockLooksMoveBack","values":[{"type":"number","value":"1"}]}}} Add to my Backpack


{"func":"blockPhysicsSetActorStatic"}

Set Static

"Set Static" sets whether the Actor is affected by gravity and other Actors (when set to true, this Actor won’t be affected by physics).

Parameters:

Actor: This is the Actor that is affected.

Bool: This parameter should be a boolean value (either true or false). If it’s true, this Actor will be set to static; if it’s false, this Actor will not be set to static.

Related Blocks:
{"func":"blockPhysicsSetActorActive"} ,     {"func":"blockPhysicsSetGravity"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetActorStatic","values":[{"type":"string","value":"ball"},{"type":"boolean","value":"true"}],"next":{"func":"blockPhysicsSetFriction","values":[{"type":"number","value":"0.5"}]}}}} Add to my Backpack


{"func":"blockPhysicsSetActorGeometry"}

Set Shape

"Set Shape" sets whether the Actor will be rectangular or circular when interacting with other Actors (e.g. collisions).

Parameters:

Actor: This is the Actor that is affected.

Shape: This parameter will either be "rectangular," in which case the Actor is treated like a rectangle, or "circular," in which case the Actor is treated like a circle.

Related Blocks:
{"func":"registerSpriteCollision"} ,     {"func":"valuePhysicsCollidedWithSprite"}

Sample Code:
{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetActorGeometry","values":[{"type":"string","value":"ball"},{"type":"choice","value":"circular"}]}} Add to my Backpack


{"func":"blockPhysicsStart"}

Iniciar física realista

"Iniciar física realista" activa el motor de física realista, lo que permite el uso de gravedad, fuerzas, colisiones, etc.

Parameters:

Ninguno.

Related Blocks:
{"func":"blockPhysicsSetGravity"} ,     {"func":"blockPhysicsStop"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetGravity","values":[{"type":"number","value":"0"},{"type":"number","value":"10"}],"next":{"func":"blockPhysicsApplyForceAngle","values":[{"type":"number","value":"10"},{"type":"number","value":"20"}],"next":{"func":"blockPhysicsStop"}}}}} Add to my Backpack


{"func":"blockPhysicsStop"}

Detener fiísica realista

"Detener física realista" detiene toda ejecución de eventos relacionados con física.

Parameters:

Ninguno.

Related Blocks:
{"func":"blockPhysicsSetGravity"} ,     {"func":"blockPhysicsStart"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetGravity","values":[{"type":"number","value":"0"},{"type":"number","value":"10"}],"next":{"func":"blockPhysicsApplyForceAngle","values":[{"type":"number","value":"10"},{"type":"number","value":"20"}],"next":{"func":"blockPhysicsStop"}}}}} Add to my Backpack


{"func":"blockPhysicsSetGravity"}

Establecer gravedad

"Establecer gravedad" fija las fuerzas horizontal y vertical de la gravedad.

Parameters:

Gravedad horizontal: el valor de la gravedad horizontal será este número.

Gravedad vertical: el valor de la gravedad vertical. ¡La gravedad posee una fuerza vertical de aproximadamente 9.8 en la Tierra!

Related Blocks:
{"func":"valuePhysicsXGravity"} ,     {"func":"valuePhysicsYGravity"} ,     {"func":"blockPhysicsStart"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetGravity","values":[{"type":"number","value":"0"},{"type":"number","value":"10"}],"next":{"func":"blockPhysicsApplyForceAngle","values":[{"type":"number","value":"10"},{"type":"number","value":"20"}],"next":{"func":"blockPhysicsStop"}}}}} Add to my Backpack


{"func":"blockPhysicsSetActorActive"}

Establecer activo

"Establecer activo" determina si el Actor será afectado por la gravedad y por los demás actores (si es verdadero, este Actor podrá ser afectado por las fuerzas físicas).

Parameters:

Actor: el Actor afectado.

Booleano: este parámetro es un valor booleano (verdadero o falso). Si es verdadero, el Actor estará como activo. Si es falso, el Actor no estará como activo.

Related Blocks:
{"func":"blockPhysicsSetActorStatic"} ,     {"func":"blockPhysicsSetGravity"}

Sample Code:
{"func":"registerCloned","next":{"func":"blockPhysicsSetActorActive","values":[{"type":"string","value":"ball"},{"type":"boolean","value":"true"}],"next":{"func":"blockLooksMoveBack","values":[{"type":"number","value":"1"}]}}} Add to my Backpack


{"func":"blockPhysicsSetActorStatic"}

Establecer como estático

"Establecer como estático" determina si el actor será afectado por la gravedad y por los demás actores (si es verdadero, el Actor no será afectado por las fuerzas físicas).

Parameters:

Actor: el actor afectado.

Booleano: este parámetro es un valor booleano (verdadero o falso). Si es verdadero, el Actor se considera estático. Si es falso, el Actor no se considera estático.

Related Blocks:
{"func":"blockPhysicsSetActorActive"} ,     {"func":"blockPhysicsSetGravity"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetActorStatic","values":[{"type":"string","value":"ball"},{"type":"boolean","value":"true"}],"next":{"func":"blockPhysicsSetFriction","values":[{"type":"number","value":"0.5"}]}}}} Add to my Backpack


{"func":"blockPhysicsSetActorGeometry"}

Fijar forma

"Fijar forma" establece si el Actor será considerado como de forma rectangular o circular para la interacción con otros actores (por ejemplo en las colisiones).

Parameters:

Actor: el Actor afectado.

Forma: este parámetro puede ser "rectangular", en cuyo caso el Actor será tratado como si fuera un rectángulo, o "circular", en cuyo caso el Actor será tratado como si fuera un círculo.

Related Blocks:
{"func":"registerSpriteCollision"} ,     {"func":"valuePhysicsCollidedWithSprite"}

Sample Code:
{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetActorGeometry","values":[{"type":"string","value":"ball"},{"type":"choice","value":"circular"}]}} Add to my Backpack


Collisions

{"func":"registerSpriteCollision"}

When Actor Collides

"When Actor Collides" is called when the Actor hits another Actor while using the physics engine.

Parameters:

None.

Related Blocks:
{"func":"valuePhysicsCollidedWithSprite"} ,     {"func":"valuePhysicsCollidedWithName"}

Sample Code:
{"func":"registerSpriteCollision","next":{"func":"blockControlIf","values":[{"type":"wrapper","func":"valuePhysicsCollidedWithSprite","values":[{"type":"string","value":"bottomedge"}]}],"containers":[{"func":"blockControlBroadcast","values":[{"type":"string","value":"GameOver"}]}]}} Add to my Backpack


{"func":"valuePhysicsCollidedWithSprite"}

Collided With?

"Collided With?" returns true if the Actor collided with the object specified by the parameter and false otherwise.

Parameters:

Actor: The method returns true if the current Actor collided with this parameter, which may be another Actor.

Related Blocks:
{"func":"registerSpriteCollision"} ,     {"func":"valuePhysicsCollidedWithName"}

Sample Code:
{"func":"registerSpriteCollision","next":{"func":"blockControlIf","values":[{"type":"wrapper","func":"valuePhysicsCollidedWithSprite","values":[{"type":"string","value":"bottomedge"}]}],"containers":[{"func":"blockControlBroadcast","values":[{"type":"string","value":"GameOver"}]}]}} Add to my Backpack


{"func":"valuePhysicsCollidedWithName"}

Collided With Actor Name

"Collided With Actor Name" returns the name of the Actor that the current Actor (whose code you are in) collided with. This block is typically used with the ‘When Actor Collides’ block.

Parameters:

None.

Related Blocks:
{"func":"registerSpriteCollision"} ,     {"func":"valuePhysicsCollidedWithSprite"}

Sample Code:
{"func":"registerSpriteCollision","next":{"func":"blockControlIf","values":[{"type":"wrapper","func":"valueOpEqual","values":[{"type":"wrapper","func":"valuePhysicsCollidedWithName"},{"type":"string","value":"Ball"}]}],"containers":[{"func":"blockPhysicsApplyImpulseAngle","values":[{"type":"number","value":"10"},{"type":"number","value":"10"}]}]}} Add to my Backpack


{"func":"valuePhysicsTouchingActor"}

Touching Actor?

"Touching Actor?" returns true if the Actor touched the object specified by the parameter and false otherwise.

Parameters:

Actor: The method returns true if the current Actor touched this parameter, which may be another Actor.

Related Blocks:
{"func":"registerSpriteCollision"}

Sample Code:
{"func":"registerSpriteCollision","next":{"func":"blockControlIf","values":[{"type":"wrapper","func":"valuePhysicsTouchingActor","values":[{"type":"string","value":"ghost"}]}],"containers":[{"func":"blockControlBroadcast","values":[{"type":"string","value":"GameOver"}]}]}} Add to my Backpack


{"func":"registerSpriteCollision"}

Cuando el Actor colisione

"Cuando el Actor colisione" es llamado cuando el Actor entra en contacto con otro Actor mientras se utiliza el motor de física realista.

Parameters:

Ninguno.

Related Blocks:
{"func":"valuePhysicsCollidedWithSprite"} ,     {"func":"valuePhysicsCollidedWithName"}

Sample Code:
{"func":"registerSpriteCollision","next":{"func":"blockControlIf","values":[{"type":"wrapper","func":"valuePhysicsCollidedWithSprite","values":[{"type":"string","value":"bottomedge"}]}],"containers":[{"func":"blockControlBroadcast","values":[{"type":"string","value":"GameOver"}]}]}} Add to my Backpack


{"func":"valuePhysicsCollidedWithSprite"}

¿Colisionó con?

"¿Colisionó con?" es verdadero si el Actor colisionó con el objeto especificado por el parámetro, y falso en caso contrario.

Parameters:

Actor: el método devuelve un valor verdadero si el Actor actual colisionó con este parámetro, que puede ser otro Actor.

Related Blocks:
{"func":"registerSpriteCollision"} ,     {"func":"valuePhysicsCollidedWithName"}

Sample Code:
{"func":"registerSpriteCollision","next":{"func":"blockControlIf","values":[{"type":"wrapper","func":"valuePhysicsCollidedWithSprite","values":[{"type":"string","value":"bottomedge"}]}],"containers":[{"func":"blockControlBroadcast","values":[{"type":"string","value":"GameOver"}]}]}} Add to my Backpack


{"func":"valuePhysicsCollidedWithName"}

Colisionó con nombre de Actor

"Colisionó con nombre de Actor" devuelve el nombre del Actor con el que colisionó el Actor actual (cuyo código estás operando). Este bloque se utiliza por lo general con el bloque "Cuando el Actor colisione".

Parameters:

Ninguno.

Related Blocks:
{"func":"registerSpriteCollision"} ,     {"func":"valuePhysicsCollidedWithSprite"}

Sample Code:
{"func":"registerSpriteCollision","next":{"func":"blockControlIf","values":[{"type":"wrapper","func":"valueOpEqual","values":[{"type":"wrapper","func":"valuePhysicsCollidedWithName"},{"type":"string","value":"Ball"}]}],"containers":[{"func":"blockPhysicsApplyImpulseAngle","values":[{"type":"number","value":"10"},{"type":"number","value":"10"}]}]}} Add to my Backpack


{"func":"valuePhysicsTouchingActor"}

¿Actor está tocando?

"¿Actor está tocando?" es verdadero si el Actor toca al objeto especificado por el parámetro, y falso en caso contrario.

Parameters:

Actor: el método devuelve verdadero si el Actor actual entró en contacto con el parámetro, que puede ser otro Actor.

Related Blocks:
{"func":"registerSpriteCollision"}

Sample Code:
{"func":"registerSpriteCollision","next":{"func":"blockControlIf","values":[{"type":"wrapper","func":"valuePhysicsTouchingActor","values":[{"type":"string","value":"ghost"}]}],"containers":[{"func":"blockControlBroadcast","values":[{"type":"string","value":"GameOver"}]}]}} Add to my Backpack


Physical Properties

{"func":"blockPhysicsSetDensity"}

Set Density

"Set Density" sets the density of the Actor, which affects how heavy it appears.

Parameters:

Density: This parameter is the number that the density will be set to. A higher number means the Actor will appear heavier.

Related Blocks:
{"func":"valuePhysicsDensity"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetActive","values":[{"type":"boolean","value":"true"}],"next":{"func":"blockPhysicsSetRestitution","values":[{"type":"number","value":"0.2"}],"next":{"func":"blockPhysicsSetDensity","values":[{"type":"number","value":"10"}]}}}}} Add to my Backpack


{"func":"blockPhysicsSetFriction"}

Set Friction

"Set Friction" sets the friction of the Actor, which affects how difficult it is for the Actor to glide on surfaces.

Parameters:

Friction: This parameter is the number that the friction will be set to. A higher number means the Actor will have more trouble sliding.

Related Blocks:
{"func":"blockPhysicsSetLinearVelocity"} ,     {"func":"valuePhysicsFriction"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetStatic","values":[{"type":"boolean","value":"true"}],"next":{"func":"blockPhysicsSetFriction","values":[{"type":"number","value":"0.5"}]}}}} Add to my Backpack


{"func":"blockPhysicsSetRestitution"}

Set Restitution

"Set Restitution" sets the restitution of the Actor, which affects how bouncy it is.

Parameters:

Restitution: This parameter is the number that the restitution will be set to. A higher number means the Actor will appear bouncier.

Related Blocks:
{"func":"valuePhysicsRestitution"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetActive","values":[{"type":"boolean","value":"true"}],"next":{"func":"blockPhysicsSetRestitution","values":[{"type":"number","value":"0.2"}],"next":{"func":"blockPhysicsSetDensity","values":[{"type":"number","value":"10"}]}}}}} Add to my Backpack


{"func":"valuePhysicsDensity"}

Density

"Density" returns the Actor’s density.

Parameters:

None.

Related Blocks:
{"func":"blockPhysicsSetDensity"}

Sample Code:
{"func":"blockLooksSay","values":[{"type":"string","value":"Density affects how heavy an object looks. Right now your density is:"},{"type":"wrapper","func":"valuePhysicsDensity"}]} Add to my Backpack


{"func":"valuePhysicsFriction"}

Friction

"Friction" returns the Actor’s friction.

Parameters:

None.

Related Blocks:
{"func":"blockPhysicsSetFriction"}

Sample Code:
{"func":"blockLooksSay","values":[{"type":"string","value":"Friction makes it harder for objects to slide. Right now your friction is:"},{"type":"wrapper","func":"valuePhysicsFriction"}]} Add to my Backpack


{"func":"valuePhysicsRestitution"}

Restitution

"Restitution" returns the Actor’s restitution.

Parameters:

None.

Related Blocks:
{"func":"blockPhysicsSetRestitution"}

Sample Code:
{"func":"blockLooksSay","values":[{"type":"string","value":"Restitution affects bounciness. Right now your restitution is:"},{"type":"wrapper","func":"valuePhysicsRestitution"}]} Add to my Backpack


{"func":"blockPhysicsSetDensity"}

Establecer densidad

"Establecer densidad" establece la densidad del Actor, lo que le da apariencia de más o menos pesado.

Parameters:

Densidad: este parámetro es el valor que tendrá la densidad. Un número mayor hará que el Actor parezca más pesado.

Related Blocks:
{"func":"valuePhysicsDensity"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetActive","values":[{"type":"boolean","value":"true"}],"next":{"func":"blockPhysicsSetRestitution","values":[{"type":"number","value":"0.2"}],"next":{"func":"blockPhysicsSetDensity","values":[{"type":"number","value":"10"}]}}}}} Add to my Backpack


{"func":"blockPhysicsSetFriction"}

Establecer fricción

"Establecer fricción" establece la fricción del Actor, lo que afecta la forma que tiene el Actor de deslizarse sobre las superficies.

Parameters:

Fricción: este parámetro es el valor que tendrá la fricción. Un número más alto significa que al Actor le resultará más difícil deslizarse.

Related Blocks:
{"func":"blockPhysicsSetLinearVelocity"} ,     {"func":"valuePhysicsFriction"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetStatic","values":[{"type":"boolean","value":"true"}],"next":{"func":"blockPhysicsSetFriction","values":[{"type":"number","value":"0.5"}]}}}} Add to my Backpack


{"func":"blockPhysicsSetRestitution"}

Establecer restitución

"Establecer restitución" establece la restitución del Actor, lo que afecta la forma en que rebota.

Parameters:

Restitución: este parámetro es el valor que tendrá la restitución. Un número más alto hará que el Actor rebote más.

Related Blocks:
{"func":"valuePhysicsRestitution"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetActive","values":[{"type":"boolean","value":"true"}],"next":{"func":"blockPhysicsSetRestitution","values":[{"type":"number","value":"0.2"}],"next":{"func":"blockPhysicsSetDensity","values":[{"type":"number","value":"10"}]}}}}} Add to my Backpack


{"func":"valuePhysicsDensity"}

Densidad

"Densidad" devuelve la densidad del Actor.

Parameters:

Ninguno.

Related Blocks:
{"func":"blockPhysicsSetDensity"}

Sample Code:
{"func":"blockLooksSay","values":[{"type":"string","value":"Density affects how heavy an object looks. Right now your density is:"},{"type":"wrapper","func":"valuePhysicsDensity"}]} Add to my Backpack


{"func":"valuePhysicsFriction"}

Fricción

"Fricción" devuelve la fricción del Actor.

Parameters:

Ninguno.

Related Blocks:
{"func":"blockPhysicsSetFriction"}

Sample Code:
{"func":"blockLooksSay","values":[{"type":"string","value":"Friction makes it harder for objects to slide. Right now your friction is:"},{"type":"wrapper","func":"valuePhysicsFriction"}]} Add to my Backpack


{"func":"valuePhysicsRestitution"}

Restitución

"Restitución" devuelve la restitución del Actor.

Parameters:

Ninguno.

Related Blocks:
{"func":"blockPhysicsSetRestitution"}

Sample Code:
{"func":"blockLooksSay","values":[{"type":"string","value":"Restitution affects bounciness. Right now your restitution is:"},{"type":"wrapper","func":"valuePhysicsRestitution"}]} Add to my Backpack


Force

{"func":"blockPhysicsApplyForce"}

Apply Force

"Apply Force" applies a force of magnitude specified by the parameter to the current Actor.

Parameters:

Magnitude: This number indicates the magnitude, or strength, of the force.

Related Blocks:
{"func":"blockPhysicsApplyImpulse"} ,     {"func":"blockPhysicsApplyForceAngle"} ,     {"func":"blockPhysicsApplyImpulseAngle"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPhysicsStart","next":{"func":"blockPhysicsApplyForce","values":[{"type":"number","value":"10"}]}}} Add to my Backpack


{"func":"blockPhysicsApplyImpulse"}

Apply Impulse

"Apply Impulse" applies an impulse of magnitude specified by the parameter to the current Actor.

Parameters:

Magnitude: This number indicates the magnitude, or strength, of the impulse.

Related Blocks:
{"func":"blockPhysicsApplyForce"} ,     {"func":"blockPhysicsApplyForceAngle"} ,     {"func":"blockPhysicsApplyImpulseAngle"}

Sample Code:
{"func":"blockPhysicsStart","next":{"func":"blockPhysicsApplyImpulse","values":[{"type":"number","value":"100"}]}} Add to my Backpack


{"func":"blockPhysicsApplyTorque"}

Apply Torque

"Apply Torque" applies a rotational force (like a twist) of the specified magnitude to the Actor.

Parameters:

Magnitude: This number indicates the magnitude, or strength, of the force.

Related Blocks:
{"func":"blockPhysicsApplyForce"} ,     {"func":"blockPhysicsApplyImpulse"} ,     {"func":"blockPhysicsApplyForceAngle"}

Sample Code:
{"func":"registerSpriteCollision","next":{"func":"blockPhysicsApplyTorque","values":[{"type":"number","value":"10"}]}} Add to my Backpack


{"func":"blockPhysicsApplyForceAngle"}

Apply Force At

"Apply Force At" applies a force of the specified magnitude and angle to the current Actor.

Parameters:

Magnitude: This number indicates the magnitude, or strength, of the force.

Direction: This parameter is the angle (in degrees) that the force will apply at. (0 degrees is towards the top of the screen, 90 degrees is towards the right.)

Related Blocks:
{"func":"blockPhysicsApplyForce"} ,     {"func":"blockPhysicsApplyImpulse"} ,     {"func":"blockPhysicsApplyImpulseAngle"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetGravity","values":[{"type":"number","value":"0"},{"type":"number","value":"10"}],"next":{"func":"blockPhysicsApplyForceAngle","values":[{"type":"number","value":"10"},{"type":"number","value":"20"}],"next":{"func":"blockPhysicsStop"}}}}} Add to my Backpack


{"func":"blockPhysicsApplyImpulseAngle"}

Apply Impulse At

"Apply Impulse At" applies an impulse of the specified magnitude and angle to the current Actor.

Parameters:

Magnitude: This number indicates the magnitude, or strength, of the impulse.

Direction: This parameter is the angle (in degrees) that the impulse will apply at. (0 degrees is towards the top of the screen, 90 degrees is towards the right.)

Related Blocks:
{"func":"blockPhysicsApplyForce"} ,     {"func":"blockPhysicsApplyImpulse"} ,     {"func":"blockPhysicsApplyForceAngle"}

Sample Code:
{"func":"registerSpriteCollision","next":{"func":"blockControlIf","values":[{"type":"wrapper","func":"valueOpEqual","values":[{"type":"wrapper","func":"valuePhysicsCollidedWithName"},{"type":"string","value":"Ball"}]}],"containers":[{"func":"blockPhysicsApplyImpulseAngle","values":[{"type":"number","value":"10"},{"type":"number","value":"10"}]}]}} Add to my Backpack


{"func":"blockPhysicsApplyForceXY"}

Apply Horizontal and Vertical Force

"Apply Horizontal And Vertical Force" applies a force defined by the specified X vector and Y vector on the current Actor.

Parameters:

Horizontal Force: This number is the magnitude of the force only in the X direction.

Vertical Force: This number is the magnitude of the force only in the Y direction.

Related Blocks:
{"func":"blockPhysicsApplyForce"} ,     {"func":"blockPhysicsApplyImpulse"} ,     {"func":"blockPhysicsApplyForceAngle"}

Sample Code:
{"func":"registerSpriteCollision","next":{"func":"blockControlIf","values":[{"type":"wrapper","func":"valueOpEqual","values":[{"type":"wrapper","func":"valuePhysicsCollidedWithName"},{"type":"string","value":"Ball"}]}],"containers":[{"func":"blockPhysicsApplyImpulse","values":[{"type":"number","value":"30"}]}]}} Add to my Backpack


{"func":"blockPhysicsApplyImpulseXY"}

Apply Horizontal and Vertical Impulse

"Apply Horizontal And Vertical Impulse" applies an impulse defined by the specified X vector and Y vector on the current Actor.

Parameters:

Horizontal Force: This number is the magnitude of the impulse only in the X direction.

Vertical Force: This number is the magnitude of the impulse only in the Y direction.

Related Blocks:
{"func":"blockPhysicsApplyForce"} ,     {"func":"blockPhysicsApplyImpulse"} ,     {"func":"blockPhysicsApplyForceAngle"}

Sample Code:
{"func":"registerSpriteTrigger","next":{"func":"blockPhysicsApplyImpulseXY","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}]}} Add to my Backpack


{"func":"blockPhysicsSetAngularDamping"}

Set Angular Damping

"Set Angular Damping" sets the angular damping of the Actor, which affects the amplitude of its oscillations.

Parameters:

Angular Damping: This parameter is the number that the angular damping will be set to.

Related Blocks:
{"func":"blockPhysicsSetLinearDamping"} ,     {"func":"valuePhysicsAngularDamping"}

Sample Code:
{"func":"blockControlIf","values":[{"type":"wrapper","func":"valueOpLess","values":[{"type":"wrapper","func":"valuePhysicsAngularDamping"},{"type":"string","value":"1"}]}],"containers":[{"func":"blockPhysicsSetAngularDamping","values":[{"type":"number","value":"5"}]}]} Add to my Backpack


{"func":"blockPhysicsSetLinearDamping"}

Set Linear Damping

"Set Linear Damping" sets the linear damping of the Actor, which affects how rigid it is.

Parameters:

Linear Damping: This parameter is the number that the linear damping will be set to. A higher number makes the Actor more rigid.

Related Blocks:
{"func":"blockPhysicsSetLinearDamping"} ,     {"func":"valuePhysicsLinearDamping"}

Sample Code:
{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetLinearDamping","values":[{"type":"wrapper","func":"valueOpAdd","values":[{"type":"wrapper","func":"valuePhysicsLinearDamping"},{"type":"number","value":"10"}]}]}} Add to my Backpack


{"func":"valuePhysicsXGravity"}

X Gravity

"X Gravity" returns the X component of gravity.

Parameters:

None.

Related Blocks:
{"func":"blockPhysicsSetGravity"} ,     {"func":"valuePhysicsYGravity"} ,     {"func":"blockPhysicsStart"}

Sample Code:
{"func":"blockLooksSay","values":[{"type":"string","value":"Current X-component of gravity:"},{"type":"wrapper","func":"valuePhysicsXGravity"}],"next":{"func":"blockLooksSay","values":[{"type":"string","value":"Current Y-component of gravity:"},{"type":"wrapper","func":"valuePhysicsYGravity"}]}} Add to my Backpack


{"func":"valuePhysicsYGravity"}

Y Gravity

"Y Gravity" returns the Y component of gravity.

Parameters:

None.

Related Blocks:
{"func":"blockPhysicsSetGravity"} ,     {"func":"valuePhysicsXGravity"} ,     {"func":"blockPhysicsStart"}

Sample Code:
{"func":"blockLooksSay","values":[{"type":"string","value":"Current X-component of gravity:"},{"type":"wrapper","func":"valuePhysicsXGravity"}],"next":{"func":"blockLooksSay","values":[{"type":"string","value":"Current Y-component of gravity:"},{"type":"wrapper","func":"valuePhysicsYGravity"}]}} Add to my Backpack


{"func":"valuePhysicsAngularDamping"}

Angular Damping

"Angular Damping" returns the Actor’s angular damping.

Parameters:

None.

Related Blocks:
{"func":"blockPhysicsSetAngularDamping"}

Sample Code:
{"func":"blockControlIf","values":[{"type":"wrapper","func":"valueOpLess","values":[{"type":"wrapper","func":"valuePhysicsAngularDamping"},{"type":"string","value":"1"}]}],"containers":[{"func":"blockPhysicsSetAngularDamping","values":[{"type":"number","value":"5"}]}]} Add to my Backpack


{"func":"valuePhysicsLinearDamping"}

Linear Damping

"Linear Damping" returns the Actor’s linear damping.

Parameters:

None.

Related Blocks:
{"func":"blockPhysicsSetLinearDamping"}

Sample Code:
{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetLinearDamping","values":[{"type":"wrapper","func":"valueOpAdd","values":[{"type":"wrapper","func":"valuePhysicsLinearDamping"},{"type":"number","value":"10"}]}]}} Add to my Backpack


{"func":"valuePhysicsInertia"}

Inertia

"Inertia" returns the Actor’s inertia (its resistance to change its state of motion).

Parameters:

None.

Related Blocks:
{"func":"valuePhysicsFriction"} ,     {"func":"valuePhysicsRestitution"} ,     {"func":"valuePhysicsDensity"}

Sample Code:
{"func":"blockLooksSay","values":[{"type":"string","value":"Inertia affects how resistant an object is to motion. Right now your inertia is:"},{"type":"wrapper","func":"valuePhysicsInertia"}]} Add to my Backpack


{"func":"blockPhysicsApplyForce"}

Aplicar fuerza

"Aplicar fuerza" aplica una fuerza de la magnitud especificada por el parámetro al Actor actual.

Parameters:

Magnitud: este número indica la magnitud, o intensidad, de la fuerza.

Related Blocks:
{"func":"blockPhysicsApplyImpulse"} ,     {"func":"blockPhysicsApplyForceAngle"} ,     {"func":"blockPhysicsApplyImpulseAngle"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPhysicsStart","next":{"func":"blockPhysicsApplyForce","values":[{"type":"number","value":"10"}]}}} Add to my Backpack


{"func":"blockPhysicsApplyImpulse"}

Aplicar impulso

"Aplicar impulso" aplica un impulso de la magnitud especificada por el parámetro al Actor actual.

Parameters:

Magnitud: este número indica la magnitud, o intensidad, del impulso.

Related Blocks:
{"func":"blockPhysicsApplyForce"} ,     {"func":"blockPhysicsApplyForceAngle"} ,     {"func":"blockPhysicsApplyImpulseAngle"}

Sample Code:
{"func":"blockPhysicsStart","next":{"func":"blockPhysicsApplyImpulse","values":[{"type":"number","value":"100"}]}} Add to my Backpack


{"func":"blockPhysicsApplyTorque"}

Aplicar torsión

"Aplicar torsión" aplica una fuerza de rotación (como un trompo) de la magnitud especificada al Actor.

Parameters:

Magnitud: este número indica la magnitud, o intensidad, de la fuerza.

Related Blocks:
{"func":"blockPhysicsApplyForce"} ,     {"func":"blockPhysicsApplyImpulse"} ,     {"func":"blockPhysicsApplyForceAngle"}

Sample Code:
{"func":"registerSpriteCollision","next":{"func":"blockPhysicsApplyTorque","values":[{"type":"number","value":"10"}]}} Add to my Backpack


{"func":"blockPhysicsApplyForceAngle"}

Aplicar fuerza a

"Aplicar fuerza a" aplica una fuerza de la magnitud y ángulo especificados al Actor actual.

Parameters:

Magnitud: este número indica la magnitud, o intensidad, de la fuerza.

Dirección: este parámetro es el ángulo (en grados) de aplicación de la fuerza (0 grados es hacia la parte superior de la pantalla, 90 grados es hacia la derecha).

Related Blocks:
{"func":"blockPhysicsApplyForce"} ,     {"func":"blockPhysicsApplyImpulse"} ,     {"func":"blockPhysicsApplyImpulseAngle"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetGravity","values":[{"type":"number","value":"0"},{"type":"number","value":"10"}],"next":{"func":"blockPhysicsApplyForceAngle","values":[{"type":"number","value":"10"},{"type":"number","value":"20"}],"next":{"func":"blockPhysicsStop"}}}}} Add to my Backpack


{"func":"blockPhysicsApplyImpulseAngle"}

Aplicar impulso a

"Aplicar impulso a" aplica un impulso de la magnitud y ángulo especificados al Actor actual.

Parameters:

Magnitud: este número indica la magnitud, o intensidad, del impulso.

Dirección: este parámetro es el ángulo (en grados) de aplicación del impulso (0 grados es hacia la parte superior de la pantalla, 90 grados es hacia la derecha).

Related Blocks:
{"func":"blockPhysicsApplyForce"} ,     {"func":"blockPhysicsApplyImpulse"} ,     {"func":"blockPhysicsApplyForceAngle"}

Sample Code:
{"func":"registerSpriteCollision","next":{"func":"blockControlIf","values":[{"type":"wrapper","func":"valueOpEqual","values":[{"type":"wrapper","func":"valuePhysicsCollidedWithName"},{"type":"string","value":"Ball"}]}],"containers":[{"func":"blockPhysicsApplyImpulseAngle","values":[{"type":"number","value":"10"},{"type":"number","value":"10"}]}]}} Add to my Backpack


{"func":"blockPhysicsApplyForceXY"}

Aplicar fuerza horizontal y vertical

"Aplicar fuerza horizontal y vertical" aplica una fuerza especificada por los vectores X e Y al Actor actual.

Parameters:

Fuerza horizontal: este número es la magnitud de la fuerza en la dirección X.

Fuerza vertical: este número es la magnitud de la fuerza en la dirección Y.

Related Blocks:
{"func":"blockPhysicsApplyForce"} ,     {"func":"blockPhysicsApplyImpulse"} ,     {"func":"blockPhysicsApplyForceAngle"}

Sample Code:
{"func":"registerSpriteCollision","next":{"func":"blockControlIf","values":[{"type":"wrapper","func":"valueOpEqual","values":[{"type":"wrapper","func":"valuePhysicsCollidedWithName"},{"type":"string","value":"Ball"}]}],"containers":[{"func":"blockPhysicsApplyImpulse","values":[{"type":"number","value":"30"}]}]}} Add to my Backpack


{"func":"blockPhysicsApplyImpulseXY"}

Aplicar impulso horizontal y vertical

"Aplicar impulso horizontal y vertical" aplica un impulso especificado por los vectores X e Y al Actor actual.

Parameters:

Fuerza horizontal: este número es la magnitud del impulso únicamente en la dirección X.

Fuerza vertical: este número es la magnitud del impulso únicamente en la dirección Y.

Related Blocks:
{"func":"blockPhysicsApplyForce"} ,     {"func":"blockPhysicsApplyImpulse"} ,     {"func":"blockPhysicsApplyForceAngle"}

Sample Code:
{"func":"registerSpriteTrigger","next":{"func":"blockPhysicsApplyImpulseXY","values":[{"type":"number","value":"0"},{"type":"number","value":"0"}]}} Add to my Backpack


{"func":"blockPhysicsSetAngularDamping"}

Establecer amortiguación angular

"Establecer amortiguación angular" establece la amortiguación angular del Actor, lo que afecta la amplitud de sus oscilaciones.

Parameters:

Amortiguación angular: este parámetro es el valor de la amortiguación angular.

Related Blocks:
{"func":"blockPhysicsSetLinearDamping"} ,     {"func":"valuePhysicsAngularDamping"}

Sample Code:
{"func":"blockControlIf","values":[{"type":"wrapper","func":"valueOpLess","values":[{"type":"wrapper","func":"valuePhysicsAngularDamping"},{"type":"string","value":"1"}]}],"containers":[{"func":"blockPhysicsSetAngularDamping","values":[{"type":"number","value":"5"}]}]} Add to my Backpack


{"func":"blockPhysicsSetLinearDamping"}

Establecer amortiguación lineal

"Establecer amortiguación lineal" establece la amortiguación lineal del Actor, lo que determina su rigidez.

Parameters:

Amortiguación lineal: este parámetro es el valor de la amortiguación lineal. Un valor más alto hace más rígido al Actor.

Related Blocks:
{"func":"blockPhysicsSetLinearDamping"} ,     {"func":"valuePhysicsLinearDamping"}

Sample Code:
{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetLinearDamping","values":[{"type":"wrapper","func":"valueOpAdd","values":[{"type":"wrapper","func":"valuePhysicsLinearDamping"},{"type":"number","value":"10"}]}]}} Add to my Backpack


{"func":"valuePhysicsXGravity"}

Gravedad X

"Gravedad X" devuelve el componente X de la gravedad.

Parameters:

Ninguno.

Related Blocks:
{"func":"blockPhysicsSetGravity"} ,     {"func":"valuePhysicsYGravity"} ,     {"func":"blockPhysicsStart"}

Sample Code:
{"func":"blockLooksSay","values":[{"type":"string","value":"Current X-component of gravity:"},{"type":"wrapper","func":"valuePhysicsXGravity"}],"next":{"func":"blockLooksSay","values":[{"type":"string","value":"Current Y-component of gravity:"},{"type":"wrapper","func":"valuePhysicsYGravity"}]}} Add to my Backpack


{"func":"valuePhysicsYGravity"}

Gravedad Y

"Gravedad Y" devuelve el componente Y de la gravedad.

Parameters:

Ninguno.

Related Blocks:
{"func":"blockPhysicsSetGravity"} ,     {"func":"valuePhysicsXGravity"} ,     {"func":"blockPhysicsStart"}

Sample Code:
{"func":"blockLooksSay","values":[{"type":"string","value":"Current X-component of gravity:"},{"type":"wrapper","func":"valuePhysicsXGravity"}],"next":{"func":"blockLooksSay","values":[{"type":"string","value":"Current Y-component of gravity:"},{"type":"wrapper","func":"valuePhysicsYGravity"}]}} Add to my Backpack


{"func":"valuePhysicsAngularDamping"}

Amortiguación angular

"Amortiguación angular" devuelve la amortiguación angular del Actor.

Parameters:

Ninguno.

Related Blocks:
{"func":"blockPhysicsSetAngularDamping"}

Sample Code:
{"func":"blockControlIf","values":[{"type":"wrapper","func":"valueOpLess","values":[{"type":"wrapper","func":"valuePhysicsAngularDamping"},{"type":"string","value":"1"}]}],"containers":[{"func":"blockPhysicsSetAngularDamping","values":[{"type":"number","value":"5"}]}]} Add to my Backpack


{"func":"valuePhysicsLinearDamping"}

Amortiguación lineal

"Amortiguación lineal" devuelve la amortiguación lineal del Actor.

Parameters:

Ninguno.

Related Blocks:
{"func":"blockPhysicsSetLinearDamping"}

Sample Code:
{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetLinearDamping","values":[{"type":"wrapper","func":"valueOpAdd","values":[{"type":"wrapper","func":"valuePhysicsLinearDamping"},{"type":"number","value":"10"}]}]}} Add to my Backpack


{"func":"valuePhysicsInertia"}

Inercia

"Inercia" devuelve la inercia del Actor (su resistencia a cambiar su estado de movimiento).

Parameters:

Ninguno.

Related Blocks:
{"func":"valuePhysicsFriction"} ,     {"func":"valuePhysicsRestitution"} ,     {"func":"valuePhysicsDensity"}

Sample Code:
{"func":"blockLooksSay","values":[{"type":"string","value":"Inertia affects how resistant an object is to motion. Right now your inertia is:"},{"type":"wrapper","func":"valuePhysicsInertia"}]} Add to my Backpack


Velocity

{"func":"blockPhysicsSetLinearVelocity"}

Set Linear Velocity

"Set Linear Velocity" sets the linear velocity of the Actor, which affects the Actor’s speed.

Parameters:

Linear Velocity: This parameter is the number that the linear velocity will be set to. A higher linear velocity means the Actor will move faster.

Related Blocks:
{"func":"blockPhysicsSetLinearVelocity"} ,     {"func":"valuePhysicsXVelocity"} ,     {"func":"valuePhysicsYVelocity"}

Sample Code:
{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetLinearVelocity","values":[{"type":"number","value":"10"},{"type":"number","value":"0"}]}} Add to my Backpack


{"func":"blockPhysicsSetLinearVelocityXY"}

Set Linear Velocity XY

"Set Linear Velocity" sets the linear velocity of the Actor, which affects the Actor’s speed.

Parameters:

Linear Velocity X: This parameter is the x-component that the linear velocity will be set to. A higher linear velocity means the Actor will move faster.

Linear Velocity Y: This parameter is the y-component that the linear velocity will be set to. A higher linear velocity means the Actor will move faster.

Related Blocks:
{"func":"blockPhysicsSetLinearVelocity"} ,     {"func":"valuePhysicsXVelocity"} ,     {"func":"valuePhysicsYVelocity"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPhysicsSetLinearVelocityXY","values":[{"type":"number","value":10},{"type":"number","value":2}]}} Add to my Backpack


{"func":"blockPhysicsSetAngularVelocity"}

Set Angular Velocity

"Set Angular Velocity" sets the angular velocity of the Actor, which affects how fast the Actor rotates.

Parameters:

Angular Velocity: This parameter is the number that the angular velocity will be set to. A higher angular velocity means the Actor will spin faster.

Related Blocks:
{"func":"blockPhysicsSetLinearVelocity"} ,     {"func":"valuePhysicsAngularVelocity"}

Sample Code:
{"func":"blockPhysicsSetAngularVelocity","values":[{"type":"wrapper","func":"valueSensingSpriteProperty","values":[{"type":"choice","value":"angularvelocity"},{"type":"string","value":"Ball"}]}]} Add to my Backpack


{"func":"valuePhysicsAngularVelocity"}

Angular Velocity

"Angular Velocity" returns the Actor’s angular velocity.

Parameters:

None.

Related Blocks:
{"func":"blockPhysicsSetAngularVelocity"}

Sample Code:
{"func":"blockSensingAskAndWait","values":[{"type":"string","value":"How fast do you want to go? Right now your angular velocity is:"},{"type":"wrapper","func":"valuePhysicsAngularVelocity"}],"next":{"func":"blockPhysicsSetAngularVelocity","values":[{"type":"wrapper","func":"valueSensingAnswer"}]}} Add to my Backpack


{"func":"valuePhysicsXVelocity"}

X Linear Velocity

"X Linear Velocity" returns the Actor’s X component of velocity, or how fast it is moving in the positive X direction.

Parameters:

None.

Related Blocks:
{"func":"blockPhysicsSetLinearVelocity"} ,     {"func":"valuePhysicsYVelocity"}

Sample Code:
{"func":"blockPhysicsSetLinearVelocity","values":[{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"0"},{"type":"wrapper","func":"valuePhysicsXVelocity"}]},{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"0"},{"type":"wrapper","func":"valuePhysicsYVelocity"}]}]} Add to my Backpack


{"func":"valuePhysicsYVelocity"}

Y Linear Velocity

"Y Linear Velocity" returns the Actor’s Y component of velocity, or how fast it is moving in the positive Y direction.

Parameters:

None.

Related Blocks:
{"func":"blockPhysicsSetLinearVelocity"} ,     {"func":"valuePhysicsXVelocity"}

Sample Code:
{"func":"blockPhysicsSetLinearVelocity","values":[{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"0"},{"type":"wrapper","func":"valuePhysicsXVelocity"}]},{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"0"},{"type":"wrapper","func":"valuePhysicsYVelocity"}]}]} Add to my Backpack


{"func":"valuePhysicsIsAwake"}

Is Awake?

"Is Awake?" returns true if the Actor is still moving and false otherwise.

Parameters:

None.

Related Blocks:
{"func":"valueLooksIsHidden"}

Sample Code:
{"func":"blockControlIf","values":[{"type":"wrapper","func":"valuePhysicsIsAwake"}],"containers":[{"func":"blockLooksHide"}]} Add to my Backpack


{"func":"blockPhysicsSetLinearVelocity"}

Establecer velocidad lineal

"Establecer velocidad lineal" establece la velocidad lineal del Actor, esto afecta a la velocidad del Actor.

Parameters:

Velocidad lineal: este parámetro es el valor de la velocidad lineal. Una velocidad lineal mayor significa que el actor se moverá más rápido.

Related Blocks:
{"func":"blockPhysicsSetLinearVelocity"} ,     {"func":"valuePhysicsXVelocity"} ,     {"func":"valuePhysicsYVelocity"}

Sample Code:
{"func":"blockPhysicsStart","next":{"func":"blockPhysicsSetLinearVelocity","values":[{"type":"number","value":"10"},{"type":"number","value":"0"}]}} Add to my Backpack


{"func":"blockPhysicsSetLinearVelocityXY"}

Establecer velocidad lineal XY

"Establecer velocidad lineal" establece la velocidad lineal del Actor, esto afecta a la velocidad del Actor.

Parameters:

Velocidad lineal X: el componente X de la velocidad a establecer. Una velocidad más alta hará que el Actor se mueva más rápido.

Velocidad lineal Y: el componente Y de la velocidad a establecer. Una velocidad más alta hará que el Actor se mueva más rápido.

Related Blocks:
{"func":"blockPhysicsSetLinearVelocity"} ,     {"func":"valuePhysicsXVelocity"} ,     {"func":"valuePhysicsYVelocity"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPhysicsSetLinearVelocityXY","values":[{"type":"number","value":10},{"type":"number","value":2}]}} Add to my Backpack


{"func":"blockPhysicsSetAngularVelocity"}

Establecer velocidad angular

"Establecer velocidad angular" establece la velocidad angular del Actor, lo que afecta a su velocidad de rotación.

Parameters:

Velocidad angular: es el valor de la velocidad angular. Una velocidad angular más alta hará que el Actor gire más rápido.

Related Blocks:
{"func":"blockPhysicsSetLinearVelocity"} ,     {"func":"valuePhysicsAngularVelocity"}

Sample Code:
{"func":"blockPhysicsSetAngularVelocity","values":[{"type":"wrapper","func":"valueSensingSpriteProperty","values":[{"type":"choice","value":"angularvelocity"},{"type":"string","value":"Ball"}]}]} Add to my Backpack


{"func":"valuePhysicsAngularVelocity"}

Velocidad angular

"Velocidad angular" devuelve la velocidad angular del Actor.

Parameters:

Ninguno.

Related Blocks:
{"func":"blockPhysicsSetAngularVelocity"}

Sample Code:
{"func":"blockSensingAskAndWait","values":[{"type":"string","value":"How fast do you want to go? Right now your angular velocity is:"},{"type":"wrapper","func":"valuePhysicsAngularVelocity"}],"next":{"func":"blockPhysicsSetAngularVelocity","values":[{"type":"wrapper","func":"valueSensingAnswer"}]}} Add to my Backpack


{"func":"valuePhysicsXVelocity"}

Velocidad lineal X

"Velocidad lineal X" devuelve el componente X de la velocidad, o qué tan rápido se desplaza en la dirección X positiva.

Parameters:

Ninguno.

Related Blocks:
{"func":"blockPhysicsSetLinearVelocity"} ,     {"func":"valuePhysicsYVelocity"}

Sample Code:
{"func":"blockPhysicsSetLinearVelocity","values":[{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"0"},{"type":"wrapper","func":"valuePhysicsXVelocity"}]},{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"0"},{"type":"wrapper","func":"valuePhysicsYVelocity"}]}]} Add to my Backpack


{"func":"valuePhysicsYVelocity"}

Velocidad lineal Y

"Velocidad lineal Y" devuelve el componente Y de la velocidad, o qué tan rápido se desplaza en la dirección X positiva.

Parameters:

Ninguno.

Related Blocks:
{"func":"blockPhysicsSetLinearVelocity"} ,     {"func":"valuePhysicsXVelocity"}

Sample Code:
{"func":"blockPhysicsSetLinearVelocity","values":[{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"0"},{"type":"wrapper","func":"valuePhysicsXVelocity"}]},{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"0"},{"type":"wrapper","func":"valuePhysicsYVelocity"}]}]} Add to my Backpack


{"func":"valuePhysicsIsAwake"}

¿Está despierto?

"¿Está despierto" devuelve un valor verdadero si el Actor se está moviendo, y falso en caso contrario.

Parameters:

Ninguno.

Related Blocks:
{"func":"valueLooksIsHidden"}

Sample Code:
{"func":"blockControlIf","values":[{"type":"wrapper","func":"valuePhysicsIsAwake"}],"containers":[{"func":"blockLooksHide"}]} Add to my Backpack


Advanced

{"func":"valuePhysicsGetProperty"}

Get Property

"Get Property" returns the specified physics property of the specified Actor.

Parameters:

Property: This variable is the property you want to access.

Actor: This variable is the name of the Actor whose property you want to access.

Sample Code:
{"func":"blockLooksSay","values":[{"type":"string","value":"Density affects how heavy an object looks. Right now your density is:"},{"type":"wrapper","func":"valuePhysicsGetProperty","values":[{"type":"choice","value":"density"},{"type":"string","value":"self"}]}]} Add to my Backpack


{"func":"blockPhysicsApply"}

Apply

"Apply" applies the chosen physics property on the specified Actor with the given magnitude.

Parameters:

Property: Can be force, torque, impulse, density, friction, restitution, angular damping, angular velocity, linear damping, linear velocity.

Actor: This is set to the Actor that is affected.

Magnitude: This number indicates the magnitude, or strength, of the force.

Related Blocks:
{"func":"blockPhysicsApplyXY"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPhysicsStart","next":{"func":"blockPhysicsApply","values":[{"type":"choice","value":"force"},{"type":"string","value":"self"},{"type":"number","value":"10"}]}}} Add to my Backpack


{"func":"blockPhysicsApplyXY"}

Apply XY

"Apply XY" applies the chosen physics property on the specified Actor with the given X and Y components.

Parameters:

Property: Can be force, torque, impulse, density, friction, restitution, angular damping, angular velocity, linear damping, linear velocity.

Actor: This is set to the Actor that is affected.

X: This parameter is the x-component that the physics property will be set to.

Y: This parameter is the y-component that the physics property will be set to.

Related Blocks:
{"func":"blockPhysicsApply"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPhysicsStart","next":{"func":"blockPhysicsApply","values":[{"type":"choice","value":"force"},{"type":"string","value":"self"},{"type":"number","value":"10"}]}}} Add to my Backpack


{"func":"valuePhysicsGetProperty"}

Obtener propiedad

"Obtener propiedad" devuelve la propiedad física especificada del Actor seleccionado.

Parameters:

Propiedad: esta variable es la propiedad a la que deseas acceder.

Actor: esta variable es el nombre del actor cuya propiedad deseas acceder.

Sample Code:
{"func":"blockLooksSay","values":[{"type":"string","value":"Density affects how heavy an object looks. Right now your density is:"},{"type":"wrapper","func":"valuePhysicsGetProperty","values":[{"type":"choice","value":"density"},{"type":"string","value":"self"}]}]} Add to my Backpack


{"func":"blockPhysicsApply"}

Aplicar

"Aplicar" aplica la propiedad física seleccionada al Actor especificado, con la magnitud indicada.

Parameters:

Propiedad: puede ser fuerza, torsión, impulso, densidad, fricción, restitución, amortiguación angular, velocidad angular, amortiguación lineal, velocidad lineal.

Actor: el Actor que se va a afectar.

Magnitud: este número indica la magnitud, o intensidad, de la fuerza.

Related Blocks:
{"func":"blockPhysicsApplyXY"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPhysicsStart","next":{"func":"blockPhysicsApply","values":[{"type":"choice","value":"force"},{"type":"string","value":"self"},{"type":"number","value":"10"}]}}} Add to my Backpack


{"func":"blockPhysicsApplyXY"}

Aplicar XY

"Aplicar XY" aplica la propiedad física seleccionada al Actor especificado, con los componentes X e Y indicados.

Parameters:

Propiedad: puede ser fuerza, torsión, impulso, densidad, fricción, restitución, amortiguación angular, velocidad angular, amortiguación lineal, velocidad lineal.

Actor: el Actor que se va a afectar.

X: el componente X de la propiedad física.

Y: el componente Y de la propiedad física.

Related Blocks:
{"func":"blockPhysicsApply"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPhysicsStart","next":{"func":"blockPhysicsApply","values":[{"type":"choice","value":"force"},{"type":"string","value":"self"},{"type":"number","value":"10"}]}}} Add to my Backpack