Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Limb rotation and scaling not working

Author
Message
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 22nd Aug 2009 03:03 Edited at: 26th Aug 2009 05:24
Hi! I have a model that's rigged in Autodesk 3ds max 2010. I know that the limbs are there because I can glue objects to different limbs. But when I go to rotate a limb (no matter what value I put in for the x, y, z axises) it doesn't change on screen so the player is standing the same as it was before I rotated the limb. But, if I draw the value of the limb angle on the screen it shows the correct angle, the model's limb just isn't rotating. So my question is, is there some special way to use this or something I have to add to my code to allow me to use the dbRotateLimb function? Thanks!

Games are like life, they should never stand still.
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 26th Aug 2009 05:22
Does anyone have a solution to this? Is this a common/known problem, or am I just doing something wrong, or do I just not understand the point of the function dbRotateLimb? Please help in anyway if you can because these limb problems I'm having are stopping me from wanting to use Dark GDK (And I don't want to have to go back to 2d games with Game Maker )

Games are like life, they should never stand still.
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 26th Aug 2009 05:40 Edited at: 26th Aug 2009 05:41
Is the limb "linked" to anything else ?

I seem to remember that linked limbs got their "actual" position/rotation from whatever they were linked to, is that right ?

If the above is true, the reason that the values change, is probably because the limb is actually recieving the commands and storing where it is meant to be, but it may not actually move there until you unlink it from whatever it is linked too at the moment.

If being linked to something has nothing to do with it lol, then maybe a temp workaround could be achieved by making a new object from the limb, removing the limb, rotating the new object and adding it back to replace the limb you removed.

Just some thoughts anyway.. Ill have a play around with those commands when I get the chance, but I use them in a similar way, I just make meshes from objects, add the limb, then rotate the limb and its always worked for me...

Here is some simple code that works for me :



I will make a little "angle-finder" object, kind of like a 3D crosshair, that you can place around you world use to make calculations on position and angle etc...

The important thing is that its making an object box, which is a GDK object and contains 1 limb by default.. Limb 0.

I then make a mesh from that object, and add 2 limbs to the object. I then rotate both of those limbs, to put them where they are meant to be. I then delete the mesh that I no longer need and position the new object at 0, 0, 0 .... although this code doesnt actually take into account placing the crossover at 0, 0, 0 and fixing the object's pivot point.

EDIT : I didnt check scaling, but it wouldnt be hard to throw a dbScaleLimb command in there somewhere to see...

If it ain't broke.... DONT FIX IT !!!
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 26th Aug 2009 05:55 Edited at: 26th Aug 2009 06:08
Well I understand what you are saying, but the problem is if I were to put your idea of a work around into the main loop it would probably bring down the fps. And what I'm trying to accomplish is rotating the player's arm based on the location of the cursor (it's a 2.5d shooter), so it has to be in the main loop.

EDIT: And I found out that dbHideLimb doesn't actually hide any limbs . So now I'm thinking 3 things...
1. The limbs aren't properly exported (though I doubt because I can glue objects to the limb and I do have a correct limb count)

2. These limb commands are terribly bugged.

3. I'm not using these commands correctly, which would be annoying considering the documentation doesn't say how to properly use them.

Games are like life, they should never stand still.
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 26th Aug 2009 06:22 Edited at: 26th Aug 2009 06:24
Yeah you are right about the workaround, it would cause a slowdown, I dont think it would be much on its own, but any slowdown isnt good when you dont have to have it.

Did you try the int dbCheckLimbLink(int Obj, int Limb) command ? I think there are others aswell that may be related to linked limbs, im only asking about that as im thinking maybe your exporter does something that GDK interprets as the limbs being linked to the objects rotation or something like that so you cant rotate them manually, if there is a link, try removing it.

EDIT : Have you done a dbPerformChecklistForObjectLimbs() on the object and then cycled through them ?

Im asking that as some exporters will export a dummy object as the actual limb name and put the limb somewhere else in the object structure, I know I had this problem in XSI for a little while till i figured out what was happening..that object was boned and rigged though...

If it ain't broke.... DONT FIX IT !!!
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 26th Aug 2009 06:34
I think the dbCheckLimbLink is only for newly created limbs, but I did it regardless and it returned 0. And I did the dbPeformCheckList() and went through each and the limb that I'm trying to rotate is at the correct position and has the correct name and what not. Tomorrow I'm gonna try riggin the character in Character FX then export it from there and see what happens. But I don't think this will work because a previous model rigged with Character FX had the same problem.

Games are like life, they should never stand still.
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 26th Aug 2009 07:23
hmm, thats strange... All I can suggest is that if you have tried everything you can think of and rotation/scaling still wont work under those circumstances(and you have excluded the object as the cause by trying the same thing with primitives or or a known to be working model), whip up a little example of the problem in as simple a way as you can, and post it with as much description as possible in the Bug Reports forum, it usually doesnt take them too long to get back to you if you give them enough info to recreate the problem easily.

If it ain't broke.... DONT FIX IT !!!
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 26th Aug 2009 07:51
Ok, thanks for all your help Mista! Oh and I think a few days ago I even tried to do this with the Colz.x file supplied with Dark GDK and it didn't work (if I remember correctly). I think after a bit more testing I'll make a post in the bug reports forum tomorrow. Thanks again!

Games are like life, they should never stand still.

Login to post a reply

Server time is: 2024-10-01 12:26:43
Your offset time is: 2024-10-01 12:26:43