Search found 54 matches

by adge
Fri May 06, 2016 3:40 pm
Forum: Games and Creations
Topic: simple 3D to 2D projection
Replies: 7
Views: 11738

Re: simple 3D to 2D projection

Safari :-)
by adge
Tue May 03, 2016 2:19 pm
Forum: Support and Development
Topic: How to represent 3d objects in 2d
Replies: 16
Views: 14532

Re: How to represent 3d objects in 2d

Tanner wrote:Since this seems to be the direction you're headed in, here's a guide on how to write a software renderer from scratch. https://github.com/ssloy/tinyrenderer/wiki
Wow that sounds extremely cool! Thank you!
by adge
Tue May 03, 2016 12:06 pm
Forum: Support and Development
Topic: Kinetic scrolling
Replies: 10
Views: 5418

Re: Kinetic scrolling

God I'm an idiot! Of course dividing by below 1 increases! Jesus!!!!

This one should work. *zipping the zip*

1,2,3 loads different models.
by adge
Tue May 03, 2016 11:12 am
Forum: Support and Development
Topic: How to represent 3d objects in 2d
Replies: 16
Views: 14532

Re: How to represent 3d objects in 2d

faster than common equations like this one: function rotateZ3D(alpha) rad = alpha * math.pi/180 sin = math.sin(rad) cos = math.cos(rad) for a = 1, #nodes, 1 do node = nodes[a] x = node.x y = node.y node.x = (x * cos - y * sin) node.y = (y * cos + x * sin) end end Moreover I would like to recreate th...
by adge
Tue May 03, 2016 11:08 am
Forum: Support and Development
Topic: Kinetic scrolling
Replies: 10
Views: 5418

Re: Move after mousereleased

Yeah I will look into that. However I got it to work. I just did this: function love.update() if mousereleased == true then moveY3D = moveY3D / 1.05 moveX3D = moveX3D / 1.05 rotateY3D(moveY3D) rotateX3D(moveX3D) end end function love.mousemoved(x, y, dx, dy) if mouseIsDown == true then moveY3D = (x ...
by adge
Tue May 03, 2016 12:03 am
Forum: Support and Development
Topic: Kinetic scrolling
Replies: 10
Views: 5418

Re: Move after mousereleased

Ok but now the problem is that I don't know how to decrease the momentum over a couple frames. I have this function: function love.mousemoved(x, y, dx, dy) if mouseIsDown == true then moveY3D = (x + dx - x) * 0.01 moveX3D = (y + dy - y) * 0.01 rotateY3D((x+dx-x) * 0.01)--* math.pi/36) rotateX3D((y+d...
by adge
Mon May 02, 2016 11:17 pm
Forum: Support and Development
Topic: How to represent 3d objects in 2d
Replies: 16
Views: 14532

Re: How to represent 3d objects in 2d

Ok so I got 3D to 2D projection and some basic rotations. Translation isn't that hard at all. Just add a number to the direction you want to move the object to all vertices. Should I maybe use matrices? Are they faster? Add lighting. That would be cool. But that exceeds my knowledge. I would use nor...
by adge
Mon May 02, 2016 7:57 pm
Forum: Support and Development
Topic: Kinetic scrolling
Replies: 10
Views: 5418

Re: Move after mousereleased

How would you do that in code. I really don't know how I would add data to a table every frame.

This obviously wouldn't work.
for i = 0, 100, 1 do
table = velocity
end
by adge
Mon May 02, 2016 7:55 pm
Forum: Games and Creations
Topic: simple 3D to 2D projection
Replies: 7
Views: 11738

Re: simple 3D to 2D projection

Yeah my puter won't let me upload the .love file :D. I really don't know why. Maybe it's a mac thing.
by adge
Mon May 02, 2016 5:28 pm
Forum: Support and Development
Topic: Kinetic scrolling
Replies: 10
Views: 5418

Kinetic scrolling

Imagine a list on your smartphone. If you scroll down and you stop scrolling the list will continue scrolling until the momentum is gone. How would you implement something like that in love2d using the mouse. I have an object and I can grab the object and rotate it around its x,y and z axis. Dependi...