Votes
0
Product:
iClone 7
Version:
7.4
Status:
Assigned
Issue 5573
SetData("Position/PositionX"...) set avatar in wrong position
When using SetData("Position/PositionX"...) on props there is no issue. It works fine.

But when try use it on an avatar will set it to the wrong position.
pos_x=-1084
avatar.GetControl("Transform").GetDataBlock().SetData("Position/PositionX", RLPy.RTime(time_value), RLPy.RVariant(pos_x))

Will set it on x=-715
OS: Windows 10
  •  2
  •  897
Submitted byThe-any-Key
1
COMMENTS (2)
Data Juggler
I just tested this, and this works for me as expected.

    #-- Get Characters from current scene --#
    avatar_list = RLPy.RScene.GetAvatars()
    #-- Get Character,  Change index for now --#
    avatar = avatar_list[0]

    # get the time at the start
    time = RLPy.RTime(0)  

    posX = 170

    # moving avatar
    text_edit.insertPlainText("Moving Avatar To Position: " + str(posX)  + "\r\n")

    control = avatar.GetControl("Transform")

    control.GetDataBlock().SetData("Position/PositionX", time, RLPy.RVariant(posX))    

    # get the rotation value for this prop  
    transform = RLPy.RTransform()
    control.GetValue(time, transform)
    newPosX = transform.T().x # Get Prop x position

    # show the new position
    text_edit.insertPlainText("New Position: " + str(newPosX)  + "\r\n")


I set it to 170, and it ends up on 170. Maybe this has been fixed since January 2019.
The-any-Key
Setting rotation works however
1