ball rolling physics

Blitz3D Forums/Blitz3D Programming/ball rolling physics

Rob(Posted 2003) [#1]
Hi all, any tips on ball rolling physics? John Pickford had this all worked out ages ago and the code was posted on these forums, however I think the forums have been trimmed since.

Basically, if you roll a ball hard enough, it will roll up and over, then drop.

Imagine a C shape and the ball: .

As the ball rolls towards the shape:
_
(_ .

_
(_.

It will curve round (if initially going fast enough) and come back the way it came, upside down.

_ .
(_


any tips? :)


TartanTangerine (was Indiepath)(Posted 2003) [#2]
Rob,

I asked a similar question a while ago, have a look a Dark Eagles code, if you give the ball enough energy it will do what you wanted.

http://www.blitzcoder.com/cgi-bin/ubb-cgi/postdisplay.cgi?forum=Forum14&topic=000743


EOF(Posted 2003) [#3]
I have an old project here which uses rolling ball physics.
Most of the rolling ball code came from the archives way back when.



I have stripped the textures. Therefore the level looks a bit bare but it should be enough to get you going.

Use the MOUSE to move the ball around.
LMB=Jump
RMB=Reset view

Download Marble


Rob(Posted 2003) [#4]
Thanks Flynn & DE :)


EOF(Posted 2003) [#5]
Look up ^


Rob(Posted 2003) [#6]
Thanks Syntax :D


poopla(Posted 2003) [#7]
Just remember with any even basic physics simulation you want you're objects transformation vector to be global. Or it kills the whole effect.


Rob(Posted 2003) [#8]
Thanks but I already have it working now :) I need it for the strangest thing (as always).


CyBeRGoth(Posted 2003) [#9]
You need it so you can go up half-pipes? :)


Rob(Posted 2003) [#10]
yeah ;)


Tracer(Posted 2003) [#11]
snowboard balls?

Tracer


poopla(Posted 2003) [#12]
lol