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 / Physics touch point and moving

Author
Message
Fawaka
14
Years of Service
User Offline
Joined: 1st Dec 2009
Location:
Posted: 26th Jul 2015 22:55
Hello my friends,

I am new and finally got my copy of App Game Kit V2 a few weeks ago.
( yes thank you for your warm welcome )

Okay one question i have about Physics (i am working out my idea for a game).

My question:
I have a balloon and need to know how to detect the touches on three point on the balloon. See the following picture.

How do i set the touch on three independent points on a balloon.
The touchable points are as shown in the picture: A, B and C with the arrows pointing towards the direction on touching the appropriate points.

How do i set the physics code in AppGameKit 2? please help

Attachments

Login to view attachments
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 27th Jul 2015 09:28 Edited at: 27th Jul 2015 09:31
about touch this will help:
GetWorldXFromSprite( iSpriteIndex, x, y )
GetSpriteInCircle ( iSprite, x1, y1, radius )

see forces
SetSpritePhysicsForce
http://www.appgamekit.com/documentation/Reference/Sprite.htm
http://www.appgamekit.com/documentation/Reference/2DPhysics.htm

SetPhysicsDebugOn()
SetPhysicsDebugOff()

AGK 108 (B)19 + AppGameKit (Steam) V2 Beta .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Fawaka
14
Years of Service
User Offline
Joined: 1st Dec 2009
Location:
Posted: 27th Jul 2015 15:17
Hello Markus,

Thank you for your reply.

Can you or someone else can give me an example on how to do the touch on the three points (A, B, AND C)?
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 27th Jul 2015 17:24
therefore you have
GetPointerState()=1 for hold
GetPointerX
GetPointerY
it works with a mouse and touch.


http://www.appgamekit.com/documentation/Reference/Input.htm

http://www.appgamekit.com/documentation/Reference/Input-Raw.htm

AGK 108 (B)19 + AppGameKit (Steam) V2 Beta .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
lilpissywilly
AGK Developer
14
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 28th Jul 2015 15:15
I would use invisible sprites to detect where the touch is in this case

My hovercraft is full of eels

Login to post a reply

Server time is: 2024-11-25 19:25:53
Your offset time is: 2024-11-25 19:25:53