View Full Version : Auto Rotate Loop
Could anyone point me in the direction of how to create an auto rotate looping compund in ice. I would like to create a compund that I can plug any geometry into and rotate this in any direction and to loop continuously and seamlessly. What nodes should I be looking into for this sort of thing.
Any ideas appreciated .
Cheers
G
scaron
08-20-2008, 04:14 PM
rotate vector is really all you need to get rotating motion... run this in a blank scene and press play
CreatePrim("Cube", "MeshSurface", null, null);
CreateSimulatedICETree("cube", siNode, null);
AddICECompoundNode("Get Point Position", "cube.polymsh.ICETree");
AddICECompoundNode("Set Point Position", "cube.polymsh.ICETree");
AddICENode("ICENodes\\RotateVectorNode.Preset", "cube.polymsh.ICETree");
AddICENode("ICENodes\\AxisAndAngleToRotationNode.Preset", "cube.polymsh.ICETree");
ConnectICENodes("cube.polymsh.ICETree.RotateVectorNode.vector","cube.polymsh.ICETree.Get_Point_Position.Value");
ConnectICENodes("cube.polymsh.ICETree.Set_Point_Position.Position","cube.polymsh.ICETree.RotateVectorNode.result");
ConnectICENodes("cube.polymsh.ICETree.RotateVectorNode.rotation","cube.polymsh.ICETree.AxisAndAngleToRotationNode.ro tation");
SetValue("cube.polymsh.ICETree.AxisAndAngleToRotationNode.an gle", 10, null);
ConnectICENodes("cube.polymsh.ICETree.port1","cube.polymsh.ICETree.Set_Point_Position.Execute");
Thank you , I built if from looking at the code instead of just pasting it. In an attempt too better userstand what is going on. This is very interesting thank you very much for your help!
Cheers
G
scaron
08-20-2008, 05:34 PM
ok whatever gets you going... running that code would have let you see the graph and would have been self explanatory, but whatever floats your boat.
that comes in handy, how about an offset?
edit: nevermind..i just plugged an add node inbetween the rotate vector an d set data node..
How about speed of rotation?
scaron
08-21-2008, 02:57 PM
well your angle is going to be evaluated per frame, smaller values equal slower, higher values equal faster. just change the angle parameter in the axis angle to rotation node.
Thank you again..
Works very nicely!
This is amazing , really basic for you I'm sure but really nice for me.
G
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.