PDA

View Full Version : need help with pivoting


ol120
08-17-2008, 08:30 PM
hello I have been trying to make an RPG and I have found that when I try to make a door open it pivots where the doorknob is and not where the hinges hypothetically are

could I have some help?

DrJim
08-18-2008, 07:27 AM
One of the unavoidable problems with Alice (it would have been very difficult to implement the option) is that you cannot move the origin and axis of an object from within the program. You have three options, listed by increasing difficulty.

1. Use the school object from Environments in the web gallery. That door works "normally."
2. Add a dummy object that rotates "correctly" and then make it the vehicle for your door. This will take some experimenting, but you should be able to get it to work.
3. Make your own door in a program such as Anim8or and set the axis where you want. Then import it into Alice. For more detail on this option, browse through the "Share Objects" section of the forum. Since a door is a fairly simple object, it is a very nice object for your first try at this approach.

DickBaldwin
08-18-2008, 08:29 AM
hello I have been trying to make an RPG and I have found that when I try to make a door open it pivots where the doorknob is and not where the hinges hypothetically are

could I have some help?

Without looking at the model for the door, it sounds like you might have a center point problem. Go to http://www.dickbaldwin.com/tocalice.htm and study up on center points, turning, rolling, and "as seen by".

If the center point is actually at the doorknob (which seems a little strange), you could probably attach an invisible magician's wand to the hinge side of the door and rotate the door "as seen by" the wand to make it appear to be rotating around the hinges.

Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free Scratch tutorials: http://www.dickbaldwin.com/tocHomeSchool.htm
Free Java/C#, etc. tutorials: http://www.dickbaldwin.com/toc.htm

ol120
08-18-2008, 08:52 AM
alright thanks! :D