Game Development Community

Attaching player to a path

by Backman · in Torque Game Builder · 12/06/2006 (3:48 am) · 0 replies

Hello all, I'm wondering if it's possible to attach a player (man running around) onto a path in the following manner:

- Player is falling.
- Player lands on a wall he can walk on.
- This wall does not rely on collisions to walk on, it has a path surrounding it in a 'walk on this'-type of idea.
- Player gets attached to the closest _point_ on the path, not the closest node. So the player doesn't actually land on the wall (in theory), he lands on the path.. or something like that.
- Now the player can walk around freely and happily and no problem with graphics being odd for collision detection or anything like that.

I can't find any script command that would let this work.. I'm guessing the 'attach to closest part of the path' idea is the hardest to implement.

Is this a totally crazy idea? Would it work? Is it possible?

I've been using TGB for a month or so now (not new to coding however), was going to post in the starting out section but don't think there's a straight answer for this so posting here..

Thanks for any help!