Search found 8 matches

by melexm
Fri Dec 28, 2012 11:29 pm
Forum: Support and Development
Topic: X,Y Coordinates not working properly
Replies: 9
Views: 8663

Re: X,Y Coordinates not working properly

Boolsheet wrote:
melexm wrote:BTW: Wouldn't fixing shapes to one body makes the collisions not work?
Uh. I think I don't understand what you are asking.
I am creating multiple lines, attaching them to a single body object won't ruin the collisions with them?
by melexm
Fri Dec 28, 2012 10:57 pm
Forum: Support and Development
Topic: X,Y Coordinates not working properly
Replies: 9
Views: 8663

Re: X,Y Coordinates not working properly

The coordinates you set on the shapes are relative to the body origin (also called local coordinates). That means if you create a body at mStartX and attach an EdgeShape that starts at mStartX, the line will start at mStartX*2. Create the body at (0, 0) and the line should be where you expect it to...
by melexm
Fri Dec 28, 2012 3:26 pm
Forum: Support and Development
Topic: X,Y Coordinates not working properly
Replies: 9
Views: 8663

Re: X,Y Coordinates not working properly

vrld wrote:You use mEndX and mEndY but never define them.
OK, it is better now:

Code: Select all

  	walls[i].s = love.physics.newEdgeShape(mStartX, mStartY, x, y)
But still it isn't created at the same point of the mouse.
by melexm
Fri Dec 28, 2012 2:51 pm
Forum: Support and Development
Topic: X,Y Coordinates not working properly
Replies: 9
Views: 8663

Re: X,Y Coordinates not working properly

walls .s = love.physics.newEdgeShape(mStartX, mStartX, mEndX, mEndY) // here Shouldn't be instead walls .s = love.physics.newEdgeShape(mStartX, mStartY, mEndX, mEndY)? Still not working, it was mispeld because I was trying to play with it. Any other ideas, I think this has to do with some dx,dy thi...
by melexm
Fri Dec 28, 2012 1:17 pm
Forum: Support and Development
Topic: X,Y Coordinates not working properly
Replies: 9
Views: 8663

X,Y Coordinates not working properly

Hello, I would like to get an explanation (I couldn't find anything in the docs) about the x,y coordinates. I want to create a line which will start from the mouse pressed x,y and end in the mouse released x,y. Here is the code in the mouse released function event: walls[i].s = love.physics.newEdgeS...
by melexm
Thu Dec 27, 2012 8:23 pm
Forum: Support and Development
Topic: Collisions not working correctly
Replies: 4
Views: 2674

Re: Collisions not working correctly

so the problem was caused by friction. turns out every fixture has non-zero friction upon creation. so i called setFriction(0) on every fixture and the problem disappeared. now the ball is bouncing correctly. - How can I stop the player and the computer to not collide with the walls? (isn't the box...
by melexm
Tue Dec 25, 2012 2:52 pm
Forum: Support and Development
Topic: Collisions not working correctly
Replies: 4
Views: 2674

Re: Collisions not working correctly

you made a few typos when creating fixures. you also made the player and computer dynamic bodies - you don't want them to be pushed by the ball so they need to be static. i've corrected those issues but it still doens't work well. i've changed love.draw() to any make sure all the shapes are display...
by melexm
Sat Dec 22, 2012 8:08 pm
Forum: Support and Development
Topic: Collisions not working correctly
Replies: 4
Views: 2674

Collisions not working correctly

Hello guys, I am trying to create a simple "Pong" Game but I probably made a mistake in the way. The ball passes through the player and computer bars and has some strange collusion with the wall where it will "stick" to it. Here is the source code: local sw = 600 local sh = 600 l...