Search found 7 matches

by OneOrigiN
Wed Jan 13, 2021 8:40 am
Forum: Support and Development
Topic: Please help with angle mathematics
Replies: 7
Views: 8619

Re: Please help with angle mathematics

"This is what you want, right?: https://love2d.org/imgmirrur/rtKTxzP.mp4" - woaaaaaaah, just exactly my prototype.
And about checking - if you noticed, I changed it:

Code: Select all

math.abs(_angle - (v[1] + self.angle)) <= 0.1
by OneOrigiN
Tue Jan 12, 2021 4:36 pm
Forum: Support and Development
Topic: Please help with angle mathematics
Replies: 7
Views: 8619

Re: Please help with angle mathematics

I think you don't quite understand what function need to do... Let me explain it second time. In two words: I have a center of circle, some angle (of circle if you interested) and table of angles. Try to draw some sort of wheel with 6 spokes - that's picture of what going on. Every spoke has angle a...
by OneOrigiN
Tue Jan 12, 2021 10:55 am
Forum: Support and Development
Topic: Please help with angle mathematics
Replies: 7
Views: 8619

Re: Please help with angle mathematics

meh, I just was experimenting with comparing numbers. In first version there was math.abs(_angle - (v[1] + self.angle))... and that still not working.
And sorry for variables. My vocabulary a little bit poor.
by OneOrigiN
Mon Jan 11, 2021 12:27 pm
Forum: Support and Development
Topic: Please help with angle mathematics
Replies: 7
Views: 8619

Please help with angle mathematics

Hello everyone! I have object "rimmyx". In rimmyx there is: variable self.angle and table self.main_angles that stores angles. Why I did this? I need to calculate a points where I need to draw a picure, So for each point I calculate anlge: self.angle + self.main_angles[i] (and then some ge...
by OneOrigiN
Sat Aug 22, 2020 2:57 pm
Forum: General
Topic: how to apply LinearImpulse when object has velocity?
Replies: 0
Views: 8059

how to apply LinearImpulse when object has velocity?

So, when I'm applying linear impulse to object that moving because it has velocity - object (let's call him player) just start falling (looks like somebody turned physics on). But I want player to "jump" in some position (applyLinearImpulse()) when I want. Here the code: function Player:ju...
by OneOrigiN
Fri Aug 21, 2020 10:34 am
Forum: General
Topic: Wall sliding
Replies: 2
Views: 5370

Re: Wall sliding

I solved the problem with the sliding (only on pic. 3). When player hits the "wall" i'm just using :setLinearVelocity() to make sliding effect.But I have another problem: Player can't jump while he's sliding.I tried to stop player first, and then apply impulse but it didn't work.
by OneOrigiN
Sat Aug 15, 2020 4:18 pm
Forum: General
Topic: Wall sliding
Replies: 2
Views: 5370

Wall sliding

Hello everyone! I'm new to love2D, and I interested in wall sliding.
So, what I want:
wall sliding(please pay attention at pic. 1 and 3)
wall sliding(please pay attention at pic. 1 and 3)
asklove1.png (546.1 KiB) Viewed 5370 times
Yeah,googled didn't help me. I just found some examples in unity.
P.S sorry for my english.