View Full Version : How to keep objects from sinking
patrick.tierney
08-11-2006, 01:45 PM
I have just gotten started with Alice. Although I am technically oriented, I am not much of a programmer.
I have made some simple worlds, but keep running into the same problem. My objects keep sinking into the ground when they move along.
For example: I set cow to chase a horse while the horse is moving towards another object, like a chicken, and the horse will sink into the ground as it moves. I have found that cows, when walking, don't
sink.http://www.alice.org/community/attachment.php?attachmentid=75&stc=1&d=1155321671
sinking.JPG
Should I do some sort of collision detection to keep things from sinking? Or is there something simple that I have just missed?
Any help would be greatly appreciated.
-Patrick
lanceA
08-11-2006, 04:25 PM
I suspect that your problem has to do with the orientation of the horse object. You might first wish to view your world in Alice's Quadview -->click on the Add Objects button and select the Quadview radio button in the upper right hand of your window. Check if your object appears to be level/straight.
If your object is slightly tilted downward, when it moves it will move into the ground.
I created a world with a cow very slightly tilted (not really noticeable to the eye) and the cow walked into the ground. I then dragged the cow stand up method tile to the beginning of the program and when it ran this time the cow did not move into the ground. This merely proved to me that I had not properly oriented the object at the beginning of my program.
(I then added a horse object to the world and ALICE initially positioned it about 1/8-inch into the ground. I'm not sure why this occured.)
[Edit] Also view the objects orientation in your world by first selecting the object in the Object Tree and then viewing it's Properties in the Details Window. The property pointOfView shows an object's position and orientation. Here you can easily see if an object is slightly positioned at an angle.
Cataphract
08-14-2006, 11:31 AM
I think i have a better idea...
When you want to move the object, for example forward, just set say as seen by ground, that way, no matter if you want the object to move while standing up or tilted or any other stances, it should always stay level.
lanceA
08-14-2006, 12:31 PM
That's a great idea, except now if I want to move the object to do something else or I need to add several move commands out side of a loop then each time I would have to include an additional instruction in the move command. Each instruction adds to the over all processing time.
But you are correct in that it is a quick fix for a simple program. :)
Cataphract
08-14-2006, 08:34 PM
true, heres another idea, put an object on there, makesure that it is level to the ground, by doing that you could go stand up and then simply set viecle to it and when you want to move it, just move the object, this would also allow you to make it go forward while facing up or down without flying or sinking so you don;t have to go as seen by all the time