
Body:applyForce - angle
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Body:applyForce - angle
I do not speak English, so I'll post the .love and image


- Attachments
-
game.love
- controls: a, d
- (4.35 KiB) Downloaded 179 times
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Body:applyForce - angle
Please don't use fullscreen. It's very annoying and it didn't return to the normal resolution afterwards.
If I understand you correctly, the solution you seek requires trigonometry. Without looking at your code, something like:
As I said, I didn't look at your code and this is untested.
If I understand you correctly, the solution you seek requires trigonometry. Without looking at your code, something like:
Code: Select all
angle = body:getAngle()
body:applyForce(strength * cos(angle), strength * sin(angle))
Help us help you: attach a .love.
Re: Body:applyForce - angle
Thanks! you really helped me
--sorry for the fullscreen

--sorry for the fullscreen
Who is online
Users browsing this forum: No registered users and 6 guests