Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

graphics.newOutline crashing Corona Simulator
Started by mpkostek Feb 04 2016 10:28 AM

- - - - -
1 reply to this topic

Best Answer mpkostek , 04 February 2016 - 10:34 AM

Feeding in the ship image into the physics.addBody() call instead of the ship object fixed this for me.

[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

mpkostek

[GLOBAL: userInfoPane.html]
mpkostek
  • Enthusiast

  • 89 posts
  • Corona SDK

local shipOutline = graphics.newOutline( 2, sheet, sheetInfo:getFrameIndex(shipName))

local shipCollisionFilter = { categoryBits = bitTable.ship, maskBits = bitTable.enemyLaser }
local shipBodyElement = { filter = shipCollisionFilter}
physics.addBody( ship, {outline = shipOutline})

I am trying to use this code to add a physics outline to my ship. It crashes my Corona Simulator (closing it with no error message). What am I doing wrong?



[TOPIC: post.html]
#2

mpkostek

[GLOBAL: userInfoPane.html]
mpkostek
  • Enthusiast

  • 89 posts
  • Corona SDK

  Best Answer

Feeding in the ship image into the physics.addBody() call instead of the ship object fixed this for me.




[topic_controls]
[/topic_controls]