Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - helloSunday

Pages: [1]
1


Alternatively you could also compute the vector between your (center) sprite and mouse, normalize it, multiply it by the radius of your revolution, then add it to the center of your (center) sprite to get the position of your revolving sprite.


This was huge, I was trying to do this on graph paper but couldn't figure it out. Thanks a bunch!

2
Graphics / revolving a sprite around a circle based on mouse position
« on: August 15, 2021, 06:11:34 am »
Ok, so I'm trying to get a sprite to revolve around the center of another sprite. I want the revolution to sync up(follow) with the mouse position relative to the sprite that is being revolved around.

I'm assuming this is more of a mathematics/geometry question than a SFML specific question, but nonetheless I am trying to accomplish this task is SFML.

My question is: how can this be done?

*I'm not necessarily looking for a specific answer as much as guidance on tools or information that could be used to solve this problem.

Pages: [1]