Skip to content

ArmandBurger/pointer_follower_test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pointer Follower Test

This project demonstrates how to synchronize a UI follower element with the cursor position using Bevy. The follower tracks the cursor within a container, updating its position in real time.

Demo Screenshots

Default State

Default UI Default: No tracking is applied yet.

Follower Tracking

Follower Tracking Follower: The demo shows how the cursor and follower positions are synced.

Disclaimer: The cursor is not shown in these screenshots, but it is positioned in the center of the follower element.

Note 1: When moving the cursor quickly, a slight offset may occur between the cursor and the follower. This offset will shrink to zero once the cursor stops moving.

Note 2: Using Pointer<> and RelativeCursorPosition makes this example fully touch compatible.

About

UI entity following pointer (mouse/touch) position using bevy_ui

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages