0
$\begingroup$

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.

$\endgroup$
6
  • $\begingroup$ Not sure I understand what you want to roll.. The player? The control cube? And in what way should it roll? $\endgroup$
    – gandalf3
    Commented Jul 28, 2016 at 20:09
  • $\begingroup$ 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. $\endgroup$
    – billyzill
    Commented Jul 28, 2016 at 20:59
  • $\begingroup$ 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)??? $\endgroup$ Commented Jul 28, 2016 at 22:33
  • $\begingroup$ @AnthonyForwood rigid bodies roll. $\endgroup$
    – ruckus
    Commented Jul 29, 2016 at 4:35
  • $\begingroup$ 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. $\endgroup$
    – billyzill
    Commented Jul 29, 2016 at 19:02

1 Answer 1

1
$\begingroup$

I was able to get some really nice results using physics simulations! Rigid body constraints set to both front and back axles on hinge mode provided the necessary pivot.

i<3 physics

Make sure you enable linked collision to avoid crazy issues with your shocks! I made a fancy test file, complete with board riding monkey for your entertainment. Please wear a helmet when riding.

$\endgroup$
2
  • $\begingroup$ Hi, I spent a while playing with your blend file and appreciate the attempt, but this isn't really what I'm looking for. How would I add controls to this? If I am going the actual rigid body route, maybe my question is better asked as: how can I add basic ("local") wasd movement to a rigid body? $\endgroup$
    – billyzill
    Commented Jul 29, 2016 at 18:54
  • $\begingroup$ hmm. io can do that too. but you have to appreciate the all physics. new answer scoming soon. :D $\endgroup$
    – ruckus
    Commented Jul 29, 2016 at 20:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .