Stick to ground

Hi,

How can an object stick to the ground? I have a cube which I control with the movement of the mouse. This cube needs to fall down on a plane which is rotated (right side up, left side down).

The Cube is a dynamic actor. So when I play this application, the cube falls down on the plane and slides of on the ground.

But what I want is the Cube to stick to the plane (or ground). So when it falls and touches the plane it stops at it’s collision point.
Also when I move the mouse the cube needs to move to but still it must stick to the ground.

What I have now is that when I move the mouse the cube more or less bounces of the plane and it bounces of the plane when the cube is on the ground and I want to move the cube back on the plane again.
What I’m trying to get is:

  • Moving an object with the mouse movement
  • Moving objects up a hill, but if the object doesn’t move it has to stay at that spot (now it still slides down the hill)
  • The object needs to move over the floor not in the air.

Update: Part 2
I’ve placed an empty above the cube that controls the cube’s movement. This stops the cube from bouncing away in a direction. It now only bounces in Z Direction. How can I stop this?

Can anyone help me?

Here is the .blend file: http://www.savefile.com/files/656686

Update: Part 3

I’ve given the cube a downwards force. This works now, but when I move it fast it will go through the plane
Thnx

Working now.

Set the cube to apply a downward local force when touching the plane :yes:
that should work.

Hmm can you fix that in the .blend file? I tried several setForce(0.0,0.0,-100.0,1) But it still bounces off things.

Thanks for the help

This will help:
http://download.blender.org/documentation/NaN_docs/BlenderGameReference/realtimebuttons.html#OBJECTSETTINGS

You could change the mass of the object so it is very heavy and connot mounce, you could make it non dynamic so it doesnt follow the laws of physics.

Hope that helps

Well I played a bit with the objectsettings. The cube is first a dynamic actor. This means it will fall down. When it touches the plane, the dynamics are suspended. So it will not slide down the plane. And when I move the mouse it becomes a dynamic actor again because otherwise it will float in the air. But because of this the cube bounces off the plane.

What I’m trying to get is:

  • Moving an object with the mouse movement
  • Moving objects up a hill, but if the object doesn’t move it has to stay at that spot (now it still slides down the hill)
  • The object needs to move over the floor not in the air.