Started working on some stock tiles that I will use over & over. I am using friction=1 on regular ground. I tried using friction=0 on an ice block. It seems like this reacts as expected for when my character is running in other words running seems to be slower somewhat slippy but what I want to see is a skidding effect. When I run on regular surface and let go of my run button I stop. On ice I would like to see the stopping to occur later with slippage. Not sure what friction value I should use or whether there is anyway to define this behavior in the current iteration of physics engine.
Are you using the code from the latest tutorial? If so there is some stopping code in there where the linearVelocity is reduced to 0 when you return to Idle. For ice you would either want to remove this completely or maybe reduce by a lesser amount which could be controlled via a property on your tile. It could even be the friction amount so velocity is reduced slower the lower the friction, if that makes sense. [import]uid: 5833 topic_id: 4843 reply_id: 15550[/import]
Yup. That makes perfect sense. Thanks. So lets see how we can move this from main.lua into Tiled properties. [import]uid: 11904 topic_id: 4843 reply_id: 15552[/import]