Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: Entity rotation around specific point  (Read 2388 times)

0 Members and 1 Guest are viewing this topic.

Sviborg

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 2
    • View Profile
Entity rotation around specific point
« on: May 10, 2008, 12:13:13 PM »

Hello everyone.

It seems that changing MyEntity.RelativeRotate property rotates object only around its corner (0, 0). I want to rotate Entity object around its center (or another custom point). How can it be done?

I see only one way - changing MyEntity.RelativeRotate and then moving entity (changing MyEntity.X, MyEntity.Y) so it is placed in the right place. But it is a bit complicated. Are there any easier ways to do it?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Entity rotation around specific point
« Reply #1 on: May 10, 2008, 12:29:54 PM »

They are rotated around the entity position. Move the sprite's hotspot to the point you want to use as a base for rotation.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Sviborg

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 2
    • View Profile
Re: Entity rotation around specific point
« Reply #2 on: May 10, 2008, 01:07:30 PM »

Thanks.
Logged
 

Page created in 0.015 seconds with 19 queries.