Game Development Community

Mouse controlled animation

by Jonas Wilson · in Torque Game Engine · 10/08/2005 (2:27 pm) · 4 replies

Hi there...

We are looking to create a "scene" in which the player controls the arm of his avatar with the mouse, independent of the camera.

Say this arm is holding a gun - and we want to be able - not only to aim - but to actually have an animation, that reflects the movement of the mouse. That means the arm-model moves according to mouse movement.

How is that possible ?

Thank you in advance for any answer.

(still in the early phase of learning to use Torque - very early that is)

About the author

Recent Threads


#1
10/08/2005 (7:37 pm)
I think the best method to achieve this is having 4 blend animations, all starting at angle 0
#2
10/08/2005 (8:54 pm)
Hmm. Sounds a lot like one of the main features in Trespasser. Wierdest first person shooter I ever played. The right arm was 'controlled' by mouse movements. I'm using the word controlled very loosely. For those who haven't tried it, I highly encourage everyone to download a demo of it and take it for a spin.

Anyway, it sounds like an interesting project. I'd love to see something like that working in Torque.

Aaron E.
#3
10/10/2005 (5:13 am)
Thanks a whole lot for your answers - we will proceed right along with the prototype...
Maybe keep you posted?

Does any of you, by any chance, have a link to a tutorial, that achieves a blend animation?

'Till next time -
#4
10/10/2005 (7:22 am)
First of all jonas you should understand that the functionality you want is not available in torque out of the box. using a series of animations may be adequate but its probably not as flexible as you would like. to achieve what you want youre gonig to have to modify the source code. I suggest you investigate the code for mounting and rotation while mounted. as far as I know, the player object is the only object which can be rotated while mounted but it can only be rotated on the horizontal plane. dig through the source, find the code where this functionality is implemented, and extend it to support rotation in all directions while mounted. then it should be relatively easy to convert mouse movements to arm rotations. i dont own the engine so i have no idea where you would look.