Hello, I’m making a game where things fall from above and we have to catch them. things falling are physics body.I want to increase the speed of them lets say whenever the score is >100.
All of the physics body are multi elements body and I have created them using PhysicsEditor by codenweb.
This is the line I use to grab the data of physics objects stored in other file:
local physicsData = (require "shapedefs").physicsData(1.0)
This is the line I use to make the slect an object and add physics body to it:
Are you using gravity, or do the objects fall at a constant speed?
If you’re using gravity, you could just gradually increase the Y value of the gravity for the entire world. Alternatively, you could increase the “.gravityScale” of each object independently as you spawn them.
If you’re not using gravity, but rather assigning a direct linear velocity, simply increase the Y velocity of the objects as you spawn them.
The only thing within PhysicsEditor which could affect speed is the “density” value, but you’re not changing that so it doesn’t really matter. Changing the speed must be done after you create the objects, based on the two options I mentioned before.
Are you using gravity, or do the objects fall at a constant speed?
If you’re using gravity, you could just gradually increase the Y value of the gravity for the entire world. Alternatively, you could increase the “.gravityScale” of each object independently as you spawn them.
If you’re not using gravity, but rather assigning a direct linear velocity, simply increase the Y velocity of the objects as you spawn them.
The only thing within PhysicsEditor which could affect speed is the “density” value, but you’re not changing that so it doesn’t really matter. Changing the speed must be done after you create the objects, based on the two options I mentioned before.