Page 1 of 2

Rotation point

PostPosted: Fri Sep 23, 2011 11:01 pm
by dengue
How am i supposed to use the Set angle toward a point action if the rotation point is not well centered in my object? Or am I configuring it wrong? Any way to modify the rotation point?

Thank you very much!

Re: Rotation point

PostPosted: Fri Sep 23, 2011 11:21 pm
by Ashley
I'm not sure what you mean - have you tried changing the origin of a sprite by double-clicking it and using the 'image points' tool in the image editor?

Re: Rotation point

PostPosted: Fri Sep 23, 2011 11:29 pm
by dengue
Tried it and my spaceship keeps pointing at nowhere but moving on the right direction:



Any ideas?

Re: Rotation point

PostPosted: Fri Sep 23, 2011 11:35 pm
by Ashley
Posting your .capx file is always a good move so we can see what you've done.

Re: Rotation point

PostPosted: Fri Sep 23, 2011 11:41 pm
by dengue
Here you have

http://dl.dropbox.com/u/28504422/gaia.capx

Re: Rotation point

PostPosted: Fri Sep 23, 2011 11:45 pm
by Ashley
In Construct 2 0 degrees is facing right.

So open the image, hit rotate clockwise, and it works.

Re: Rotation point

PostPosted: Fri Sep 23, 2011 11:54 pm
by dengue
You are a genious, thank you ;)

Re: Rotation point

PostPosted: Sat Sep 24, 2011 12:15 am
by dengue
You are a genious, thank you ;)

Now I'd need to stop it, how could this be done?
I tried adding an Event that if the ship overlaps the cursor object, then set the speed to 0, but it does not work neither.

Re: Rotation point

PostPosted: Sat Sep 24, 2011 12:31 am
by Kyatric
It should work.

In your event sheet you have currently an event "on left button clicked".

Create another event (right click in the event sheet, not on the current existing event, add event)
+ nave is overlapping cursor
=> Set nave.bullet speed to 0

This condition should be on the same level as "on left button clicked".

Re: Rotation point

PostPosted: Sat Sep 24, 2011 12:37 am
by dengue
Mmm that was the problem, i had to create it outside the other event...
So, is there some kind of "else" so i can check whether the cursor is gone (while you answered i changed the actions so after 1 second the cursor would get out of the window view)
The idea is to check if it continues on collision so it recovers it's speed value.

(Download again Gaia.capx, I've updated it)