First the good news, your code is working just fine, it is doing what it is supposed to do, no need to change anything in that resect.
GameSalad does not have the ability to look inside your images/artwork and know what is going on - a picture of a pig eating a cake is - to GameSalad - identical to a picture of the British flag or a spaceship . . . just a bunch of pixels, it doesn't care or know what's going on in the image . . . but importantly GameSalad doesn't know the difference between a picture you've taken of your cat and a picture you've taken of your cat with the camera turned 90° - one may look very different to you, but to GameSalad they are just two images and will be treated the same.
So, GameSalad doesn't know where you've placed the tip of your arrow and the tip is what you want to point at the white square.
The standard maths convention when it comes to angles is that 0° is pointing right (due East) - so GameSalad is taking that as the tip of your arrow and rotating that to point at the white square.
tl;dr: Open your image up with something like Photoshop and rotate it 90° clockwise - so your arrow's tip is lined up with GameSalad's 0°.
Hi Socks
Thank you for answering my question.
I know what you are trying to tell me. (I am not noob.)
But that is not the problem.
The actor keeps pointing in the same direction no matter what coordinates i type in.
I don't if you can help me more...
gyroscopeI am here.Member, Sous Chef, PROPosts: 6,598
Hi @Jeppeadam Not sure why you say it's pointing in the same direction no matter what coordinates you type in - it clearly shows the arrow actor rotating clockwise in your video...
OK, not going far enough to point to your white square....
If you just want your pointer actor to rotate but not move, then probably best to use the Rotate to Angle Behaviour. Providing you set this Relative to scene, you shouldn't have a problem...
For the record, another way would be to use an Interpolate behaviour, and select the self.Rotation for the attribute.
@Jeppeadam said:
The actor keeps pointing in the same direction no matter what coordinates i type in.
You didn't mention that ? And your video doesn't indicate that either ?
You really need to mention these kinds of things, otherwise it will be a painful and slow process getting answers.
Can you upload a video of you running the code as you have it, and then changing the coordinates to a couple of different settings - and re-running the code ?
Hi Jeppeadam Not sure why you say it's pointing in the same direction no matter what coordinates you type in - it clearly shows the arrow actor rotating clockwise in your video...
I know it is Rotating clockwise but i want it to POINT in a direction.
and @socks ok i can make a new video to describe it
First, the graphic is 90 degrees off. The image of the arrow needs to point directly to the right.
---->
Use some graphics software to rotate the image 90 degrees right. Then reimport the rotated graphic into the game.
Second, you indicate that changing the numbers isn't making a difference in where the actor points. That is likely caused accidentally unlocking the actor. When an actor is unlocked it does not matter how much you modify the behaviors in the prototype. If you have an unlocked the actor, you will need to open it and revert to prototype.
gyroscopeI am here.Member, Sous Chef, PROPosts: 6,598
Hi Jeppeadam Not sure why you say it's pointing in the same direction no matter what coordinates you type in - it clearly shows the arrow actor rotating clockwise in your video...
I know it is Rotating clockwise but i want it to POINT in a direction.
and @socks ok i can make a new video to describe it
You have an actor showing the image of an arrow. In your video, this actor is seen to rotate, so rotating the image of the arrow. When it stops rotation, the arrow does seem to be still pointing, and in a different direction from when it started.
So I don't get what you want or mean either. Hopefully when you upload another video, @Socks can help you, or perhaps @RThurman suggestion solves it for you.
Good luck.
P.S If you mean it's rotating but not far enough, try adding 90 to the number you've inputted for rotation amount.
Comments
First the good news, your code is working just fine, it is doing what it is supposed to do, no need to change anything in that resect.
GameSalad does not have the ability to look inside your images/artwork and know what is going on - a picture of a pig eating a cake is - to GameSalad - identical to a picture of the British flag or a spaceship . . . just a bunch of pixels, it doesn't care or know what's going on in the image . . . but importantly GameSalad doesn't know the difference between a picture you've taken of your cat and a picture you've taken of your cat with the camera turned 90° - one may look very different to you, but to GameSalad they are just two images and will be treated the same.
So, GameSalad doesn't know where you've placed the tip of your arrow and the tip is what you want to point at the white square.
The standard maths convention when it comes to angles is that 0° is pointing right (due East) - so GameSalad is taking that as the tip of your arrow and rotating that to point at the white square.
tl;dr: Open your image up with something like Photoshop and rotate it 90° clockwise - so your arrow's tip is lined up with GameSalad's 0°.
Hi Socks
Thank you for answering my question.
I know what you are trying to tell me. (I am not noob.)
But that is not the problem.
The actor keeps pointing in the same direction no matter what coordinates i type in.
I don't if you can help me more...
Hi @Jeppeadam Not sure why you say it's pointing in the same direction no matter what coordinates you type in - it clearly shows the arrow actor rotating clockwise in your video...
OK, not going far enough to point to your white square....
If you just want your pointer actor to rotate but not move, then probably best to use the Rotate to Angle Behaviour. Providing you set this Relative to scene, you shouldn't have a problem...
For the record, another way would be to use an Interpolate behaviour, and select the self.Rotation for the attribute.
Hope that sorts it for you.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
You didn't mention that ? And your video doesn't indicate that either ?
You really need to mention these kinds of things, otherwise it will be a painful and slow process getting answers.
Can you upload a video of you running the code as you have it, and then changing the coordinates to a couple of different settings - and re-running the code ?
@gyroscope said:
I know it is Rotating clockwise but i want it to POINT in a direction.
and @socks ok i can make a new video to describe it
You might have two separate issues to deal with.
First, the graphic is 90 degrees off. The image of the arrow needs to point directly to the right.
---->
Use some graphics software to rotate the image 90 degrees right. Then reimport the rotated graphic into the game.
Second, you indicate that changing the numbers isn't making a difference in where the actor points. That is likely caused accidentally unlocking the actor. When an actor is unlocked it does not matter how much you modify the behaviors in the prototype. If you have an unlocked the actor, you will need to open it and revert to prototype.
@gyroscope said:
You have an actor showing the image of an arrow. In your video, this actor is seen to rotate, so rotating the image of the arrow. When it stops rotation, the arrow does seem to be still pointing, and in a different direction from when it started.
So I don't get what you want or mean either. Hopefully when you upload another video, @Socks can help you, or perhaps @RThurman suggestion solves it for you.
Good luck.
P.S If you mean it's rotating but not far enough, try adding 90 to the number you've inputted for rotation amount.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps