Tutorials

Logic-Macaron AR Animation



▲ Animation:rotation、scale、moving and jumping、collides、visibility
▲ Object:coin、mashroom、Macaron(walking)、street(you can all download on MAKAR resources)


 
  1. Drag the road and Macaron into the editor, and rotate Macaron.

 

 
  1. Drag mushroom and coin into the editor and position them at appropriate distances.

 

 
  1. Set Macaron, coin, and mushroom as logical object.

 

 
  1. Open the logic editor and start editing.



 
Macaron Moving and Jumping
 
  1. In the scene, one small square represents 10 centimeters and one big square represents 1 meter. Set the walking distance of Macaron based on this standard.

 

 
  1. From "Transform" > "Transitions", drag out "move...object...meters...in...seconds", and all subsequent actions will be executed based on this block.



 
STEP(1)Walk a certain distance

Set block to "move Macaron (walking) 1 meter backward in 1 second". Although the coin is located 1.3 meters from the starting point, adjusting the distance to 1 meter and having Macaron jump forward can make it look more natural due to its larger size. You can adjust the distance according to the actual situation as needed.



 
※ The object movement direction is set to "backwards", but the object appears to be moving towards the right. This is because the object's properties is not X=0, Y=0, Z=0 after rotating. Therefore, adjustments must be made based on the actual situation.



STEP(2)Jumping
Set the block to "move Macaron(walking) 0.4 meters up in 0.08 seconds" and duplicate it to set it to move downwards. You can adjust the distance and speed as needed.
 

 


STEP(3)Continue walking a certain distance
Set the block to "move Macaron(walking) 1 meter backwards in 1 second" to allow Macaron to continue moving forward naturally after eating the coin.
 


 ※ The blocks will execute the animations in the order they are arranged.

 



After eating the mushroom, Macaron grows in size and the mushroom disappears.
 
  1. From "Transform" > "Scale", pull out "Set scale of...to..." and set Macaron scale to 0.18.

 

 
  1. From "Actions" > "Material", pull out "Set visibility of...to..." and set  mushroom's visibility to false.



 
  1. From "Events" > "Collisions", drag out "When...collides with..., enter..." and place the previous two blocks inside it, and set the collision between Macaron and mushroom.





 
The coin rotates on its own
 
  1. From "Transform" > "Rotation", drag out "turn...object...clockwise by degree...in...sec", and set "turn coin clockwise by degree360 in 1 sec".

 

 
  1. From "Control" > "Loops," drag out "forever do..." and place the previous block inside.

 

 
  1. The coin will keep rotating automatically.




After eating the coin, it disappears.
 
  1. From "Actions" > "Materials", drag out "Set visibility of...to..." and set the visibility of the coin to false.

 

 
  1. From "Events" > "Collisions", drag out "When... collides with..., enter..." and place the previous block inside it. Set it to detect collisions between the dragon and the coin.





 
How to experience?
Pick up your phone, enter ID, and scan the recognition image to start the experience!
 
1. Install MAKAR APP
2. Scan QR code search ID:XRlover





3. Click on "Macaron AR Animation" project in the AR space recognition and click on "Start Experience".