stuck on 'impulse' attributes

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 02 February 2009   #1
stuck on 'impulse' attributes

Hey, I'm working on some crowd stuff at the moment, unfortunatly I have run into an error and have been looking at this code for far too long as my head appears to have gone to mush...


rigidSolver -create -current -solverMethod 0 -collisionTolerance .1 -name crowdSimSolver;
setAttr crowdSimSolver.allowDisconnection 1;
setAttr crowdSimSolver.displayVelocity 1;

spaceLocator;

$agentAmount = 10;

// Make Agents
for ($i = 0; $i < $agentAmount; $i++) {
	string $plusMinusNode = `createNode plusMinusAverage -n ("PMAnode_" + $i)`;
	
	polyCylinder -name ("agentBase_" + $i) -radius 0.2 -subdivisionsX 14 -height .01;// Make cylinder

	radial -position 0 0 0 -name ("agentRadial_" + $i) -magnitude 20 -attenuation 0.3 -maxDistance 4.0;
	parent ("agentRadial_" + $i) ("agentBase_" + $i);
	hide ("agentRadial_" + $i);

	rigidBody -name ("RBagent_" + $i) -active -mass 1 -bounciness 0 
	-damping 10 -position 10 0 10 -impulse 0 0 0 -standInObject cube -solver crowdSimSolver ("agentBase_" + $i);

	connectAttr -f ("agentBase_" + $i  + ".translate")("PMAnode_" + $i + ".input3D[0]");	
	connectAttr -f locator1.translate ("PMAnode_" + $i + ".input3D[1]");

string $exp = "float $cylPos" + $i + "[];\n";
	$exp += "$cylPos" + $i + " = `getAttr PMAnode_" + $i + ".input3D[0]`;\n";

	$exp += "float $locPos" + "[];\n";
	$exp += "$locPos" + " = `getAttr PMAnode_" + $i + ".input3D[1]`;\n";

	$exp += "setAttr ";
	$exp += "(RBagent_" + $i + ".impulse)";
	$exp += "($locPos[0] - $cylPos" + $i + "[0])";
	$exp += "($locPos[1] - $cylPos" + $i + "[1])";
	$exp += "($locPos[2] - $cylPos" + $i + "[2])";
		
	expression -s $exp -name ("walk_exp" + $i) -alwaysEvaluate true -unitConversion all;
}
cycleCheck -e off


I'm getting this error...

// Error: Attributes must be of float, integer, or boolean types: impulse //

But am unsure why/how it's erroring as it looks ok to me, anyhelp would be much appreciated.

Chris
 
Old 02 February 2009   #2
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 09:17 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.