Search found 42 matches

by Coder567
Tue Oct 01, 2019 8:41 am
Forum: General
Topic: Physics object movement q
Replies: 20
Views: 3454

Re: Physics object movement q

@pgimeno ok thanks! will try that later when I get the time
by Coder567
Tue Oct 01, 2019 8:34 am
Forum: General
Topic: loveframes column list selecting
Replies: 3
Views: 1038

loveframes column list selecting

Hi Does anyone know how to use loveframes column list selecting? I can't figure out how to get the column user clicks. In below code I'm printing the row variables but no row index there list.OnRowSelected = function(parent, row, data) for k, v in ipairs(data) do print("Column " ..k.. ": " ..v) end ...
by Coder567
Mon Sep 30, 2019 4:34 pm
Forum: General
Topic: Physics object movement q
Replies: 20
Views: 3454

Re: Physics object movement q

ivan wrote:
Mon Sep 30, 2019 4:14 pm
You really don't want to get into the inverse kinematics of Box2d - it's way too complicated for such a simple problem.
Just use a mouse joint and you'll be fine.
Mouse joint is for user input right? I'm making AI based game, where AI throws passes..
by Coder567
Mon Sep 30, 2019 1:09 pm
Forum: General
Topic: Physics object movement q
Replies: 20
Views: 3454

Re: Physics object movement q

@Ivan thanks that probably works but ideally I would like to know how much force to apply so the ball stops moving let's say at 2 seconds
by Coder567
Sat Sep 28, 2019 8:30 am
Forum: General
Topic: Physics object movement q
Replies: 20
Views: 3454

Re: Physics object movement q

The slow down effect of the ball would be nice, not just applying more force Your body already has damping so it should "ease" to a stop by itself. One hacky approach could be to make the force proportional to the distance: force = min(easing/distance, 1) * force where "easing" is the distance you ...
by Coder567
Sat Sep 28, 2019 8:28 am
Forum: General
Topic: Physics object movement q
Replies: 20
Views: 3454

Re: Physics object movement q

How much force to apply depends on how much acceleration you want and how much does the object weighs. F = m / a Damping simply applies a force like this but in direction opposite to motion direction. Assuming that direction vs force angle mismatch isn't very important, you can simply increase desi...
by Coder567
Fri Sep 27, 2019 2:42 pm
Forum: General
Topic: Physics object movement q
Replies: 20
Views: 3454

Re: Physics object movement q

The slow down effect of the ball would be nice, not just applying more force

And I can get distance to target, no problem there
by Coder567
Fri Sep 27, 2019 1:43 pm
Forum: General
Topic: Physics object movement q
Replies: 20
Views: 3454

Re: Physics object movement q

I just need to know how much force to put on the ball so it reaches the target
by Coder567
Fri Sep 27, 2019 12:37 pm
Forum: General
Topic: Physics object movement q
Replies: 20
Views: 3454

Re: Physics object movement q

Does anyone know the formula for this time = distance/speed Thanks I got the time formula but that was not my question The problem is that the rigid bodies in love.physics do not move with a constant speed especially when collisions and damping are involved. Yes but I only need to know straight mov...
by Coder567
Fri Sep 27, 2019 10:50 am
Forum: General
Topic: Physics object movement q
Replies: 20
Views: 3454

Physics object movement q

Hi I'm using the physics library but my problem is I don't know how long it takes for the object to move to it's destination. Does anyone know the formula for this? If I have friction 0.25 then how much force I need to apply to the ball so it has traveled 300 pixels in two seconds? ball.body:setLine...