简体   繁体   中英

Corona sdk physics object anchor points

Can you tell me how to do this, and if not help me solve this problem? Is it possible to set the new anchor points outside out of the object? I am trying to get an object to rotate around another object. They are physics objects, so I cannot do a transparency trick. Any ideas? Thanks!

You could put the two objects in a display group and set the group's anchor point to be at the center of your main object. The code at http://coronalabs.com/blog/2013/10/15/tutorial-anchor-points-in-graphics-2-0/ should be sufficient. See if that will do the trick for you. Note though that you will have to apply a negative rotation to the main object because you don't want it turning too. If several objects are "in orbit" around main object at different speeds then this trick won't work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM