# Physics

**URL:** https://forums.solar2d.com/c/physics/21.md?page=1

[Latest](https://forums.solar2d.com/latest.md) · [Categories](https://forums.solar2d.com/categories.md)

**Page:** 2

---

## [Density not working.](https://forums.solar2d.com/t/density-not-working/353641)

<div class="topic-metadata">

**Author:** [@Chris\_31](https://forums.solar2d.com/u/Chris_31)\
**Replies:** 10\
**Last updated:** [June 30, 2021, 10:45am UTC](https://forums.solar2d.com/t/density-not-working/353641 "2021-06-30T10:45:02Z")

</div>

We are making a game that involves physics, we have an elevator that goes up and down. There can be objects on the elevator. The problem is when our player is on the elevator and when it goes up and the elevator stops at…

---

## [Help, how do I make this work?](https://forums.solar2d.com/t/help-how-do-i-make-this-work/353423)

<div class="topic-metadata">

**Author:** [@DigitalDave](https://forums.solar2d.com/u/DigitalDave)\
**Replies:** 1\
**Last updated:** [April 22, 2021, 11:00am UTC](https://forums.solar2d.com/t/help-how-do-i-make-this-work/353423 "2021-04-22T11:00:07Z")

</div>

local physics require(“physics”) physics.setGravity( 0, 0) physics.start() causes

---

## [Как отследить коллизию частиц в newParticleSystem](https://forums.solar2d.com/t/newparticlesystem/353156)

<div class="topic-metadata">

**Author:** [@ALesnar](https://forums.solar2d.com/u/ALesnar)\
**Replies:** 1\
**Last updated:** [February 19, 2021, 5:45pm UTC](https://forums.solar2d.com/t/newparticlesystem/353156 "2021-02-19T17:45:30Z")

</div>

Добрый день! Использую physics.newParticleSystem в разработке игры, у меня возник вопрос, как отследить что все частицы исчезли с платформы, использовал “particleCollision”, но этот способ не подходит, так как частицы …

---

## [Align polygon and it's physics body](https://forums.solar2d.com/t/align-polygon-and-its-physics-body/353039)

<div class="topic-metadata">

**Author:** [@wernersbacher](https://forums.solar2d.com/u/wernersbacher)\
**Replies:** 0\
**Last updated:** [January 20, 2021, 3:06pm UTC](https://forums.solar2d.com/t/align-polygon-and-its-physics-body/353039 "2021-01-20T15:06:11Z")

</div>

Hi guys, I’m trying to create an endless side scrolling game. I’m generating a random heightmap, smooth it and build an polygon from it and of course, I’m adding an body. One hill element is not fixed in its’ height; …

---

## [ how to make physics work correctly in a game viewed from above](https://forums.solar2d.com/t/how-to-make-physics-work-correctly-in-a-game-viewed-from-above/353016)

<div class="topic-metadata">

**Author:** [@Jellux](https://forums.solar2d.com/u/Jellux)\
**Replies:** 1\
**Last updated:** [January 13, 2021, 9:32pm UTC](https://forums.solar2d.com/t/how-to-make-physics-work-correctly-in-a-game-viewed-from-above/353016 "2021-01-13T21:32:20Z")

</div>

Hello guys! the game i am developing with my group is a managerial one and the player see the whole map and characters from above. I have physics enabled for each of the characters and once done, they all fall to the bo…

---

## [physics intermittently reacts to object sliding over other objects](https://forums.solar2d.com/t/physics-intermittently-reacts-to-object-sliding-over-other-objects/353009)

<div class="topic-metadata">

**Author:** [@lamina](https://forums.solar2d.com/u/lamina)\
**Replies:** 2\
**Last updated:** [January 12, 2021, 10:01pm UTC](https://forums.solar2d.com/t/physics-intermittently-reacts-to-object-sliding-over-other-objects/353009 "2021-01-12T22:01:00Z")

</div>

Hi ! I’m new to the forums, but I have a questions about seemingly odd results with object interactions. The code below creates a teal colour dynamic object which has a y-axis force applied and is under no other rules …

---

## [Track the ball's path](https://forums.solar2d.com/t/track-the-balls-path/352995)

<div class="topic-metadata">

**Author:** [@avdsm](https://forums.solar2d.com/u/avdsm)\
**Replies:** 2\
**Last updated:** [January 11, 2021, 4:33pm UTC](https://forums.solar2d.com/t/track-the-balls-path/352995 "2021-01-11T16:33:08Z")

</div>

Good afternoon! How can you track the path of a soccer ball that has received an instantaneous impulse, and during the movement on the field had several collisions with the walls of the field and other balls, after whic…

---

## [Kick on the ball](https://forums.solar2d.com/t/kick-on-the-ball/352988)

<div class="topic-metadata">

**Author:** [@avdsm](https://forums.solar2d.com/u/avdsm)\
**Replies:** 1\
**Last updated:** [January 9, 2021, 2:42am UTC](https://forums.solar2d.com/t/kick-on-the-ball/352988 "2021-01-09T02:42:51Z")

</div>

Good evening! Please tell me! How to organize a kick on the ball, while choosing the direction and magnitude of the impact force in advance?

---

## [Editor software for physics with joints support](https://forums.solar2d.com/t/editor-software-for-physics-with-joints-support/352840)

<div class="topic-metadata">

**Author:** [@atanasovskyjiri](https://forums.solar2d.com/u/atanasovskyjiri)\
**Replies:** 6\
**Last updated:** [December 8, 2020, 2:48pm UTC](https://forums.solar2d.com/t/editor-software-for-physics-with-joints-support/352840 "2020-12-08T14:48:48Z")

</div>

Hello, I would like to ask if you know about some software that supports creating complex physics bodies f.e. a car that would consist of several physics bodies connected together with joints or a ragdoll body etc. I w…

---

## [Destructable terrain-Bomb Craters](https://forums.solar2d.com/t/destructable-terrain-bomb-craters/352695)

<div class="topic-metadata">

**Author:** [@pkrg](https://forums.solar2d.com/u/pkrg)\
**Replies:** 8\
**Last updated:** [November 11, 2020, 8:28pm UTC](https://forums.solar2d.com/t/destructable-terrain-bomb-craters/352695 "2020-11-11T20:28:01Z")

</div>

I am a beginner to Solar2D. I am trying to make a game where you dodge falling bombs, which make craters in the ground. I’m having trouble thinking of a way to to implement the crater formation. Does corona support any t…

---

## [Ragdoll head](https://forums.solar2d.com/t/ragdoll-head/352239)

<div class="topic-metadata">

**Author:** [@Mazellan](https://forums.solar2d.com/u/Mazellan)\
**Replies:** 3\
**Last updated:** [September 2, 2020, 5:33pm UTC](https://forums.solar2d.com/t/ragdoll-head/352239 "2020-09-02T17:33:05Z")

</div>

I made a ragdoll and need it standing. I actually did it but its head is falling down to left. Tried to change the density values but didn’t help, also gave angularDamping but it just slows down the process, head is stil…

---

## [Multiple pivot joint](https://forums.solar2d.com/t/multiple-pivot-joint/352179)

<div class="topic-metadata">

**Author:** [@Mazellan](https://forums.solar2d.com/u/Mazellan)\
**Replies:** 0\
**Last updated:** [August 25, 2020, 8:23am UTC](https://forums.solar2d.com/t/multiple-pivot-joint/352179 "2020-08-25T08:23:13Z")

</div>

My chains have pivot joint with the notch in its side, i also wanna make chains joint to the ball so ball can pull chains to itself and it will look realistic, this is the state in “hybrid” mode; It doesn’t matter if …

---

## [Chain - doesn't rotate](https://forums.solar2d.com/t/chain-doesnt-rotate/351782)

<div class="topic-metadata">

**Author:** [@efgames.net](https://forums.solar2d.com/u/efgames.net)\
**Replies:** 4\
**Last updated:** [July 4, 2020, 1:33am UTC](https://forums.solar2d.com/t/chain-doesnt-rotate/351782 "2020-07-04T01:33:03Z")

</div>

Hey guys, I’m trying to use dynamic Edge Shape (Chain) Body - by drawing a line on the screen, then translate it to physic obj. And while gravity works on it fine - the object is not rotateable. Even if I draw a line …

---

## [Scaling image and collision](https://forums.solar2d.com/t/scaling-image-and-collision/351714)

<div class="topic-metadata">

**Author:** [@gforner](https://forums.solar2d.com/u/gforner)\
**Replies:** 4\
**Last updated:** [June 27, 2020, 2:59pm UTC](https://forums.solar2d.com/t/scaling-image-and-collision/351714 "2020-06-27T14:59:52Z")

</div>

Hi All, Been learning solar for a bit and find it fun. I’ve been trying to scale an image, which scales fine, but the collision box doesn’t seem to scale. My understanding is that if I scale the image first and then add…

---

## [obj:getLinearVelocity() return 0 on kinematic obj](https://forums.solar2d.com/t/obj-getlinearvelocity-return-0-on-kinematic-obj/351456)

<div class="topic-metadata">

**Author:** [@renato.rolando](https://forums.solar2d.com/u/renato.rolando)\
**Replies:** 6\
**Last updated:** [June 2, 2020, 8:27pm UTC](https://forums.solar2d.com/t/obj-getlinearvelocity-return-0-on-kinematic-obj/351456 "2020-06-02T20:27:32Z")

</div>

Hi, I’m implementing a typical ‘pong’ game. I have the ball, that is “dynamic” obj, and the rackets, that was “static” obj. All worked fine. Now I would like to upgrade the bouncing effect on the rackets and I tried …

---

## [The problem with resizing physical bodies](https://forums.solar2d.com/t/the-problem-with-resizing-physical-bodies/351279)

<div class="topic-metadata">

**Author:** [@lxl](https://forums.solar2d.com/u/lxl)\
**Replies:** 4\
**Last updated:** [May 18, 2020, 2:03pm UTC](https://forums.solar2d.com/t/the-problem-with-resizing-physical-bodies/351279 "2020-05-18T14:03:19Z")

</div>

Hello! I have a problem when I use physics.setScale(). All objects are shifted. Working example - local cx = display.contentCenterX local cy = display.contentCenterY local fullw = display.actualContentWidth lo…

---

## [Help With Buttons and SetGravity](https://forums.solar2d.com/t/help-with-buttons-and-setgravity/351254)

<div class="topic-metadata">

**Author:** [@MadCornDog](https://forums.solar2d.com/u/MadCornDog)\
**Replies:** 1\
**Last updated:** [May 15, 2020, 10:15pm UTC](https://forums.solar2d.com/t/help-with-buttons-and-setgravity/351254 "2020-05-15T22:15:34Z")

</div>

I am new to Corona and just starting to learn it. I was trying to build a test app with my new-found knowledge of buttons, in which you press a button to toggle the gravity on a ball, but it doesn’t work and I have no id…

---

## [physics addbody and display.newGroup](https://forums.solar2d.com/t/physics-addbody-and-display-newgroup/351216)

<div class="topic-metadata">

**Author:** [@lxl](https://forums.solar2d.com/u/lxl)\
**Replies:** 6\
**Last updated:** [May 14, 2020, 10:09pm UTC](https://forums.solar2d.com/t/physics-addbody-and-display-newgroup/351216 "2020-05-14T22:09:23Z")

</div>

\`local shturmGroup = display.newGroup() local function createMinBoss() local POSPOSX = cx local POSPOSY = 400 local LeftLaserGroup = display.newGroup() \*\*LeftLaserGroup.x=POSPOSX-55\*\* \*\* LeftLaserGroup.y…

---

## [physic.pause / resume problem with composer.showOverlay](https://forums.solar2d.com/t/physic-pause-resume-problem-with-composer-showoverlay/351178)

<div class="topic-metadata">

**Author:** [@renato.rolando](https://forums.solar2d.com/u/renato.rolando)\
**Replies:** 4\
**Last updated:** [May 10, 2020, 4:47pm UTC](https://forums.solar2d.com/t/physic-pause-resume-problem-with-composer-showoverlay/351178 "2020-05-10T16:47:24Z")

</div>

I have a problem about a physic.pause/resume with composer.showOverlay: here the sit: I am in a scene of name ‘parent’. On on double tap event I show with composer.showOverlay the scene “pause\_resume” and I froze all …

---

## [groupIndex not working?](https://forums.solar2d.com/t/groupindex-not-working/351130)

<div class="topic-metadata">

**Author:** [@fredrik.kloster93](https://forums.solar2d.com/u/fredrik.kloster93)\
**Replies:** 1\
**Last updated:** [May 6, 2020, 11:00am UTC](https://forums.solar2d.com/t/groupindex-not-working/351130 "2020-05-06T11:00:35Z")

</div>

I’m trying to create a surface in 2D, with several hitboxes, and want to you use groupIndex as collision filter. No matter what values I insert, the ball will always bounce on all the hitboxes. –The Ball local f = { gr…

---

## [How to detect multiple key inputs and apply "jump" into object controller?](https://forums.solar2d.com/t/how-to-detect-multiple-key-inputs-and-apply-jump-into-object-controller/350855)

<div class="topic-metadata">

**Author:** [@16226879](https://forums.solar2d.com/u/16226879)\
**Replies:** 9\
**Last updated:** [April 24, 2020, 4:23pm UTC](https://forums.solar2d.com/t/how-to-detect-multiple-key-inputs-and-apply-jump-into-object-controller/350855 "2020-04-24T16:23:47Z")

</div>

Hi, my project is 95% done, unfortunately the following final problem is the most important one. Please generously help. My game contains two players, let’s define them as “player 1” and “player 2”. In my coding, I used…

---

## [display.remove() in Collision function doesn't work, please help!](https://forums.solar2d.com/t/display-remove-in-collision-function-doesnt-work-please-help/350835)

<div class="topic-metadata">

**Author:** [@16226879](https://forums.solar2d.com/u/16226879)\
**Replies:** 2\
**Last updated:** [April 23, 2020, 10:11am UTC](https://forums.solar2d.com/t/display-remove-in-collision-function-doesnt-work-please-help/350835 "2020-04-23T10:11:37Z")

</div>

(Sorry for creating new topic in the wrong field “Other”) Hi, I am a newbie from Hong Kong. Here is the problem. The object’s code: \[lua\]function addInitialBlocks() blocks = display.newGroup() for i = 1, 1 do block…

---

## [How to stop rotating when collide happens.](https://forums.solar2d.com/t/how-to-stop-rotating-when-collide-happens/350802)

<div class="topic-metadata">

**Author:** [@tima.xxxyyy](https://forums.solar2d.com/u/tima.xxxyyy)\
**Replies:** 6\
**Last updated:** [April 20, 2020, 2:53pm UTC](https://forums.solar2d.com/t/how-to-stop-rotating-when-collide-happens/350802 "2020-04-20T14:53:00Z")

</div>

I’m having obj1. I need to fix his “rotate position” (how to say it right by the way?) when it collides with other objects.

---

## [Wrong collision sensing "event.contact.isTouching"](https://forums.solar2d.com/t/wrong-collision-sensing-event-contact-istouching/151312)

<div class="topic-metadata">

**Author:** [@zombiexp2010](https://forums.solar2d.com/u/zombiexp2010)\
**Replies:** 2\
**Last updated:** [March 2, 2020, 6:10pm UTC](https://forums.solar2d.com/t/wrong-collision-sensing-event-contact-istouching/151312 "2020-03-02T18:10:21Z")

</div>

Collision listeners: local function sensorL\\\_Collide(event) if event.contact.isTouching then sensorL.collide = true if event.other.type then sensorL.groundType = event.other.type end else sensorL.collide = false sensorL.…

---

## [Why physics engine summate the direction of the vectors?](https://forums.solar2d.com/t/why-physics-engine-summate-the-direction-of-the-vectors/150952)

<div class="topic-metadata">

**Author:** [@stalxerhd](https://forums.solar2d.com/u/stalxerhd)\
**Replies:** 2\
**Last updated:** [February 21, 2020, 1:26am UTC](https://forums.solar2d.com/t/why-physics-engine-summate-the-direction-of-the-vectors/150952 "2020-02-21T01:26:39Z")

</div>

In my game, the physics engine is periodically paused/started via commands physics.start() and physics.pause(). When the game works, there are no big problems with the direction of the object; in 99% it always moves to …

---

## [Collision questions](https://forums.solar2d.com/t/collision-questions/151166)

<div class="topic-metadata">

**Author:** [@david.hutyra.stp](https://forums.solar2d.com/u/david.hutyra.stp)\
**Replies:** 4\
**Last updated:** [February 11, 2020, 10:36pm UTC](https://forums.solar2d.com/t/collision-questions/151166 "2020-02-11T22:36:59Z")

</div>

SO, I’m trying to do a game similar to BloonsTD but I don’t really know how to do the shooting of projectiles and reaching the end to end the game. Also, this isn’t really important but can anyone show me how to do a YOU…

---

## [wrong contentBounds ?](https://forums.solar2d.com/t/wrong-contentbounds/151072)

<div class="topic-metadata">

**Author:** [@pahuchiy](https://forums.solar2d.com/u/pahuchiy)\
**Replies:** 2\
**Last updated:** [January 30, 2020, 3:45am UTC](https://forums.solar2d.com/t/wrong-contentbounds/151072 "2020-01-30T03:45:07Z")

</div>

physics =require "physics" physics.setDrawMode( "hybrid" ) physics.start() c1 = display.newCircle( 100,100,50 ) physics.addBody( c1,{radius=50, friction=1}) r1 = display.newRect(200,300,500,20) r1.rotation = 10 physics.a…

---

## [Physic is... useless?](https://forums.solar2d.com/t/physic-is-useless/150842)

<div class="topic-metadata">

**Author:** [@tima.xxxyyy](https://forums.solar2d.com/u/tima.xxxyyy)\
**Replies:** 2\
**Last updated:** [December 28, 2019, 2:27am UTC](https://forums.solar2d.com/t/physic-is-useless/150842 "2019-12-28T02:27:57Z")

</div>

I’m still new to corona(I didn’t use it some time). So i want to make platformer.BUT i tried to use physic library for jumping - and character too bouncy. But i can create a function that changes y of character. Soooo… W…

---

## [Joint shift due to collision](https://forums.solar2d.com/t/joint-shift-due-to-collision/150823)

<div class="topic-metadata">

**Author:** [@pahuchiy](https://forums.solar2d.com/u/pahuchiy)\
**Replies:** 1\
**Last updated:** [December 26, 2019, 5:49pm UTC](https://forums.solar2d.com/t/joint-shift-due-to-collision/150823 "2019-12-26T17:49:42Z")

</div>

The question is in the comments to the code. local physics = require('physics') physics.start() physics.setGravity( 0, 0 ) physics.setDrawMode( "hybrid" ) local c1 = display.newRect( 100, 200, 40,40 ) local c2 = display…

---

## [Multi-element body and .isSensor](https://forums.solar2d.com/t/multi-element-body-and-issensor/150831)

<div class="topic-metadata">

**Author:** [@pahuchiy](https://forums.solar2d.com/u/pahuchiy)\
**Replies:** 0\
**Last updated:** [December 26, 2019, 4:47pm UTC](https://forums.solar2d.com/t/multi-element-body-and-issensor/150831 "2019-12-26T16:47:35Z")

</div>

.isSensor сhanges the property of all elements of the multi-element body at once. Is it possible to change this property of one element of the multi-element body in an already created body?

[Previous page](https://forums.solar2d.com/c/physics/21.md)

[Next page](https://forums.solar2d.com/c/physics/21.md?page=2)
