Game Development Community

Ball Physics

by Cory Anderson · in Torque Game Engine · 08/11/2007 (11:22 am) · 4 replies

Does anyone know of a good way to script the physics for a rolling ball?

#1
08/11/2007 (11:25 am)
You could just have an animated sprite that "looks" like its rotating and then move it wherever you want. If you want a ball that can reverse direction then that will take more work, like a staticsprite and set its rotation speed based on its movement speed and direction each tick or whenever there is a change.

Oh for some reason I thought this was a post in the TGB forums, a rolling ball in TGE? You may need to implement a setangularvelocity function, sry I'm not much help there.
#2
08/11/2007 (12:08 pm)
Haha okay thanks anyway ;)

I am thinking of developing a minigolf game, and I would like a realistic ball physics system. Could this be scripted, or will I need to modify the engine source code?
#3
08/11/2007 (3:35 pm)
There is a rigid shape physics system in the engine, that was incorperated in tge 1.5 , check out the rigid shape wiki page on the TDN.

here: http://tdn.garagegames.com/wiki/TorqueGameEngine/RigidShape

Hope that Helps

Neil
#4
08/11/2007 (8:25 pm)
Awesome! Thank you.