Panel:MoveTo() on DModelPanel causes the model to disappear

Hi,
I am trying to call Panel:MoveTo() on a DModelPanel to move it off the screen. Unfortunately, as soon as this gets called the model displayed only shows for a split second, then immediately turns invisible as the panel moves.

I know the panel is still there because child elements (a few DLabels I added) still get moved across the screen.

Does anyone know why moving the panel causes the model to disappear?

Just to be clear, are you calling MoveTo on the DModelPanel or the parent DPanel?

I’m calling it on the DModelPanel itself. Should I try creating a parent and animating that?
Edit: Just tried that too. Did not work. Still having the same problem.

Is the model actually becoming invisible or is the camera moving somewhere else?

I believe it’s actually disappearing. The reason I say this is that I just ran a print test to see what the model and cam position are each frame, and they stayed consistent.

model pos: 
0	0	0
 cam pos: 
138.84286499023	116.50297546387	84.516624450684
model pos: 
0	0	0
 cam pos: 
138.84286499023	116.50297546387	84.516624450684
model pos: 
0	0	0
 cam pos: 
138.84286499023	116.50297546387	84.516624450684
model pos: 
0	0	0
 cam pos: 
138.84286499023	116.50297546387	84.516624450684
model pos: 
0	0	0
 cam pos: 
138.84286499023	116.50297546387	84.516624450684
model pos: 
0	0	0
 cam pos: 
138.84286499023	116.50297546387	84.516624450684

I know that what I’m trying to do is possible in gmod, the gamemode “Clockwork” does it whenever you select a character (DModelPanel comes slowly sliding into frame).

This is how it’s done in Clockwork, could give it a look and compare your code.
If you wish to show your code, then that would help in helping you.

I think my problem is that I am trying to move it off-screen and as soon as x coordinate hits a negative value it turns the DModePanel invisible. But this does not happen for any other elements such as labels on that panel.

core_inventorymodelBG:MoveTo( -scrW, 0, 1, 0 )
This causes the problem. (Moving left offscreen)

core_inventorymodelBG:MoveTo( scrW, 0, 1, 0 )
This works. (Moving right offscreen)

Hmm… I need it to move left offscreen though.

Top left of the screen is ( 0, 0 ) and bottom right is ( scrW, scrH ), so why are you doing -scrW to move it to the left? Assuming the panel is in the middle that’s going to move the element 3 times faster than when moving it to the right.
My guess is that it stops drawing because you are setting the position way beyond outside the boundaries of your screen, try doing MoveTo(0, 0, 1, 0) instead.

Clarification, I want to move it to the left offscreen. I want it to keep moving to the left until it’s not even on the screen anymore.

That’s what I said

Well to give you some more context about the setup, it’s already a panel at (0, 0), the size is (scrW, scrH).

I might have to get my hands dirty with this, can you post the code and a screenshot?