# Getting a dynamic object's velocity to behave like it's rolling

I have been working on a skateboarding game. Until this point the character/board have been controlled by a control cube with it's physics set to dynamic. Alignment is done with rays depending on if it's on the ground or in the air and how high. The problem with this of course is the player slides rather than rolls. I have tried a few different ways of adding multipliers to the linear velocity with terrible, unrealistic results.

Recently I have been using vertex parents for a few other things in the game. I didn't understand these when first setting up the control cube, but now I am thinking it should be possible to use a rigid body cylinder or sphere as the "control cube". However, my initial testing is not going well. It seems like I would need to calculate the forces to be applied on the global access, instead of local, which is beyond my mathematical ability.

So my question is, is there a better way to do this? Is there a magical formula that will help me calculate the proper rolling type forces on the dynamic object? Should I scrap the dynamic object and use a different physics type? Any other suggestions or completely obvious solutions I'm missing?

Additionally, I played with a few car scripts a while ago and couldn't extract anything useful. My player also walks, so I need to switch the behavior back and forth.

• Not sure I understand what you want to roll.. The player? The control cube? And in what way should it roll? Jul 28, 2016 at 20:09
• I am looking for some way to get or calculate the velocity and or forces of a rolling object and apply them to a dynamic control cube which I manually control the alignment of. Something that behaves like it's rolling but stays aligned with where I tell it. I am having trouble putting it into words. Neither the player nor the control cube should actually roll. I want to get the speed, not the rotation. Jul 28, 2016 at 20:59
• Dynamic objects don't roll. You need to switch it to a rigid body, at least temporarily, to get it to roll. Why reinvent the wheel (literally)??? Jul 28, 2016 at 22:33
• @AnthonyForwood rigid bodies roll. Jul 29, 2016 at 4:35
• I'm not sure that I want to use an actual rigid body. I just want to calculate similar forces and apply them to a dynamic. My physics and math skills aren't too great, I guess I am looking for better insight into what would be involved in calculating the speed and forces to apply. I mean it sure sounds like I'm trying to reinvent the wheel, so please tell me if I'm missing something obvious. Jul 29, 2016 at 19:02