Scratch for Java

Sprite::pointTowardsMousePointer()

Points the sprite towards the current position of the mouse pointer. This method calculates the angle between the sprite's current position and the mouse pointer's position, then sets the sprite's direction accordingly.

Examples

View on GitHub

Syntax

Java

.pointTowardsMousePointer()

Scratch

point towards [mouse-pointer v]

Return

void

pointTowardsMousePointer()

Create Shareable URL

Select Sections