Notifications
Clear all
[Closed] Rotate camera with spinner error
Jan 14, 2011 6:06 pm
Hi all! I am trying to create a spinner that will rotate the scene camera.
I have this for my code:
spinner xRot "X Rotation:" range:[-360,360,0] fieldwidth:40 align:#left type:#float enabled:true
--and then
on xRot changed val do
(
rotate $ (angleaxis xRot [1,0,0])
)
I am getting this error when I try to adjust the spinner.
Unable to convert: SpinnerControl:xRot to type: Float
I thought I did that when I created the spinner?
Thank you for any light you can shed on this.
2 Replies
Jan 14, 2011 6:06 pm
You need to use the .value of xRot. xRot is a spinner control not a float value, xRot.value is the actual float value. From the Maxscript Help:
<spinner>.value Float [left]The current value of the spinner.
-Eric
[/left]