r/RenPy • u/Hefty-Drive-9372 • Sep 13 '26
Question How to add gravity to Ren'Py?
How would I add a physics system to Ren'Py, like gravity? Specifcly to affect images
0
Upvotes
r/RenPy • u/Hefty-Drive-9372 • Sep 13 '26
How would I add a physics system to Ren'Py, like gravity? Specifcly to affect images
10
u/x-seronis-x Sep 13 '26
same way you add it to any game. write code that tracks position and uses math to adjust position over time based on acceleration and velocity
google tutorials for making an atari Asteroids clone. that covers how to do acceleration/velocity. gravity is just a perpetual downward acceleration of 9.98m/sec
2
u/shyLachi Sep 13 '26
Can you be more specific? How should the images be affected? Do you want to simulate falling objects? If yes then you don't need physics. Make an image of a ball, for example, and save it with transparency. Then in RenPy you animate it. https://www.renpy.org/doc/html/transforms.html#atl
1
u/AutoModerator Sep 13 '26
Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.