Tutorial: Making a 3D simulation as a Rubik's Cube (FireMonkey XE6 on Win, iOS, Android)
DISCLAIMER: This video is boring to the average YouTube viewer. The concept is that we have a place in which the dice are. Only if we want to rotate, we copy the originals and put them into the site HelpRotation. Are we done with the rotation, then we compare the originals with the copied cube positions. Here we have to convert these yet before and adapt. We have two of the same positions of the cube, we ask for the panels. As a template, we remove the originals of the panels. Then we get the panels from the copied cube, this count finished, compare the marker and set the color. #QuarkCube Hello Valentin Marcenco thanks for pointing out the problem with XE8 is as follows: RotationAngle works differently. Therefore, please build a help a See the code: public { Public-Deklarationen } AndroidButtonView:Boolean; AndroidButtonCube:Boolean; CheckMe:TPoint3D; // new!!! procedure InitTexture(const Mat:TLightMaterialSource; const aStr:String); procedure ResetCube; and expand the Viewport3D1MouseMove as follows: procedure TForm1.Button1Click(Sender: TObject); begin FAnzahlDrehungen:=0; // New!!! Reste = 0 ResetCube; end; procedure TForm1.Viewport3D1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Single); Var P:TPoint3D; begin if ssLeft in Shift then begin P:=Point3D(Y, -X,0); // Werte holen if Not AndroidButtonView then begin CheckMe:=Dummy2.RotationAngle.Point + P; // Merken // Dummy2.RotationCenter.Point:=Dummy2.RotationAngle.Point + P; // Merken AndroidButtonView:=True; end; // Dummy2.RotationAngle.Point:=Dummy2.RotationCenter.Point - P; // Anpassen Dummy2.RotationAngle.Point:=CheckMe - P; // Anpassen end; end; https://twitter.com/hashtag/WhyIChooseDelphi?src=hash
Download
0 formatsNo download links available.