Controlling a ball, having trouble making it roll. Game eng.

Ok, I can make a ball move and all, that’s fine. But I don’t know how to make it roll as it moves. When I tried, it would make the ball go in the direction it was “facing,” so it would just do loops.

I need to know 3 things:

1: How do I make the ball roll as I make it go in different directions?

2: How do I add gravity effects, for example, being able to make the ball jump up and then fall back to the ground smoothly, and being able to make the ball go off ramps, etc.

3: I forgot how to make the ball stay on the ground without going through it :expressionless: How do I add collision detection for things like this?

Thanks.[/list]

Use the game engine. If you want to do it as an animation You have to do it manually with Ikeys for all locations, rotations, jumps, bounces etc. The manual is a good place to start.

%<

hi,
i think that a better forum to post your stuff on would be:
https://blenderartists.org/forum/viewforum.php?f=6

since there would be a higher chance that viewers would have come across it before.

simon

Tohupuu Blender has integrated dynamics, so you wouldn’t need to use the game engine. I believe the controls are in the edit buttons… though this blend file wouldn’t work in other versions, until the features are implemented in BF Blender.

To make it roll, I’d just add another thing (like what controls the Loc) and set it to change the Rot, and just link them (if that made sense, if not tell me and I’ll rig up a .blend).

Are you asking how to actually do this in the gameengine?
If so:

In logicbuttons (F4), when you turn on “Actor” and “Dynamic” etc, turn on “Rigid Body”

Just build the ramps, get up enough speed and launch yourself off.
You can set the gravity strength in worldbuttons (F8), the default of 9.8 means earth gravity if 1 blender unit = 1 metre

Again, this should happen automatically, but if you make the walls/floor/etc an actor then it reverts to a bounding sphere and I can’t recall exactly how to change it back :-?

Another thing to look into is, in materialbuttons (F5), click the “DYN” button in the colours panel - you can set the friction of the ground, and things like that (note that if you have rigid body on, the friction will only set how well the ball skids, but won’t affect how well it rolls)

shbaz wrote

Tohupuu Blender has integrated dynamics, so you wouldn’t need to use the game engine. I believe the controls are in the edit buttons… though this blend file wouldn’t work in other versions, until the features are implemented in BF Blender.

cool i didn’t know that. thanks for the info. do you need 2.3 python install?

i went and got BJs latest build, and i didn’t see any means of combining game physics with anims,…how do i set it up? do i need a different tuhopuu?

Thanks Phlip, but now I have another problem.

I was building my little hill that the ball would roll down. I tested it and it was just fine. Then I continued doing what I was doing before the testing.

I then added a texture using UV-mapping. It worked out nicely.

Then all hell broke loose.

I tried to continue building my road, and the extrusions were white. So now I know I should have applied the texture last. Also, the ball would go straight through the new part of the hill/road every time I tested it. WHAT WENT WRONG??! PLEASE HELP!

Thank you.

Never mind, I got that sorted out. Now I just need to know how to make a popping animation for my ball for when it… pops. And also how to put a background(like clouds) for when I’m playing the game, not that wierd camera one that disappears when you play.

Thanks again.