Sign in to follow this  

reactor physics exporting

This topic is 2488 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello all

I am trying to make rag doll physics
I did physics , but the problem is i need to export reactor joints parameters from 3ds studio max .
I found a way to do this by using max script, but i already write plug in using max sdk c++

I can not find way to export it from max sdk [img]http://public.gamedev.net/public/style_emoticons/default/angry.gif[/img]
Can you help me ?

Share this post


Link to post
Share on other sites
Not sure. Do you have the Havok SDK? And if so, does it ship with a version of reactor? There might be a C++ reactor plugin API published with the Havok SDK. If not from Havok, then you'd have to ask Autodesk if they can provide one. If nobody can provide a C++ API to access the reactor plugin properties, then you are stuck with the Max script. There is, I am sure, a 3ds max C++ API from which you can execute a max script. So, it wouldn't be pure C++ but at least you could invoke the export from C++.

Share this post


Link to post
Share on other sites
Thanks [size="2"][color="#1C2837"]Dave [/color][/size]
[color="#1C2837"][/color][size="2"][color="#1C2837"]
[/color][/size]
[size="2"][color="#1C2837"]I checked Havok SDK , but they have not mentioned any thing about reactor , they use their own tools for physics, they handle constrain as modifier not as object.[/color][/size]
[size="2"][color="#1C2837"]
[/color][/size]
[size="2"][color="#1C2837"]in max script they mentioned the hinge constrain has this id Class_ID(1967289542, 1265062123)[/color][/size]
[size="2"][color="#1C2837"]I got pointer to the object which has same id , when i print class name ( max_obj->GetClassName( className ) ) it gave me "Hinge" , so i got pointer to this constrain[/color][/size]
[size="2"][color="#1C2837"]but max_obj is Object* type , I can not find reactor object type , I don't know how to access its properties , nothing mentioned in max sdk about reactor constraints objects , I can not find any help in internet .[/color][/size]
[size="2"][color="#1C2837"]
[/color][/size]
[size="2"][color="#1C2837"]
[/color][/size]

Share this post


Link to post
Share on other sites
finally ..... I found way to get max script property from c++
I know it is not proper way , but for me this is enough

if( max_obj->ClassID() == Class_ID(1967289542, 1265062123)) //hinge
{
FPValue objectValue = FPValue( TYPE_REFTARG, max_obj );
FPValue minAngleValue = GetScriptedProperty( objectValue, _T("minLimitAngle") );
float fMinAngle = minAngleValue.f ;

FPValue maxAngleValue = GetScriptedProperty( objectValue, _T("maxLimitAngle") );
float fMaxAngle = maxAngleValue.f ;

}

you can get the function GetScriptedProperty from MaxSDK\samples\utilities\applyvc\evalcol.cpp

Share this post


Link to post
Share on other sites

This topic is 2488 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this