I get an Assertion fail from the runtime library and it popup a lot of them when i start to drag my objekt in the Corona simulator the error says:
Program:…
File:…\external\Box2D_v2.1.2\B…\b2bstac…tor.cpp
Line:38
Expression: m_entryCount < b2_maxStackEntries
My ula looks like this(I’m just testin around a little ):
require “sprite”
local physics = require(“physics”)
–local ui = require(“ui”)
local gameUI = require(“gameUI”)
physics.start()
–physics.setDrawMode( “hybrid” )
local dragBody = gameUI.dragBody – for use in touch event listener below
display.setStatusBar( display.HiddenStatusBar )
local Bg = display.newImage( “road.png” )
Bg.x = display.contentWidth / 2
Bg.y = 195
local leftside = display.newImage( “side.png” )
leftside.x = display.contentWidth -32
leftside.y = 195
leftside.myName = “leftside”
physics.addBody( leftside, “static”, { friction=0.5, bounce=0.3 } )
local rightside = display.newImage( “side.png” )
rightside.x = 32
rightside.y = 195
rightside.myName = “rightside”
physics.addBody( rightside, “static”, { friction=0.5, bounce=0.3 } )
local sheet1 = sprite.newSpriteSheet( “bilenrakt.png”, 128, 64 )
local spriteSet1 = sprite.newSpriteSet(sheet1, 1, 3)
sprite.add( spriteSet1, “Car”, 1, 3, 100, 0 ) – play 8 frames every 1000 ms
local instance1 = sprite.newSprite( spriteSet1 )
physics.addBody( instance1,“kinematic”,{ friction=0.5, bounce=0.3 } )
instance1:addEventListener( “touch”, dragBody )
instance1.x = display.contentWidth / 2
instance1.y = 280
instance1:rotate(90)
instance1:prepare(“Car”)
instance1:play()
it was when i changed this line:" physics.addBody( instance1,“kinematic”,{ friction=0.5, bounce=0.3 } )
"
i changed the body type to Kinematic soo that it would not recognize the gravity…
any suggestions ?
I am sorry for my poor english
[import]uid: 35736 topic_id: 6577 reply_id: 306577[/import]