Melee using motion controls (Hydra)
by NiN-NiN · in Torque 3D Beginner · 11/25/2013 (8:52 pm) · 5 replies
Hi All
I just have a question regarding melee but using the razer hydra to control the item like a sword etc
Obviously you can move and twist and rotate the object freely with your hand (If you don't know the hydra is a motion controller)
The Issue I am wondering is how would it be best to deal damage?
I have read that raycasts are used to fake melee but that's with animation so i'm unsure if this would work for use with a hydra?
Is it possible to use oncollision for say a sword and then it applies damage?
I will soon be setting up the hydra once dave has a template and wanted to see what people thought would be the best way to make the sword apply damage?
I just have a question regarding melee but using the razer hydra to control the item like a sword etc
Obviously you can move and twist and rotate the object freely with your hand (If you don't know the hydra is a motion controller)
The Issue I am wondering is how would it be best to deal damage?
I have read that raycasts are used to fake melee but that's with animation so i'm unsure if this would work for use with a hydra?
Is it possible to use oncollision for say a sword and then it applies damage?
I will soon be setting up the hydra once dave has a template and wanted to see what people thought would be the best way to make the sword apply damage?
#2
11/26/2013 (4:25 am)
@Richard, thats an interesting idea, may have to play with that :-)
#3
11/26/2013 (5:58 am)
There is an onCollision function in torque that u could use to do this in a simple way, because the sword would be a static mesh attached to the players hand u could have multiple collision meshes that do different damage amounts to the player, u would need to call the players health inside the function lik
#4
11/26/2013 (6:12 am)
Also u could find out the objects velocity in torque script and have it affect the amount of damage given, this would be especially useful for u using motion controller and a sword, I'm not sure if u can do this with projectiles they usually have a set amount of damage don't they?
#5
11/26/2013 (6:43 am)
The onCollision callback is there, sure - and it is effective.
Torque Owner Richard Ranft
Roostertail Games