Game Development Community

Triggers that "Pull"

by Jacob Boura · in Torque Developer Network · 03/03/2010 (3:23 pm) · 2 replies

So Im doing nothing but programming for a project right now, and I was asked to make a "sticky wall" that would pull the player in if the player gets too close, BUT it has to be escapeable.

I was thinking of mixing a trigger with a getTransform or something so that when the player enters the trigger, the trigger will alter the players x or y position slightly, and then i could out a larger tick on the trigger so that the player has a chance to escape.

the problem is that i never have luck with get transforms, and I cant think of how to type it out.

any help would be apprieciated.

#1
03/07/2010 (6:08 am)
Have you looked at the physicalZone class?

You set them up like triggers, and they can modify a players velocity, gravity, or to apply a force to the player (the last one is what you're looking for I think) when they player enters their area.
#2
03/07/2010 (9:22 pm)
Actualy someone did mention that to me yesterday. It sounds good, though I've never used one, I'll give it a shot.