Hey guys,
Does anyone have a suggestion on how to implement the "grabbing" of an object by your main character. I would like my hero to be able to grab an object and either push or pull it.
What steps should i take when i've detected collision between the two objects? I'd like to pop up a new button on the hud layer that the user can press to grab the object as well, but i don't want the hero to actually run into the object as this object could be fatal to him (if you played Limbo for XBLA, think the bear traps). So i guess i have two main questions.
1) How can I detected a collision that is about to happen
2) How can i then use the hero to "grab" (push/pull) the object
I've toyed around with Joints, but i'm not sure that will work as I only need the grab object to slide. I've also used the SetTransform method on the object but I get adverse affects (the object will not collide with walls, etc)
And suggestions would be greatly appreciated.
Does anyone have a suggestion on how to implement the "grabbing" of an object by your main character. I would like my hero to be able to grab an object and either push or pull it.
What steps should i take when i've detected collision between the two objects? I'd like to pop up a new button on the hud layer that the user can press to grab the object as well, but i don't want the hero to actually run into the object as this object could be fatal to him (if you played Limbo for XBLA, think the bear traps). So i guess i have two main questions.
1) How can I detected a collision that is about to happen
2) How can i then use the hero to "grab" (push/pull) the object
I've toyed around with Joints, but i'm not sure that will work as I only need the grab object to slide. I've also used the SetTransform method on the object but I get adverse affects (the object will not collide with walls, etc)
And suggestions would be greatly appreciated.