# Physics

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

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

**Page:** 3

---

## [Mechanics "Hill climb racing"](https://forums.solar2d.com/t/mechanics-hill-climb-racing/150486)

<div class="topic-metadata">

**Author:** [@a-09-19](https://forums.solar2d.com/u/a-09-19)\
**Replies:** 3\
**Last updated:** [November 18, 2019, 9:57am UTC](https://forums.solar2d.com/t/mechanics-hill-climb-racing/150486 "2019-11-18T09:57:07Z")

</div>

Hello! I’m studying Corona and want to make a game with mechanics like in Hill climb racing. I don’t understand much yet. Maybe, if there is free time to please look at my files and register the physical object of the ca…

---

## [Transition.to moving player through static physics objects](https://forums.solar2d.com/t/transition-to-moving-player-through-static-physics-objects/150467)

<div class="topic-metadata">

**Author:** [@nml2727](https://forums.solar2d.com/u/nml2727)\
**Replies:** 6\
**Last updated:** [November 14, 2019, 11:04pm UTC](https://forums.solar2d.com/t/transition-to-moving-player-through-static-physics-objects/150467 "2019-11-14T23:04:10Z")

</div>

I have borders in my game which are static physics objects. The player should NOT ever be allowed to move through them. My problem is that I am using transition.to for all my player movement and if I click on the oth…

---

## [How to create a perfect collision box around an irregular object](https://forums.solar2d.com/t/how-to-create-a-perfect-collision-box-around-an-irregular-object/150148)

<div class="topic-metadata">

**Author:** [@benj.jones7](https://forums.solar2d.com/u/benj.jones7)\
**Replies:** 2\
**Last updated:** [October 6, 2019, 8:29pm UTC](https://forums.solar2d.com/t/how-to-create-a-perfect-collision-box-around-an-irregular-object/150148 "2019-10-06T20:29:17Z")

</div>

For the main ‘character’ of my game I have a BMX bike as a PNG, at the moment of its collison box I’m using a rect. I need the hitbox to me more precise for the shape of the bike as at the moment it only balances on the…

---

## [round object rotate but not its image](https://forums.solar2d.com/t/round-object-rotate-but-not-its-image/150137)

<div class="topic-metadata">

**Author:** [@manu\_1010](https://forums.solar2d.com/u/manu_1010)\
**Replies:** 2\
**Last updated:** [October 4, 2019, 10:15pm UTC](https://forums.solar2d.com/t/round-object-rotate-but-not-its-image/150137 "2019-10-04T22:15:11Z")

</div>

Hello everyone, i’m creating a simple game but i’m having a problem, I have wrote this code as an example of what i want to do: physics = require ("physics") physics.start( ) ball = display.newImageRect("Ball.png", 15,…

---

## [Pinball Problems :)](https://forums.solar2d.com/t/pinball-problems/149881)

<div class="topic-metadata">

**Author:** [@toblotron](https://forums.solar2d.com/u/toblotron)\
**Replies:** 15\
**Last updated:** [October 3, 2019, 10:52am UTC](https://forums.solar2d.com/t/pinball-problems/149881 "2019-10-03T10:52:50Z")

</div>

My problem: When the ball moves pretty fast (going downwards), and the flipper is moving, the ball sometimes passes through the flipper altogether. I’ve implemented the movement of the flipper by having a joint with a …

---

## [How to monitor when a physics body is added for a display object?](https://forums.solar2d.com/t/how-to-monitor-when-a-physics-body-is-added-for-a-display-object/350355)

<div class="topic-metadata">

**Author:** [@XeduR](https://forums.solar2d.com/u/XeduR)\
**Replies:** 6\
**Last updated:** [August 26, 2019, 6:58pm UTC](https://forums.solar2d.com/t/how-to-monitor-when-a-physics-body-is-added-for-a-display-object/350355 "2019-08-26T18:58:59Z")

</div>

I am terribly out of practice with metatables and whatnot, and I’m not sure if they are applicable here. I am working with dynamic code and the users may try to add physics bodies for the display objects that they creat…

---

## [Tutorial - laser won't be removed on collision although display.remove is called](https://forums.solar2d.com/t/tutorial-laser-wont-be-removed-on-collision-although-display-remove-is-called/350186)

<div class="topic-metadata">

**Author:** [@Sheldonopolis](https://forums.solar2d.com/u/Sheldonopolis)\
**Replies:** 8\
**Last updated:** [August 16, 2019, 4:23am UTC](https://forums.solar2d.com/t/tutorial-laser-wont-be-removed-on-collision-although-display-remove-is-called/350186 "2019-08-16T04:23:24Z")

</div>

Hi guys, I finished the tutorial and everything went well. Then I modified some code and found a problem. Problem: In the simulator, when the laser hits an asteroid, it will disappear either immediately or when it …

---

## [Bullet collision problem! Help me pls!](https://forums.solar2d.com/t/bullet-collision-problem-help-me-pls/350300)

<div class="topic-metadata">

**Author:** [@andrea.marrocco95](https://forums.solar2d.com/u/andrea.marrocco95)\
**Replies:** 4\
**Last updated:** [August 12, 2019, 4:08pm UTC](https://forums.solar2d.com/t/bullet-collision-problem-help-me-pls/350300 "2019-08-12T16:08:58Z")

</div>

Hi guys, I’ve a problem with my code to rilieve collision between a bullet and an enemy. With this code , the bullets appears and moves correctly, but they don’t rilieve any collision. Can you help me pls? :wacko: …

---

## [Overlap Sliding](https://forums.solar2d.com/t/overlap-sliding/350262)

<div class="topic-metadata">

**Author:** [@jack95](https://forums.solar2d.com/u/jack95)\
**Replies:** 6\
**Last updated:** [August 4, 2019, 8:56am UTC](https://forums.solar2d.com/t/overlap-sliding/350262 "2019-08-04T08:56:53Z")

</div>

Given a composer scene with this - function scene:create() local group = self.view cameraGroup = display.newGroup() mapGroup = display.newGroup() cameraGroup:insert(mapGroup) group:insert(cameraGroup) local tileSize = 5…

---

## [image and collision out of place](https://forums.solar2d.com/t/image-and-collision-out-of-place/350247)

<div class="topic-metadata">

**Author:** [@citizengoosevv](https://forums.solar2d.com/u/citizengoosevv)\
**Replies:** 2\
**Last updated:** [July 31, 2019, 3:36pm UTC](https://forums.solar2d.com/t/image-and-collision-out-of-place/350247 "2019-07-31T15:36:29Z")

</div>

Hello! Im new to corona and lua, so excuse me if this a really stupid mistake. I downloaded the Sticker Knight template and tried to make the knight shoot by adding in the following to the hero.lua file: function inst…

---

## [Function RestoreShip works only when called from game.lua file, but not from a module](https://forums.solar2d.com/t/function-restoreship-works-only-when-called-from-game-lua-file-but-not-from-a-module/350095)

<div class="topic-metadata">

**Author:** [@robertom.ranieri](https://forums.solar2d.com/u/robertom.ranieri)\
**Replies:** 14\
**Last updated:** [July 3, 2019, 10:18am UTC](https://forums.solar2d.com/t/function-restoreship-works-only-when-called-from-game-lua-file-but-not-from-a-module/350095 "2019-07-03T10:18:21Z")

</div>

Hello guys, I’m having kind of an odd issue. I’m basing my project off of the Corona Tutorial for the space shoot 'em up game, which contains the following function in order for the player to gain some invincibility fr…

---

## [Collision event listener calls function but doesnt provide an event object.](https://forums.solar2d.com/t/collision-event-listener-calls-function-but-doesnt-provide-an-event-object/350098)

<div class="topic-metadata">

**Author:** [@michaeljameslewis30](https://forums.solar2d.com/u/michaeljameslewis30)\
**Replies:** 22\
**Last updated:** [June 30, 2019, 4:00pm UTC](https://forums.solar2d.com/t/collision-event-listener-calls-function-but-doesnt-provide-an-event-object/350098 "2019-06-30T16:00:45Z")

</div>

Corona detects the collision but when it calls the collision(fight) function it doesn’t pass a meaningful event object. I’m unable to access event.phase or event.target although the event object exists. Here’s the code: …

---

## [any luck with flipping physics body ?](https://forums.solar2d.com/t/any-luck-with-flipping-physics-body/349815)

<div class="topic-metadata">

**Author:** [@edualc](https://forums.solar2d.com/u/edualc)\
**Replies:** 34\
**Last updated:** [June 2, 2019, 10:57am UTC](https://forums.solar2d.com/t/any-luck-with-flipping-physics-body/349815 "2019-06-02T10:57:51Z")

</div>

Hello, in May 2013 Brent Sorrentino said: Hi Hari, Icy Spark is correct… just note that flipping will not (at this time) flip a physics body, if you’re using it that way. It will flip the image, but the physics body wi…

---

## [collision sometimes does not fire despite physic shadow showing they're are top of each other](https://forums.solar2d.com/t/collision-sometimes-does-not-fire-despite-physic-shadow-showing-theyre-are-top-of-each-other/349898)

<div class="topic-metadata">

**Author:** [@edualc](https://forums.solar2d.com/u/edualc)\
**Replies:** 0\
**Last updated:** [May 18, 2019, 9:23am UTC](https://forums.solar2d.com/t/collision-sometimes-does-not-fire-despite-physic-shadow-showing-theyre-are-top-of-each-other/349898 "2019-05-18T09:23:31Z")

</div>

Hi all, I have a character that needs to avoid cars. it also need to go and touch a landmark. this landmark can also be touched by other ‘things’ All of them are declared a dynamic physical objects and sensor. I have…

---

## [Is there an oversight with the physics library?](https://forums.solar2d.com/t/is-there-an-oversight-with-the-physics-library/349844)

<div class="topic-metadata">

**Author:** [@XeduR](https://forums.solar2d.com/u/XeduR)\
**Replies:** 28\
**Last updated:** [May 9, 2019, 12:52am UTC](https://forums.solar2d.com/t/is-there-an-oversight-with-the-physics-library/349844 "2019-05-09T00:52:18Z")

</div>

I’ve been polishing the code for one plugin that I am planning on releasing next week, but while doing so, I think I may have stumbled across a bug. I have three files: main.lua, myScene.lua and myLibrary.lua. I don’t r…

---

## [lag, deltaTime & box2d - any advice?](https://forums.solar2d.com/t/lag-deltatime-box2d-any-advice/349825)

<div class="topic-metadata">

**Author:** [@craig.stowers](https://forums.solar2d.com/u/craig.stowers)\
**Replies:** 4\
**Last updated:** [May 1, 2019, 10:26pm UTC](https://forums.solar2d.com/t/lag-deltatime-box2d-any-advice/349825 "2019-05-01T22:26:21Z")

</div>

So I’m fairly confident with my understanding of delta time and modifying movement so objects get around in respect to time instead of frames. I’ve applied this to my “handcrafted” physics with good results To apply thi…

---

## [Trying to achieve a torque affect but running into some issues.](https://forums.solar2d.com/t/trying-to-achieve-a-torque-affect-but-running-into-some-issues/349785)

<div class="topic-metadata">

**Author:** [@kieron.mcdougall8473](https://forums.solar2d.com/u/kieron.mcdougall8473)\
**Replies:** 2\
**Last updated:** [April 23, 2019, 2:10pm UTC](https://forums.solar2d.com/t/trying-to-achieve-a-torque-affect-but-running-into-some-issues/349785 "2019-04-23T14:10:49Z")

</div>

Hey all, I’m pretty new to Corona and Lua as a language but I’m trying to make a start on my own game. However, I am running into an issue that I’m hoping one of you may have a solution to. In my game, I have a ball th…

---

## [Overlapping Physics](https://forums.solar2d.com/t/overlapping-physics/349772)

<div class="topic-metadata">

**Author:** [@scuba\_games](https://forums.solar2d.com/u/scuba_games)\
**Replies:** 4\
**Last updated:** [April 19, 2019, 2:06pm UTC](https://forums.solar2d.com/t/overlapping-physics/349772 "2019-04-19T14:06:04Z")

</div>

I have some objects with physics that work fine, until something pushes them. Then they overlap, see attached. Any thoughts? if shape == 0 then tphy = {density=0.005, friction=1, bounce=0.42, radius = (dr/2) + 1, isB…

---

## [Moving a physics object with transition.to ?](https://forums.solar2d.com/t/moving-a-physics-object-with-transition-to/349702)

<div class="topic-metadata">

**Author:** [@d.mach](https://forums.solar2d.com/u/d.mach)\
**Replies:** 4\
**Last updated:** [April 5, 2019, 2:33pm UTC](https://forums.solar2d.com/t/moving-a-physics-object-with-transition-to/349702 "2019-04-05T14:33:29Z")

</div>

I know moving a physics object directly with transition.to is fighting the physics engine BUT I wonder if it is possible to somehow use a joint to manipulate (move) a physics body to a screen position with transition.to …

---

## [Best way for moving physics based charactrers on screen?](https://forums.solar2d.com/t/best-way-for-moving-physics-based-charactrers-on-screen/349661)

<div class="topic-metadata">

**Author:** [@d.mach](https://forums.solar2d.com/u/d.mach)\
**Replies:** 16\
**Last updated:** [April 3, 2019, 3:00pm UTC](https://forums.solar2d.com/t/best-way-for-moving-physics-based-charactrers-on-screen/349661 "2019-04-03T15:00:55Z")

</div>

I wonder which is the best way to move physics objects on the screen? I want something like this: A map based game with some obstacles (physics objects) Characters on the map (also have physics) Now I want to move th…

---

## [Question regarding dynamic bodies](https://forums.solar2d.com/t/question-regarding-dynamic-bodies/349674)

<div class="topic-metadata">

**Author:** [@d.mach](https://forums.solar2d.com/u/d.mach)\
**Replies:** 8\
**Last updated:** [March 29, 2019, 1:54pm UTC](https://forums.solar2d.com/t/question-regarding-dynamic-bodies/349674 "2019-03-29T13:54:00Z")

</div>

I now have managed to move dynamic objects using a touchjoint on screen. When they collide with other dynamic bodies they change their path, like the other bodies do. My question: Is it possible to somehow let the movin…

---

## [Physics Bug With Static Object Overlaying Dynamic Object](https://forums.solar2d.com/t/physics-bug-with-static-object-overlaying-dynamic-object/349493)

<div class="topic-metadata">

**Author:** [@lofy](https://forums.solar2d.com/u/lofy)\
**Replies:** 16\
**Last updated:** [February 28, 2019, 7:21pm UTC](https://forums.solar2d.com/t/physics-bug-with-static-object-overlaying-dynamic-object/349493 "2019-02-28T19:21:29Z")

</div>

So I’ve created a game and I’ve got almost all the bugs ironed out but one last one persists. I’ve had it the entire time and don’t know what I can do to get rid of it. To understand it you need to understand my game its…

---

## [phantom physics](https://forums.solar2d.com/t/phantom-physics/349503)

<div class="topic-metadata">

**Author:** [@pahuchiy](https://forums.solar2d.com/u/pahuchiy)\
**Replies:** 4\
**Last updated:** [February 22, 2019, 3:25pm UTC](https://forums.solar2d.com/t/phantom-physics/349503 "2019-02-22T15:25:52Z")

</div>

Why does obj2 bounce (turning a small square) as if obj1 still exists? display.setStatusBar( display.HiddenStatusBar ) display.setDefault( "background", 1,1,1 ) require("physics") local widget = require( "widget" ) phys…

---

## [How to permanently set body's X position?](https://forums.solar2d.com/t/how-to-permanently-set-bodys-x-position/349417)

<div class="topic-metadata">

**Author:** [@jfpilch](https://forums.solar2d.com/u/jfpilch)\
**Replies:** 6\
**Last updated:** [February 11, 2019, 4:29pm UTC](https://forums.solar2d.com/t/how-to-permanently-set-bodys-x-position/349417 "2019-02-11T16:29:11Z")

</div>

I am new to Corona, and struggling to figure out the following: I have a dynamic body that I would like to be able to move along the Y axis, but I would like to fix its X position, effectively preventing it from moving a…

---

## [Collision events order](https://forums.solar2d.com/t/collision-events-order/349375)

<div class="topic-metadata">

**Author:** [@rune7](https://forums.solar2d.com/u/rune7)\
**Replies:** 18\
**Last updated:** [February 5, 2019, 3:29pm UTC](https://forums.solar2d.com/t/collision-events-order/349375 "2019-02-05T15:29:59Z")

</div>

Hi, I was under the impression that preCollision is dispatched before collision event so that I can potentially alter or even disable the contact entirely. However, when testing I get collision began event and only then…

---

## [problems with wheel joint, too loose](https://forums.solar2d.com/t/problems-with-wheel-joint-too-loose/349376)

<div class="topic-metadata">

**Author:** [@wernersbacher](https://forums.solar2d.com/u/wernersbacher)\
**Replies:** 0\
**Last updated:** [February 2, 2019, 10:16pm UTC](https://forums.solar2d.com/t/problems-with-wheel-joint-too-loose/349376 "2019-02-02T22:16:29Z")

</div>

Hey guys, I try to build a car from a body, two wheel and 2 joints. It works, but when I put a value to big in as last parameter (\> 45), the car is flying all around, bugging like hell. I try to increase this value to …

---

## [Collision filter not working for chain bodies](https://forums.solar2d.com/t/collision-filter-not-working-for-chain-bodies/348977)

<div class="topic-metadata">

**Author:** [@sporkfin](https://forums.solar2d.com/u/sporkfin)\
**Replies:** 16\
**Last updated:** [January 6, 2019, 4:45pm UTC](https://forums.solar2d.com/t/collision-filter-not-working-for-chain-bodies/348977 "2019-01-06T16:45:14Z")

</div>

I’m currently using the Corona Collision Filters plug-in and I’m unable to get collision filters to work with chain bodies. Before I go through the trouble of remaking my filters the old way (with category bits ) to fur…

---

## [Add friction into pivot](https://forums.solar2d.com/t/add-friction-into-pivot/349044)

<div class="topic-metadata">

**Author:** [@prographodeveloper](https://forums.solar2d.com/u/prographodeveloper)\
**Replies:** 6\
**Last updated:** [December 4, 2018, 7:56pm UTC](https://forums.solar2d.com/t/add-friction-into-pivot/349044 "2018-12-04T19:56:06Z")

</div>

I have a pivot which attaches a dynamic object to a static point. The dynamic object is a rectangle. It is attached at one end. Gravity is on. I start the rectangle vertically. When everything starts it swings. This is c…

---

## [can't get Raycast collided object's parameters](https://forums.solar2d.com/t/cant-get-raycast-collided-objects-parameters/349040)

<div class="topic-metadata">

**Author:** [@marcelopotty0](https://forums.solar2d.com/u/marcelopotty0)\
**Replies:** 2\
**Last updated:** [December 4, 2018, 4:52pm UTC](https://forums.solar2d.com/t/cant-get-raycast-collided-objects-parameters/349040 "2018-12-04T16:52:00Z")

</div>

To make the character’s movement I made something like this: &nbsp;local function onEnterFrame() -- "jugador" means player in spanish --"todoGroup" is the group containing all the elements &nbsp; &nbsp; &nbsp; &nbsp; &n…

---

## [Identical Physics on different devices](https://forums.solar2d.com/t/identical-physics-on-different-devices/349009)

<div class="topic-metadata">

**Author:** [@prographodeveloper](https://forums.solar2d.com/u/prographodeveloper)\
**Replies:** 4\
**Last updated:** [November 28, 2018, 5:38pm UTC](https://forums.solar2d.com/t/identical-physics-on-different-devices/349009 "2018-11-28T17:38:52Z")

</div>

If I set up a scene exactly the same on iOS, Android and HTML5 will they all behave exactly the same?

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

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