Author Topic: align turret to mouse  (Read 3124 times)

after making the look.dsq animation for a turret, the animation itself looks fine but it isnt in sync with the mouse, so the barrel of the gun is always shooting below or above the mouse. is there any way to align it? doing it manually by slightly modifying the animation and testing it in game is a tedious task that would probably take many hours, which I dont want to waste


Pretty sure this just means you have either a range issue in the script or misaligned bones and/or offset animations.

how could I fix it then? I spent some time manually modifying the animation and now the mouse is somewhat aligned at lower angles, although at higher angles the offset becomes more visible. it has to do with the angle and animation length im pretty sure, like there is a specific angle at which the turret should rotate in look.dsq to line up with the mouse

If that's the case then it sounds like you need to change the number of frames in your animation.

but to what value then??

I'm not sure. I get how this stuff is done, but I've never actually done it myself. It would be nice if someone with experience would help out.

I'm not sure. I get how this stuff is done, but I've never actually done it myself. It would be nice if someone with experience would help out.
why would you even post if you never had any experience with this issue

why would you even post if you never had any experience with this issue
Um, people do that all the time? I'm offering you a possibility as to why it might not be working, as well as a general idea of how to fix it. It's like if you needed to know where to go to get your brakes fixed - would simply not trust someone or refuse their help because they haven't had a brake failure themselves? No; it's possible to have knowledge of something without experience; experience just solidifies the knowledge and adds on to it.

working with .dsq's is pretty much only possible with hands on experience. explosive broken breaks which have different sized parts


It's like if you needed to know where to go to get your brakes fixed - would simply not trust someone or refuse their help because they haven't had a brake failure themselves?
like explosive brakes which are designed differently depending on person and if you do something wrong they break everything else. I already had to redo my model several times. thank the torque engine

for turret animation, add a keyframe every frame. make each keyframe a 9 degree rotation from the previous. you should have about 20-21 keyframes when you are done.

if I do a a 30 to -15 degree rotation, wouldn't that be only 5 frames? what about the other 15 frames

your turret looks from straight up to straight down. from 90 to -90. that's 21 frames. start at 90 straight up, then for the next frame make it 9 degrees down. keep doing that until it's -90 degrees, which should be frame 21.