Search found 319 matches
- Wed Jun 08, 2016 7:17 pm
- Forum: Support and Development
- Topic: [SOLVED] love.physics - only change x velocity
- Replies: 3
- Views: 3282
Re: love.physics - only change x velocity
body:setLinearVelocity(100, body:getLinearVelocity() ) should work but body:getLinearVelocity() returns two values : x,y so you would want to do xNow,yNow = body:getLinearVelocity() body:setLinearVelocity(100, yNow ), else i have no clue. - Disclaim : I have not touched LUA/Love2d in months. excuse ...
- Fri Apr 29, 2016 3:18 pm
- Forum: Libraries and Tools
- Topic: Loveballs, A love2d Softbody lib
- Replies: 73
- Views: 42231
Re: Loveballs, A love2d Softbody lib
I actually attempted something akin to a port in Unity myself at one point.
Just not sure how id break down 'any' mesh into a soft body.
might be other ways to do this. id be keen to fiddle again though for now I am focused on studies
Just not sure how id break down 'any' mesh into a soft body.
might be other ways to do this. id be keen to fiddle again though for now I am focused on studies
- Mon Feb 08, 2016 9:39 pm
- Forum: Support and Development
- Topic: Destroy body with Löve2D physics
- Replies: 5
- Views: 3586
Re: Destroy body with Löve2D physics
err, my method isnt well made at the moment but sure ill zip up the edited files sofar. KEY : Search the word 'ADDED' for any additions and changes i made if you don't have code comparers. UnviPlanet-ArchEditFiles.zip To answer immediately your questions too : 1. Stone and Dirt globals are overwritt...
- Sun Feb 07, 2016 8:52 pm
- Forum: Support and Development
- Topic: Destroy body with Löve2D physics
- Replies: 5
- Views: 3586
Re: Destroy body with Löve2D physics
been modifying the map.lua and main.lua so many changes to make it work as expected. I was able to make adding work, removing doesn't exactly work physics wise (but does graphically) One major issue is you are working on globals 'stone' and 'dirt' when you make the map, stone and dirt globals are ov...
- Mon Dec 14, 2015 4:11 pm
- Forum: Support and Development
- Topic: Physics - Limit velocity
- Replies: 8
- Views: 5709
Re: Physics - Limit velocity
I would look at it by taking collisions with the limited body and after resolving check velocity and alter/decrease etc. This should catch that instant it speeds up or slows down on collide and instead 'lock' the velocity after collisions. Similarly any 'addForce/addVelocity' calls can be wrapped to...
- Mon Dec 14, 2015 6:28 am
- Forum: Support and Development
- Topic: My code just suddenly stopped working...
- Replies: 5
- Views: 2686
Re: My code just suddenly stopped working...
Try looking up and reading PiL (Programming in Lua) For statements are loops using the syntax for v = a , b , c do [body] end --v : The new created variable, usually i --a : The start of the loop --b : The End integer to loop to --c : the step, every loop the v-variable is incremented by c , c defau...
- Sun Dec 13, 2015 6:26 pm
- Forum: Support and Development
- Topic: My code just suddenly stopped working...
- Replies: 5
- Views: 2686
Re: My code just suddenly stopped working...
using player.frame["n"] where n is a number would also help loops for n= 1,11 do if player.frame.current == player.frame[tostring(n)] then player.frame.current = player.frame[tostring(n+1)] break end end I think might help ? Node I've not touched lua in almost a year thanks to studies so e...
- Sat Oct 31, 2015 12:20 pm
- Forum: Support and Development
- Topic: firing at an angle + other things
- Replies: 4
- Views: 3791
Re: firing at an angle + other things
id work with the angle of player and mouse, and fetch a point x distance away from player: //Pseudo code, angle //angle between player and mouse player_x // player x position player_y // player y position distance //distance to project the weapon at? gun_x = distance * math.cos(angle) + player_x gun...
- Wed Oct 28, 2015 6:08 am
- Forum: Libraries and Tools
- Topic: cargo, a small library for managing assets
- Replies: 6
- Views: 4846
Re: cargo, a small library for managing assets
I often coded such a setup whenever i worked on a project. It greatly improves workflow. One thing I allways worked towards was dependencies support for files. a File may have a .ini or other means of declaring dependency on another elsewhere in the mapping. The module would pause loading any depend...
- Tue Oct 20, 2015 5:20 am
- Forum: Support and Development
- Topic: Collision functions not working
- Replies: 1
- Views: 1502
Re: Collision functions not working
Line 87 : //Line 87 : CheckCollision( enemy.x, enemy.y, enemy.img:getWidth(), enemy.img:getHeight(), bullet.x, bullet.img:getWidth(), bullet.img:getHeight() ) Missing the bullet.y I often lay out my arguments in that form above since it is easy to count and compare.