Fps armature like call of duty? (MouseLook)

I know that I can use a cube and apply left right MouseLook rotation. But for up and down rotation is it possible to apply mouseLook to an armatures torso? I know some people suggest using two seperate armatures. Is this the best solution/2 armatures? Or can you actually just use mouselook on the torso bone of the armature. I am very new to blender so please explain things in simple terms if possible. Video links on how to do this would be great as well. I’d really like my player to be able to actually rotate his torso up and down to aim.

you can do it with 1 Armature…

ArmatureTest.blend (546 KB)

…using bone constraint and mouselook

would be best if you used your own MouseLook Script, just made a veery basic one for this test

Ok thanks, I’ll take a look at that blend file when I get back to my computer. How do I mark this as solved?

ooh a wonder full simple demo blend

thanks i found out why i only could got it to work in 3d view and not in standalone, seems i needed the run armature brick.
this solved my ridiculous time wasting to try a million combos. and it’s so easy xD (once you know it).


How do I mark this as solved?

first post ->edit->advanced-> then you can set a prefix

Anyone willing to set this up on my rig for me? :smiley: or could you type out the steps. Even though I looked at the .blend you provided I’m not exactly sure how to set everything up like you did

Use mouselook on invisible object, parent invisible object to physics root object.

In armature spine bone use copy rotation to target the object rotated my mouselook.

Now armature spine controlled by mouse, however copy rot constraint induces a 1 frame control lag to python do to the order of updates. (drawing lines based on bone relative objects like weapons is 1 frame off)

It’s actually best to use something like simple mouse to generate a mouse property, used to set a animation keyframe.

Key 0 = looking all the way left
key 100 = looking all the way right

By copy rotation do you mean select armature bone I want and use a bone contraint of copy rotation?

Yeah, which works pretty well, but adding projectiles while rotating the mouse, can be “desyncronized”
With this method, as the copy rot updates after logic :frowning:

You can add projectiles using a predraw callback, but this is pretty complex.

Its best to use a armature action, as they update instantly I think during the logic step.

I got it to work! How to cap the rotation though? :D. And lower the mouse turn speed.

@cotaks yeah “Run Armature” is a bitch if you dont know it xd

@Fifan88 you can cap rotation in the mouselook script (i think there are mouselook scripts out there that do that) and the turn speed should also be in the script. If you use the script from my .blend then the turn speed is controlled by the “scale = -1.1” variable. (if you dont have negative then its inverted in both directions)

But it would be best if you just use a mouselook script from someone else (or write your own)

How to mark this as Solved?