How do you set bullet angle of motion to imagepoint

Get help using Construct 2

Post » Tue Aug 04, 2015 11:04 am

I have seen in the suggestions for angle of motion that you can set a bullets angle of motion to a image point but i run into problems whit expressions. What expression should i use in order for it to work?
B
12
S
2
Posts: 267
Reputation: 1,344

Post » Tue Aug 04, 2015 11:16 am

I'm not sure what you mean..
An image point doesn't have an angle it's just a point..

If you mean setting the origin of a sprite to another position so it rotates around that point, it's as simple as changing the position of the origin in the image editor..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Aug 07, 2015 2:27 pm

LittleStain wrote:I'm not sure what you mean..
An image point doesn't have an angle it's just a point..

If you mean setting the origin of a sprite to another position so it rotates around that point, it's as simple as changing the position of the origin in the image editor..


http://postimg.org/image/6i2qcabal/

This is what i mean. Understand any better?
B
12
S
2
Posts: 267
Reputation: 1,344

Post » Fri Aug 07, 2015 2:35 pm

Sorry, I still don't understand what you are trying to do..

an angle is meassured in degrees (between 0 and 360) and you want to use the x-coordinate of an imagepoint for that?

Could it be you are trying to set an angle towards an imagepoint or from an imagepoint to somewhere else?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Aug 07, 2015 2:43 pm

If I understand correctly...

System expressions wrote:angle(x1, y1, x2, y2) Calculate angle between two points
System expressions


Image
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 31 guests