Game Development Community

Ball Class?

by JeffH · in Torque 3D Professional · 03/02/2013 (8:54 am) · 4 replies

Hey guys,

I've been in the process of doing some experimenting in Torque3D with a ball class. The ball should be able to roll around with physics and such. I have tried experimenting with the RigidShape class, but it seems to glitch up a lot. I dug into the research and people from years prior have stated that the ball class, for example, in marble blast, had been made using ShapeBase?

I was wondering if the physicsShape class could make due with ball physics. Any help would be appreciated. I've been looking at the Vehicle class for collision code and the such. I am kind of a c++ noob here, so please forgive me if this sounds kind of lame and should be a rather "easy" thing to do. However, I would definatly want to program it in c++ and not script for the reason of speed and probably better collision checks than using a ton of rayCasts :P

~Jeff

#1
03/03/2013 (12:07 pm)
Also, does anybody know of any ball resources? I've been looking but can't seem to find any around here..
#3
03/04/2013 (11:20 am)
@Jeff, not sure, I need a ball also, am going to take a look at www.garagegames.com/community/blogs/view/22128 and check out the source code to see how the ball was done here.

Its all I can suggest, however I do remember someone saying using a more detailed collision mesh gets better results than the standard shapeBase rock, I also thought about having a nested collision mesh, one smaller than the other both inside the ball. haven't tried that yet, not sure if it's a bad idea or not Lol
#4
03/04/2013 (12:46 pm)
lol, thanks David.

I had done a little more experimenting with RigidShape, and if you change up some of the datablock values in script it creates a decent roll effect.

And what you posted as a resource, i've already looked into. It uses rigidShape class. Thanks anyways :)

~Jeff