Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / AGK Tier 2 SetSpritePhysicsImpulse ... how not to use trigonometry

Author
Message
PrometeoPrime
9
Years of Service
User Offline
Joined: 13th Jul 2015
Location:
Posted: 15th Jul 2015 00:39
it's just going the wrong direction... i want it to go where the event happen, any suggestions ?




BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 15th Jul 2015 11:28
I think...

eventX needs to be just GetPointerX(). Likewise for eventY
currentX needs to be GetSpriteXbyOffset(). Likewise for cuurentY

AFter fixing the above you don't need fixedX, just use currentX. Likewise for fixedY

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
PrometeoPrime
9
Years of Service
User Offline
Joined: 13th Jul 2015
Location:
Posted: 15th Jul 2015 13:31
yeah but that's not the point.. that's just another way to get the center of the image the problem is it's going the opposite way it should go so if i press over the image it goes down and if i press under the image it goes up
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 15th Jul 2015 14:06
It wasn't clear what the problem was, you just said "wrong direction".

Have you tried multiplying the speed by -1?

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
PrometeoPrime
9
Years of Service
User Offline
Joined: 13th Jul 2015
Location:
Posted: 15th Jul 2015 14:13
Nope, i didn't and... now it works! ;D thanks man

Login to post a reply

Server time is: 2024-11-16 18:20:57
Your offset time is: 2024-11-16 18:20:57