This morning I completed Hello World, and my first prop rotation so the old resume almost has a new entry.
Here is the script, as I am trying to rotate these drone blades to look faster by using some prime number like 137 seems to make the blade jump around better and look faster than letting IClone divide out the rotation at each frame, which did not work very well as it started very slow and sped up at the end., and then stopped spinning in mid air.
One thing I figured out through trial and error is I had to put 1.2 to get approximately 137.5 or so; and my project appears scaled at 100%, so I am not sure why this is needed.
My plan was I going to write out all the numbers in a python script using C# (which I think in). I can't get two settings to work so 3,600 frames is less likely to work.
I guess I will start with the first question, is it possible to apply to rotations in a single file like I did.
Any thoughts on why this doesn't work if it does.
I tried setting them in reverse order also, just to see if applying a later rotation overwrote an earlier rotation. Regardless of the order, it only applies the first time.
import os, RLPy, math
#-- Get Prop --#
prop = RLPy.RScene.FindObject(RLPy.EObjectType_Prop, "Drone - Blade FL")
#-- Get Transform Control and Data --#
ts_control = prop.GetControl("Transform")
ts_data_block = ts_control.GetDataBlock()
#-- Set Frame 3 to 137
ts_data_block.SetData("Rotation/RotationZ", RLPy.RTime(1), RLPy.RVariant(1.20))
#-- Set Frame 5 to 274 (No Effect)
ts_data_block.SetData("Rotation/RotationZ", RLPy.RTime(2), RLPy.RVariant(2.40))
2 Months Ago by