Hi
I was looking to the love physics and I think that's great for my game. However I have couple of questions if anyone knows good way to go about it.
First I'm making a sport game where there is walls around the play area which the ball cannot pass but should bounce back (and I'm going to use love physics for this). And in game the players carry around the ball but what if the ball touches the border? How do I combine the physics engine with players being able to carry the ball with them?
Second question, is there a function to check when the ball crosses the goal line?
thanks!
Ball game physics questions
Re: Ball game physics questions
Use applyImpulse and applyTorque.How do I combine the physics engine with players being able to carry the ball with them?
Do not change the velocity or position manually.
Box2D has collision callbacks and contact lists.is there a function to check when the ball crosses the goal line
For things like triggers and sensors, use the latter.
Re: Ball game physics questions
I guess I could do that but it complicates things. easier to just set the position than trying to aim with vectorUse applyImpulse and applyTorque.
Do not change the velocity or position manually.
Is box2D in love.physics?Box2D has collision callbacks and contact lists.
For things like triggers and sensors, use the latter.
Re: Ball game physics questions
In that case, don't expect your ball to react to other objects
Yes
Re: Ball game physics questions
Ok
If anyone has code examples for my questions it would be great!
Edit: Found Fixture:setSensor( true ) - for the goal line
If anyone has code examples for my questions it would be great!
Edit: Found Fixture:setSensor( true ) - for the goal line
Who is online
Users browsing this forum: Ahrefs [Bot] and 6 guests