Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
Help in moving sprite
Print
Pages: [
1
]
Author
Topic: Help in moving sprite (Read 1505 times)
0 Members and 1 Guest are viewing this topic.
mnajrg
Newbie
Posts: 26
Help in moving sprite
«
on:
November 28, 2012, 06:35:32 am »
How can I make a simple sprite move on the screen like a ball?
Logged
masskiller
Sr. Member
Posts: 284
Pointers to Functions rock!
Re: Help in moving sprite
«
Reply #1 on:
November 28, 2012, 06:46:48 am »
Read this:
http://en.sfml-dev.org/forums/index.php?topic=5559.0
Please.
Your question nearly makes no sense for anyone that's not inside your head.
Logged
Programmer, Artist, Composer and Storyline/Script Writer of "Origin of Magic". If all goes well this could turn into a commercial project!
Finally back into the programming world!
eXpl0it3r
SFML Team
Hero Member
Posts: 11028
AW: Help in moving sprite
«
Reply #2 on:
November 28, 2012, 09:06:37 am »
To move a sprite or a shape you can use move():
sf
::
CirlceShape
ball
(
10
.
f
)
;
// ...
ball.
move
(
10
.
f
,
10
.
f
)
;
If you want some physics you need to implement it or use an existing library.
Logged
Official FAQ:
https://www.sfml-dev.org/faq.php
Official Discord Server:
https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog:
https://duerrenberger.dev/blog/
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
Help in moving sprite
anything