How do I change default rotation of object?

Just started using Construct 2? Post your questions here

Post » Tue Feb 14, 2017 7:41 pm

When you place object in layout and when you select that object you have origin square and other square that you use to rotate object. I want to change that other square default position.

I am playing with top down shooter. I uploaded image for enemy and when I say that enemy turns to player the picture is off for like 90 degrees because construct 2 rotates towards those 2 squares and second square is not towards the gun of the enemy solider.

Thanks.
B
4
Posts: 1
Reputation: 202

Post » Tue Feb 14, 2017 7:56 pm

So you are saying the image is not at the same angle as the object? You probably need to rotate the image itself inside the image editor. Double click on the object and hit one of the rotate 90 degree options, maybe that fixes it?
B
47
S
17
G
81
Posts: 2,223
Reputation: 48,093

Post » Sat Mar 18, 2017 4:26 am

ArtemisEntr3ri wrote:When you place object in layout and when you select that object you have origin square and other square that you use to rotate object. I want to change that other square default position.

I am playing with top down shooter. I uploaded image for enemy and when I say that enemy turns to player the picture is off for like 90 degrees because construct 2 rotates towards those 2 squares and second square is not towards the gun of the enemy solider.

Thanks.


https://www.dropbox.com/s/lbkclbfewhkzg2w/set%20angle.capx?dl=0
B
40
S
22
G
81
Posts: 297
Reputation: 44,735

Post » Sun Mar 19, 2017 8:56 am

All sprites when put on the layout rotate automatically to 0 degrees unless you change that in the sprite settings.

0 degrees is facing right, down is 90, left is 180 and up is 270 with all degrees between 0 and 360 covered.

First you need to rotate the sprite in the editor so it is facing the direction you want it to start at and set that in the sprite settings.

Then in the events you can rotate the sprite Using Rotate Towards position and set that to the X and Y of the position or object you want it to rotate towards.
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,825


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests