Please login or register.

Login with username, password and session length
Advanced search  


For WME related articles and tutorials visit WME Resource Center.

Author Topic: Dynamically Create Region  (Read 1197 times)

0 Members and 1 Guest are viewing this topic.


  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 11
    • View Profile
    • serdar
Dynamically Create Region
« on: September 01, 2010, 02:32:31 PM »


I have asked a question before about this topic on forum.

but i have a different problem now. I created the regions dynamically but some places in my region are not catching mouse...

Am I setting wrong points...

You can download sample project here


  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5677
    • View Profile
    • Dead:Code Site
Re: Dynamically Create Region
« Reply #1 on: September 01, 2010, 02:49:26 PM »

The order of the points matters. This way you created kind of twisted regions, not rectangles (try painting the points on paper and connect them with lines).

This should work as expected (notice the points are added in clockwise order):

Code: WME Script
  1. zLeftRegion.AddPoint(0, 0);
  2. zLeftRegion.AddPoint(170,0);
  3. zLeftRegion.AddPoint(170, Scene.Height);
  4. zLeftRegion.AddPoint(0, Scene.Height);

Code: WME Script
  1. zRightRegion.AddPoint(1100, 0);
  2. zRightRegion.AddPoint(1280,0);
  3. zRightRegion.AddPoint(1280, Scene.Height);
  4. zRightRegion.AddPoint(1100, Scene.Height);
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Page created in 0.189 seconds with 17 queries.