Monday, 12 August 2013

Should I use a Unity RigidBody for my rolling sphere player?

Should I use a Unity RigidBody for my rolling sphere player?

I'm just starting with Unity/C# but I've done some programming before.
I've created a very basic prototype; a scene with some platforms at the
same depth and my "player" is a sphere object. It's instantiated at
runtime by a custom player controller script and I've implemented gravity,
acceleration, a "rolling effect" (rotating the sphere on the z-axis using
eulerAngles) and collision detection with the platforms by using
Rays/RayCast, in a player physics object attached to the player.
Would I have been better off just using a RigidBody on the sphere,
applying a torque to the ball when the player moves right/left and letting
Unity handle its rolling/movement? Is there any reason not to use a
RigidBody? (Or have I just wasted an evening?:))

No comments:

Post a Comment