Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Question in regards to Second Balloon Video
Started by 3CordGuy Oct 26 2010 12:07 PM

8 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

3CordGuy

[GLOBAL: userInfoPane.html]
3CordGuy
  • Contributor

  • 128 posts
  • Corona SDK

I was curious. In the second balloon video posted a day ago on the blog, he introduces event touches to make the balloons move up in relation to where you click. I was wondering how you could apply the impulse based off of the location of the click of the balloon. For instance if you clicked from the top of the balloon then the impulse would send it down etc.

In the example given, the x impulse is 0 and the y is -.2
So how would you make those values relative to the actor?

Also, something a bit more complex, how would you create a screen wrap from one side to the next if you didn't want walls?

Thanks!!

PS. I've been looking through the resources, but am having trouble finding good examples of the questions I'm looking for. I'm having jumping in though! Thanks Ansca team.

uid: 10361 topic_id: 3122 reply_id: 303122


[TOPIC: post.html]
#2

3CordGuy

[GLOBAL: userInfoPane.html]
3CordGuy
  • Contributor

  • 128 posts
  • Corona SDK

Nobody? Really? Not even one of my two questions? Is it that noobish or just too complex to address here?
uid: 10361 topic_id: 3122 reply_id: 9222


[TOPIC: post.html]
#3

jstrahan

[GLOBAL: userInfoPane.html]
jstrahan
  • Corona Geek

  • 1,926 posts
  • Corona SDK

Touch.x-balloon.x
Touch.y-balloon.y
If you get a negative number apply impulse to right or down
If you get a positive number apply impulse to left or up
uid: 7911 topic_id: 3122 reply_id: 9223


[TOPIC: post.html]
#4

3CordGuy

[GLOBAL: userInfoPane.html]
3CordGuy
  • Contributor

  • 128 posts
  • Corona SDK

Not sure I understand what you're saying... Could you explain a bit? I'm not sure how to implement that code. Sorry.

Any chance of a staff doing a Tutorial on how to get the screen to wrap?
uid: 10361 topic_id: 3122 reply_id: 9257


[TOPIC: post.html]
#5

carlos m. icaza

[GLOBAL: userInfoPane.html]
carlos m. icaza
  • Corona Geek

  • 2,992 posts
  • Alumni

@3CordDesign : what do you mean screen to wrap?
uid: 24 topic_id: 3122 reply_id: 9310


[TOPIC: post.html]
#6

3CordGuy

[GLOBAL: userInfoPane.html]
3CordGuy
  • Contributor

  • 128 posts
  • Corona SDK

By wrapping i mean If I didn't want walls but when the balloons went off the left side of the screen They would just appear on the right side smoothly as they went off the left. Would that simply have to be coded into each balloon individually?

Also any tips on that first question?

Thanks for checking in Carlos!
uid: 10361 topic_id: 3122 reply_id: 9331


[TOPIC: post.html]
#7

3CordGuy

[GLOBAL: userInfoPane.html]
3CordGuy
  • Contributor

  • 128 posts
  • Corona SDK

*cough*

Sorry.. I'm getting over a cold ;)
uid: 10361 topic_id: 3122 reply_id: 10334


[TOPIC: post.html]
#8

delta

[GLOBAL: userInfoPane.html]
delta
  • Observer

  • 15 posts
  • Guests

Screen wrapping is something I'd like to look into, a la Asteroids. I'm guessing each object that requires wrapping will needing individual coding/coord detection.
uid: 7396 topic_id: 3122 reply_id: 10339


[TOPIC: post.html]
#9

3CordGuy

[GLOBAL: userInfoPane.html]
3CordGuy
  • Contributor

  • 128 posts
  • Corona SDK

Yeah! It was a simple global setting where i'm coming from. But I expect it's not that easy.
uid: 10361 topic_id: 3122 reply_id: 10386



[topic_controls]
[/topic_controls]