Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Physics error?
Started by andreib21 Oct 19 2010 06:33 AM

12 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

andreib21

[GLOBAL: userInfoPane.html]
andreib21
  • Observer

  • 25 posts
  • Corona SDK

Hi,

I'm currently working on my first project and when I try to load the physics engine everything stops working, why is that?

display.setStatusBar( display.HiddenStatusBar )

local physics = require "physics"
physics.start()
physics.setGravity( 0, 10 )

local background = display.newImage("city-bg.png")

local car = display.newImage("car.png")
car.x = 60
car.y = 160

local ambulance = display.newImage("ambulance.png")
ambulance.y = display.contentHeight/2
ambulance.x = 240

Also, could you please tell me how can I start the terminal to see the errors?

Thank you
uid: 8241 topic_id: 2836 reply_id: 302836


[TOPIC: post.html]
#2

MikeHart

[GLOBAL: userInfoPane.html]
MikeHart
  • Corona Geek

  • 1,278 posts
  • Corona SDK

In your Corona folder, there is an entry called terminal. Start that, it will start the simulator on its own.
uid: 5712 topic_id: 2836 reply_id: 8420


[TOPIC: post.html]
#3

MikeHart

[GLOBAL: userInfoPane.html]
MikeHart
  • Corona Geek

  • 1,278 posts
  • Corona SDK

Btw. that code you posted looks fine.
uid: 5712 topic_id: 2836 reply_id: 8421


[TOPIC: post.html]
#4

MikeHart

[GLOBAL: userInfoPane.html]
MikeHart
  • Corona Geek

  • 1,278 posts
  • Corona SDK

Are you using the Game Edition or the regular SDK?
uid: 5712 topic_id: 2836 reply_id: 8422


[TOPIC: post.html]
#5

andreib21

[GLOBAL: userInfoPane.html]
andreib21
  • Observer

  • 25 posts
  • Corona SDK

Ahh, I have the free trial.. which one is which? :)
uid: 8241 topic_id: 2836 reply_id: 8425


[TOPIC: post.html]
#6

MikeHart

[GLOBAL: userInfoPane.html]
MikeHart
  • Corona Geek

  • 1,278 posts
  • Corona SDK

The Game edition has the pool ball No.11 on the icon.
uid: 5712 topic_id: 2836 reply_id: 8426


[TOPIC: post.html]
#7

DeMentid Apps

[GLOBAL: userInfoPane.html]
DeMentid Apps
  • Observer

  • 6 posts
  • Guests

being new here what are the differences other than trial and paid
uid: 10258 topic_id: 2836 reply_id: 8428


[TOPIC: post.html]
#8

MikeHart

[GLOBAL: userInfoPane.html]
MikeHart
  • Corona Geek

  • 1,278 posts
  • Corona SDK

The game edition has the features of the Corona SDK, plus support for physics (Box2D), Spritesheets and OpenFeint.
uid: 5712 topic_id: 2836 reply_id: 8429


[TOPIC: post.html]
#9

andreib21

[GLOBAL: userInfoPane.html]
andreib21
  • Observer

  • 25 posts
  • Corona SDK

I have an Orange on the icon and blue background...
uid: 8241 topic_id: 2836 reply_id: 8430


[TOPIC: post.html]
#10

MikeHart

[GLOBAL: userInfoPane.html]
MikeHart
  • Corona Geek

  • 1,278 posts
  • Corona SDK

Get it here:

https://developer.anscamobile.com/downloads/game-edition
uid: 5712 topic_id: 2836 reply_id: 8431


[TOPIC: post.html]
#11

andreib21

[GLOBAL: userInfoPane.html]
andreib21
  • Observer

  • 25 posts
  • Corona SDK

Thank you very much! :)
uid: 8241 topic_id: 2836 reply_id: 8433


[TOPIC: post.html]
#12

BarkBarkCo

[GLOBAL: userInfoPane.html]
BarkBarkCo
  • Enthusiast

  • 31 posts
  • Guests

andreib21 said:
:: I have an Orange on the icon and blue background... ::

LOL. Good one! I'm gonna go pour myself a glass of Corona juice now...
uid: 10248 topic_id: 2836 reply_id: 8776


[TOPIC: post.html]
#13

iphone_2010

[GLOBAL: userInfoPane.html]
iphone_2010
  • Enthusiast

  • 92 posts
  • Guests

You need to to add your objects (movable ones) to the a physics body .. (i.e. physics.addBody(myObject, {bounce=0.3, friction=5.0, density=4.0})
in addition, for those you don't want them to be moved, just use the above sentence with physics.addBody(myStaticObject, "static")
uid: 11038 topic_id: 2836 reply_id: 10927



[topic_controls]
[/topic_controls]