sensors bodies in Limed maps

I’ve attempted to create static body types that are sensors such that there is no collision between objects yet the collision is reported.

The reason for this is that I’m trying to create rope/ladder type objects in a platformer where the player can climb up if he collides with that object and a certain state is present. (e.g. up button is pressed at the same as the player jumps across the rope/ladder)

I’ve made static physics objects that follow the physical layout of the rope/ladder and assigned them isSensor = true and bodyType = static
The player and the rope/ladder still collide. As usual the answer is most likely something obvious I’m overlooking.

[import]uid: 9035 topic_id: 8998 reply_id: 308998[/import]

This is a bug, oops. isSensor works for Tiles but not Objects, I didn’t realise this but have just fixed it.

If you load up “lime-object.lua” you will find this “self.isSensor = stringToBool(self.isSensor)” and line 597, remove this line completely.

And then in “lime-utils.lua” replace the “applyPhysicalParamatersToBody” function with this:

  
--- Applies physical properties to a body.  
-- @param body The body to apply the properties to.  
-- @param params The physical properties.  
function applyPhysicalParametersToBody(body, params)  
  
 local \_body = body  
 local \_params = params  
  
 if(\_body) then  
  
 \_body.isAwake = convertStringToBoolSafely(\_params.isAwake)  
 \_body.isBodyActive = convertStringToBoolSafely(\_params.isBodyActive) or true  
 \_body.isBullet = convertStringToBoolSafely(\_params.isBullet)  
 \_body.isSleepingAllowed = convertStringToBoolSafely(\_params.isSleepingAllowed)  
 \_body.isFixedRotation = convertStringToBoolSafely(\_params.isFixedRotation)  
 \_body.angularVelocity = \_params.angularVelocity  
 \_body.linearDamping = \_params.linearDamping  
 \_body.angularDamping = \_params.angularDamping  
 \_body.bodyType = \_params.bodyType  
 \_body.isSensor = convertStringToBoolSafely(\_params.isSensor)  
  
 end  
end  
  

[import]uid: 5833 topic_id: 8998 reply_id: 32850[/import]

Yay for me not being crazy. Thanks for the quick response. I’ve tested it and appears to work as advertised. [import]uid: 9035 topic_id: 8998 reply_id: 32866[/import]

Awesome, glad it’s working! Hope it stays that way :slight_smile: [import]uid: 5833 topic_id: 8998 reply_id: 32873[/import]

Btw I noticed the tweet regarding lime 3.2 but never got the e-mail.
[import]uid: 9035 topic_id: 8998 reply_id: 32881[/import]

Aha, I had an email bounce back permanently, that was probably your address. I would say could you send me an updated email address however I am now moving over to MailChimp anyway and have just this second posted about the signup form - http://developer.anscamobile.com/forum/2011/04/17/lime-newsletter [import]uid: 5833 topic_id: 8998 reply_id: 32883[/import]