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 Studio Chat / [LOCKED] Help me to make Knife AIM game

Author
Message
TamBam
12
Years of Service
User Offline
Joined: 29th Nov 2011
Location: India
Posted: 20th Mar 2022 16:41
how to manage after knife come and hit the round circle ? circle moving 360 degree continuously , and after knife hit the circle its attached and also moving with it .

Attachments

Login to view attachments
Zappo
Valued Member
19
Years of Service
User Offline
Joined: 27th Oct 2004
Location: In the post
Posted: 21st Mar 2022 01:32
If I understand correctly, you want the knife to rotate with the circular ring? Once the knife has reached the outer edge of the circle (Y position of circle centre + radius) then you could set the knife sprite's origin to the centre of the circle. This way when you rotate the knife it would rotate around the centre of the circle.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 22nd Mar 2022 19:23
Zappo. That is a clever solution!
TamBam
12
Years of Service
User Offline
Joined: 29th Nov 2011
Location: India
Posted: 22nd Mar 2022 20:28
Can you providing me some code. I try to use joint statement but not get proper result. Plz help. Thankyou.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 22nd Mar 2022 21:06 Edited at: 22nd Mar 2022 21:11
When the knife makes contact with the circle;
1. You get the position of the circle sprite.
2. Then you use GetSpriteX/YFromWorld(using the circle position) to SetSpriteOffset() of the knife.
3. Then when you increment the rotation of the circle you also increment the rotation of the knife.
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 22nd Mar 2022 22:54
between this, the 2 posts on discord and your continuing to spam me via DM with "give me full code" when i've asked you to stop, i'm locking this.

you've been here long enough to know proper netiquette and the AUP and what happens when violations continue.

Login to post a reply

Server time is: 2024-04-19 14:51:26
Your offset time is: 2024-04-19 14:51:26