Swinging Vine
by Chase Fellhoelter · in Technical Issues · 12/10/2007 (6:12 pm) · 1 replies
I am using TGE 1.5.2 and my end goal is to have a swinging vine the player can attach to with a key press and detach with the same key press or release of that key. So after playing around a bit with a simple box that slides back and forth with a mount node inside it, I have come across a few issues. What I have managed so far is: The player can press "." , which can be set to "e", on collision and mount the node using %obj.mountObject(%col, 0);. (The collision box does not animate however). The player is then mounted and moves with the box. In camera mode you can see the player moving with the box, but in first person and third person it does not always follow the motion of the box. I have added %obj.unmount(); in the Player.cs within Armor::doDismount() that allows spacebar, triggerCount2, (how do I set to "e"?) as a dismount trigger and the player is able to unmount from the box. In addition to just unmounting, I am assuming an impulse should be applied to the character to be more realistic.
Some things I need help with:
1. How can the collision mesh be animated (rotating, scaling, translated) through script (preferably .cs)?
2. How can the mount and unmount function be set to use "E" as the key to press or release?
3. Updating first and third person views while mounted.
4. How would an impulse be applied to the character to follow the tangent of the node?
I appreciate any help you can offer and I am always willing to try a new method.
Some things I need help with:
1. How can the collision mesh be animated (rotating, scaling, translated) through script (preferably .cs)?
2. How can the mount and unmount function be set to use "E" as the key to press or release?
3. Updating first and third person views while mounted.
4. How would an impulse be applied to the character to follow the tangent of the node?
I appreciate any help you can offer and I am always willing to try a new method.
Torque Owner Nathan Kent
function eButton(%val) { if(ServerConnection.onVine && %val) CommandToServer('jumpOffVine'); }or mabyfunction eButton(%val) { if(ServerConnection.onVine && %val) ServerConnection.player.dismount(); }