PDA

View Full Version : Character help


linx
11-04-2009, 08:58 AM
I'm a student working on a project for class and the game is going well so far but... the character keeps going through the ground. Anyway to fix this?

http://www.willhostforfood.com/access.php?fileid=93057 - Game file

x2495iiii
11-04-2009, 04:30 PM
You should post your world directly to the forums in the future. Makes it easier for us.

linx
11-04-2009, 05:43 PM
Sorry.. but any ideas as on how to fix this? The assignment for my class is due monday :(

antmj2317
11-04-2009, 05:44 PM
I'm a student working on a project for class and the game is going well so far but... the character keeps going through the ground. Anyway to fix this?

http://www.willhostforfood.com/access.php?fileid=93057 - Game file

I didn't download the file, however my guess is that you are using a 'moveTo' instruction?

moveTo will match the centerpoints of 2 objects, which are NOT necessarily their centers.

Try using..
turntoFace
move forward x->getDistanceTo(y) - (y.width / 2)

linx
11-04-2009, 05:48 PM
Ah no, im using "move at speed"
We have to make some sort of game, and i have the camera being able to rotate around (Look around) the character, and i made it so the character moves foward, as seen by the camera. Actually, maybe the camera is the one that is facing the wrong direction which is making the character go inside the ground?

x2495iiii
11-05-2009, 05:41 AM
Your problem is a combo of the ranger being non-perpendicular to the ground and the camera being pointed downward (especially since the camera defines how the ranger moves forward).

Tell the camera and the ranger to stand up, and the problem will go away.