Bonjour à tous

Sur une TForm , j'ai créé une petite vue 3D dans laquelle je déplace après appuis sur un bouton une sphère. Le problème c'est que dès que j'appuie sur le bouton ma vue 3D disparait

Un peu de code
La procédure de déplacement qui déplace la sphère bras jusqu'à la position posi
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
 
procedure TForm1.GotoPosi(posi: TPosition3D; duree: Single);
var
  aniX: TFloatAnimation;
  aniY: TFloatAnimation;
  aniZ: TFloatAnimation;
begin
  begin
    aniX := TFloatAnimation.Create(bras);
    aniX.PropertyName := 'Position.X';
    aniX.StartValue := bras.Position.X;
    aniX.StopValue := posi.X;
    aniX.Loop := false;
    aniX.AutoReverse := false;
    aniX.Duration := duree;
    aniX.Parent := bras;
    aniX.Start;
    aniY := TFloatAnimation.Create(bras);
    aniY.PropertyName := 'Position.Y';
    aniY.StartValue := bras.Position.Y;
    aniY.StopValue := posi.Y;
    aniY.Loop := false;
    aniY.AutoReverse := false;
    aniY.Duration := duree;
    aniY.Parent := bras;
    aniY.Start;
    aniZ := TFloatAnimation.Create(bras);
    aniZ.PropertyName := 'Position.Z';
    aniZ.StartValue := bras.Position.Z;
    aniZ.StopValue := posi.Z;
    aniZ.Loop := false;
    aniZ.AutoReverse := false;
    aniZ.Duration := duree;
    aniZ.Parent := bras;
    aniZ.Start;
  end;
end;
et le code de mon OnClick
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
 
procedure TForm1.BtnGoToHublotClick(Sender: TObject);
 
begin
  if (bras.Position.X <> posiHublot.Position.X) or (bras.Position.Y <> posiHublot.Position.Y) or
    (bras.Position.Z <> posiHublot.Position.Z) then
    GotoPosi(posiHublot.Position, 5);
end;
Lorsque je fait exécuter le code j'ai ce message un peu curieux dans la fenêtre des messages
D3D11: Removing Device.
Processus moprg.exe (16512)
Sortie du Thread: ID du thread:13736 Processus moprg.exe (16512)

Une idée????