Game Development Community

Pointing a sword?

by Rob Terrell · in Torque Game Engine · 01/17/2007 (9:30 am) · 5 replies

I've been playing around with the Wii controller more, and for fun, I'm trying to get my TGE character to hold a sword. (I've hacked together a Wii lightsaber in GLUT -- nice and fun -- but once you get a lightsaber on the screen you immediately want a character to hold it and another character to fight, so I moved back to TGE.)

Starting with Kork with a sword mounted in a hand (and I haven't done that much yet) I'd like to use the Wii's tilt/pitch/yaw controls to angle the sword, with the "A" used to thurst. My question is, what is the best approach for pointing the sword?

Should I make an animation of the arm moving through the range of motion on each axis, and then attempt to blend the animations at runtime based on the Wii controller position?

Or is the best approach to locate the right Kork bones and position them in C++? Is there any TGE sample code for positioning a skeleton in C++?

#1
01/17/2007 (12:32 pm)
I think it would depend on what the end result is your aiming for. If you just want different flicks of the remote to correlate to different attacks, such as Zelda, then I'd go for animations. If your shooting for something closer to 1:1 movement then I would think manipulating the bones would be your best bet.

There is a thread procedurally animating bones.
#2
01/17/2007 (7:40 pm)
Thanks, that's exactly what I was looking for.
#3
01/17/2007 (7:49 pm)
Interesting... I've played Zelda, but I haven't played Red Steel. Does it follow exactly to the remote movements?
#4
01/18/2007 (5:55 am)
I haven't played Red Steel, but I'm told it doesn't completely have 1:1 sword movement like was originally expected. Different combinations of movements trigger different attacks. I heard they went that direction as they felt that if you weren't already familiar with the use of a sword then you weren't going to be very effective in-game. From the design perspective it was probably a good call. Still, I plan on picking it up when I do finally find a Wii.
#5
02/08/2007 (1:49 pm)
@Rob:

Have you been able to make any headway on this based on the thread linked above?

Thanks,

Ben